Compare commits

..
Author SHA1 Message Date
Richard Zink 585fdd58de Release v202611-00071 2026-11-20 12:14:09 +01:00
Richard ZinkandClaude Sonnet 5.5 171b87b766 Drafts in every chat, factory chat overlay, factory main switch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 12:14:04 +01:00
Richard Zink 58475ce65e Release v202611-00070 2026-11-20 11:12:32 +01:00
Richard ZinkandClaude Sonnet 5.5 e7dc04d4a9 Factory backlog: double width, one-line titles
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 11:12:29 +01:00
Richard Zink 57607918ee Release v202611-00069 2026-11-20 10:56:03 +01:00
Richard ZinkandClaude Sonnet 5.5 25e4167f56 Factory: backlog column with queue buttons, status-tinted issue cards
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 10:55:59 +01:00
Richard Zink 51a60ee75e Release v202611-00068 2026-11-20 07:23:48 +01:00
Richard ZinkandClaude Sonnet 5.5 96cb866d5c Test runner: isolated=false opt-out, ignore free text after the setup url
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 07:23:45 +01:00
49 changed files with 1124 additions and 18 deletions

No files matched your search

+32
View File
@@ -3,6 +3,38 @@
All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/);
until 1.0, minor versions may contain breaking changes.
## [v202611-00071] – 2026-11-20
### Added
- **Drafts in every chat.** What you have typed but not sent is kept: in the web UI and in the terminal client's server chats on the server (so you can continue on another device – it is picked up when you open or return to the chat, as long as you have no unsent edits of your own), in the terminal client's local chats in a file. Sending clears it.
- **Factory: chats open in an overlay on the desktop** (`#/factory/s/<id>`), closed with one click, Esc (outside text fields) or the back button, with a button to open the chat as a full page. Every issue card has an *open chat* button for the newest phase chat that still exists. On small screens chats still open as pages.
- **Factory main switch** at the top of the overview (web and PWA): green = running, yellow = stopping, red = stopped. Stopping is *soft*: no new review, build or acceptance starts, agents that are running finish their phase – the switch stays yellow until the last one is done, then turns red. Starting takes up work again at once. The state is kept across restarts; the board still updates while the factory is stopped. The colours come from the theme (new variables `--power-on`, `--power-warn`, `--power-off`, set in all 32 theme files).
### Changed
- The factory overview uses the full width of the window.
## [v202611-00070] – 2026-11-20
### Changed
- **Factory backlog:** the column is twice as wide and card titles stay on one line (the full title is in the tooltip).
## [v202611-00069] – 2026-11-20
### Added
- **Factory: backlog column.** All open issues of the configured repositories that are not in the factory yet appear in a new column on the far left. Each card has a *Queue* button (and the column *Queue all*, with a confirmation): the issue gets the factory label on the forge and the factory takes it up straight away. Issues whose author may not file factory issues are shown but cannot be queued. The list is read from the forge (cached for a minute) and follows the project dropdown.
- **Factory: cards are tinted by status** – a faint background and border colour per state (review, question, approved, build, acceptance, failed, done), taken from the theme's own colours.
## [v202611-00068] – 2026-11-20
### Added
- **Test runner: `"isolated": false` in `.factory/setup.json`** for apps that cannot run in a container (a native window, a library) – acceptance starts them itself, as before. `ready_seconds` sets how long the runner waits for the port. Free text after the `url` (e.g. `http://localhost:8080 (trunk serve)`) no longer confuses the port detection.
## [v202611-00067] – 2026-11-20
### Added
+12 -1
View File
@@ -11,7 +11,7 @@
</p>
<p align="center">
<img alt="Version v202611-00067" src="https://img.shields.io/badge/version-v202611--00067-d69e2e?style=flat-square">
<img alt="Version v202611-00071" src="https://img.shields.io/badge/version-v202611--00071-d69e2e?style=flat-square">
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-689d6a?style=flat-square">
<img alt="Rust backend" src="https://img.shields.io/badge/backend-Rust-b7410e?style=flat-square&logo=rust">
<img alt="React PWA" src="https://img.shields.io/badge/frontend-React%20PWA-2d81ff?style=flat-square&logo=react">
@@ -332,6 +332,17 @@ phase the model, agent (CodeCraft or Claude Code), permission mode, timeout, tri
technical failures, the skills that are switched on for it, plus the number of rework rounds (default 2). Failed or rejected issues
can be restarted from the board, finished ones are closed with a comment.
**Main switch.** The switch at the top of the factory page starts and stops the whole factory.
*Stop* is soft: no new review, build or acceptance starts, running agents finish their phase.
The switch is green while the factory runs, yellow while it is stopping (agents still working)
and red once the last agent is done. The state survives restarts.
**Backlog.** The first column of the board lists every open issue of the configured
repositories that is not in the factory yet. *Queue* gives an issue the factory label on the
forge (so it enters the review at once); *Queue all* does it for the whole list. Issues of authors
who are not allowed to file factory issues are shown but cannot be queued. Cards are tinted by
status.
**Files in the repository** (all optional, kept in `.factory/`):
| File | Purpose |
+114
View File
@@ -143,6 +143,33 @@ pub struct App {
pending_note: Option<oneshot::Receiver<Result<String>>>,
/// The factory issue ("repo#number") whose actions are open.
factory_key: String,
/// Unsent input is kept per chat: on the server for server chats (so another device can continue it),
/// in a local file for local chats.
draft: DraftSync,
}
struct DraftSync {
/// "remote:<id>" or "local:<id>" of the chat the draft belongs to.
key: String,
/// What the editor held at the last look, and since when.
seen: String,
changed: Instant,
/// What is stored (or was last stored) for this chat.
synced: String,
loaded: bool,
pull: Option<oneshot::Receiver<Result<String>>>,
last_pull: Instant,
}
impl DraftSync {
fn new() -> Self {
Self { key: String::new(), seen: String::new(), changed: Instant::now(), synced: String::new(), loaded: false, pull: None, last_pull: Instant::now() }
}
}
fn local_draft_path(id: &str) -> std::path::PathBuf {
let safe: String = id.chars().filter(|c| c.is_ascii_alphanumeric() || *c == '-' || *c == '_').collect();
crate::conf::data_dir().join("drafts").join(format!("{safe}.txt"))
}
const SPINNER: &[&str] = &["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
@@ -316,6 +343,7 @@ impl App {
dialog: Dialog::None,
todos: session.todos.clone(),
context: session.context_tokens,
draft: DraftSync::new(),
session,
effort: None,
images: vec![],
@@ -1441,7 +1469,93 @@ impl App {
self.status = "loading models…".into();
}
/// Keep the unsent input of the current chat: load it when the chat changes, save it shortly after typing.
fn poll_draft(&mut self) {
let remote_id = self.remote.as_ref().map(|r| r.id.clone());
let key = match &remote_id {
Some(id) => format!("remote:{id}"),
None => format!("local:{}", self.session.id),
};
if self.draft.key != key {
self.draft = DraftSync::new();
self.draft.key = key.clone();
self.draft.seen = self.editor.text();
match &remote_id {
Some(id) => self.draft_pull(id.clone()),
None => {
let text = std::fs::read_to_string(local_draft_path(&self.session.id)).unwrap_or_default();
if self.editor.is_empty() && !text.is_empty() {
self.editor.set(&text);
self.draft.seen = text.clone();
}
self.draft.synced = if self.editor.is_empty() { String::new() } else { self.draft.seen.clone() };
self.draft.loaded = true;
}
}
}
if let Some(rx) = &mut self.draft.pull {
if let Ok(res) = rx.try_recv() {
self.draft.pull = None;
if let Ok(text) = res {
// First load: only into an empty field. Later: only when nothing was typed here since the last sync.
let untouched = if self.draft.loaded { self.editor.text() == self.draft.synced } else { self.editor.is_empty() };
if untouched && text != self.editor.text() {
self.editor.set(&text);
self.draft.seen = text.clone();
self.draft.synced = text;
} else if !self.draft.loaded {
self.draft.synced = if untouched { text } else { String::new() };
}
self.draft.loaded = true;
}
}
}
let cur = self.editor.text();
if cur != self.draft.seen {
self.draft.seen = cur;
self.draft.changed = Instant::now();
}
if self.draft.loaded && self.draft.seen != self.draft.synced && self.draft.changed.elapsed() >= Duration::from_millis(700) {
let text = self.draft.seen.clone();
self.draft.synced = text.clone();
match (&remote_id, self.env.server.clone()) {
(Some(id), Some(server)) => {
let id = id.clone();
tokio::spawn(async move {
let _ = remote::draft_put(&server, &id, &text).await;
});
}
(None, _) => {
let path = local_draft_path(&self.session.id);
if text.trim().is_empty() {
let _ = std::fs::remove_file(&path);
} else if let Some(dir) = path.parent() {
let _ = std::fs::create_dir_all(dir);
let _ = std::fs::write(&path, &text);
}
}
_ => {}
}
}
// Pick up what was typed on another device while this field has no unsent edits.
if let (Some(id), true) = (&remote_id, self.draft.loaded && self.draft.pull.is_none() && self.draft.last_pull.elapsed() >= Duration::from_secs(10) && self.editor.text() == self.draft.synced) {
self.draft.last_pull = Instant::now();
self.draft_pull(id.clone());
}
}
fn draft_pull(&mut self, id: String) {
let Some(server) = self.env.server.clone() else { return };
let (tx, rx) = oneshot::channel();
tokio::spawn(async move {
let _ = tx.send(remote::draft_get(&server, &id).await);
});
self.draft.pull = Some(rx);
self.draft.last_pull = Instant::now();
}
fn poll_pending(&mut self) {
self.poll_draft();
self.poll_remote();
if let Some(rx) = &mut self.pending_detect {
if let Ok(found) = rx.try_recv() {
+10
View File
@@ -104,6 +104,16 @@ pub async fn prompt(server: &Server, id: &str, text: &str) -> Result<()> {
server.post(&format!("/sessions/{id}/prompt"), json!({"text": text})).await.map(|_| ())
}
/// The unsent message of a server chat (typed in the web UI or in another terminal).
pub async fn draft_get(server: &Server, id: &str) -> Result<String> {
let d = server.get(&format!("/sessions/{id}/composer-draft")).await?;
Ok(d["text"].as_str().unwrap_or("").to_string())
}
pub async fn draft_put(server: &Server, id: &str, text: &str) -> Result<()> {
server.put(&format!("/sessions/{id}/composer-draft"), json!({"text": text})).await.map(|_| ())
}
pub async fn abort(server: &Server, id: &str) -> Result<()> {
server.post(&format!("/sessions/{id}/abort"), json!({})).await.map(|_| ())
}
+5
View File
@@ -74,6 +74,11 @@ impl Server {
Ok(check(resp).await?.json().await?)
}
pub async fn put(&self, path: &str, body: Value) -> Result<Value> {
let resp = self.http.put(format!("{}/api{path}", self.url)).bearer_auth(&self.token).json(&body).send().await.with_context(|| format!("cannot reach {}", self.url))?;
Ok(check(resp).await?.json().await?)
}
pub async fn post(&self, path: &str, body: Value) -> Result<Value> {
let resp = self.http.post(format!("{}/api{path}", self.url)).bearer_auth(&self.token).json(&body).send().await.with_context(|| format!("cannot reach {}", self.url))?;
Ok(check(resp).await?.json().await?)
+139
View File
@@ -96,6 +96,7 @@ pub fn router(app: AppState) -> Router {
.route("/sessions/{id}/compact", post(compact))
.route("/sessions/{id}/rewind", post(rewind))
.route("/sessions/{id}/job-draft", post(job_draft))
.route("/sessions/{id}/composer-draft", get(get_composer_draft).put(put_composer_draft))
.route("/projects/overview", get(project_overview))
.route("/sessions/{id}/project-defaults", get(get_project_defaults).put(put_project_defaults).delete(delete_project_defaults))
.route("/sessions/{id}/check", get(get_check).put(put_check))
@@ -168,6 +169,9 @@ pub fn router(app: AppState) -> Router {
.route("/account/factory", get(get_factory).put(put_factory))
.route("/account/factory/test", post(test_factory))
.route("/factory/overview", get(factory_overview))
.route("/factory/backlog", get(factory_backlog))
.route("/factory/power", post(factory_power))
.route("/factory/backlog/enqueue", post(factory_enqueue))
.route("/factory/poll", post(factory_poll))
.route("/factory/issues/restart", post(factory_restart))
.route("/factory/issue-chats", post(factory_new_issue_chat))
@@ -1658,6 +1662,27 @@ async fn reply_permission(Extension(user): Extension<User>, State(app): State<Ap
}
/// Instructions for an automation drafted from this chat (small model); the client creates the job.
/// The unsent message of this chat (typed on any device).
async fn get_composer_draft(Extension(user): Extension<User>, State(app): State<AppState>, Path(id): Path<String>) -> ApiResult {
writable(&app, &user, &id)?;
let d = app.store.chat_draft(&id, &user.id)?;
Ok(Json(json!({"text": d.as_ref().map(|x| x.0.as_str()).unwrap_or(""), "updated_at": d.map(|x| x.1).unwrap_or(0)})))
}
#[derive(Deserialize)]
struct ComposerDraft {
text: String,
}
async fn put_composer_draft(Extension(user): Extension<User>, State(app): State<AppState>, Path(id): Path<String>, Json(b): Json<ComposerDraft>) -> ApiResult {
writable(&app, &user, &id)?;
if b.text.len() > 200_000 {
return Err(ApiError(StatusCode::PAYLOAD_TOO_LARGE, "the draft is too long".into()));
}
let at = app.store.chat_draft_set(&id, &user.id, &b.text)?;
Ok(Json(json!({"updated_at": at})))
}
async fn job_draft(Extension(user): Extension<User>, State(app): State<AppState>, Path(id): Path<String>) -> ApiResult {
let s = writable(&app, &user, &id)?;
let (name, prompt) = runner::draft_job(&app, &s).await.map_err(|e| ApiError(StatusCode::BAD_GATEWAY, format!("{e:#}")))?;
@@ -2749,11 +2774,125 @@ async fn factory_overview(Extension(user): Extension<User>, State(app): State<Ap
"area": app.factory_dir().is_some(),
"repos": repos,
"issues": app.store.factory_issues(&user.id)?,
"power": factory_power_json(&app, &user),
"runs": app.store.factory_runs(&user.id, None, None, 300)?,
"releases": app.store.factory_releases(&user.id, 10)?,
})))
}
fn factory_power_json(app: &App, user: &User) -> Value {
let on = app.store.user_setting::<crate::factory::Power>(&user.id, "factory_power").unwrap_or_default().on;
let active = app.store.factory_active(&user.id).unwrap_or(0);
json!({"on": on, "active": active, "state": crate::factory::power_state(on, active)})
}
#[derive(Deserialize)]
struct PowerBody {
on: bool,
}
/// The master switch: stop = no new agent starts (running ones finish), start = take up work again right away.
async fn factory_power(Extension(user): Extension<User>, State(app): State<AppState>, headers: axum::http::HeaderMap, Json(b): Json<PowerBody>) -> ApiResult {
app.store.set_user_setting(&user.id, "factory_power", &crate::factory::Power { on: b.on })?;
app.audit(Some(&user), if b.on { "factory.start" } else { "factory.stop" }, "", &crate::auth::client_ip(&headers));
if b.on {
let (app2, user2) = (app.clone(), user.clone());
tokio::spawn(async move {
let s: crate::factory::FactorySettings = app2.store.user_setting(&user2.id, "factory").unwrap_or_default();
for cfg in s.repos.iter().filter(|r| r.enabled).map(|r| s.resolve(r)).filter(|r| !r.token.is_empty()) {
let _ = crate::factory::poll_repo(&app2, &user2, &cfg).await;
}
});
}
Ok(Json(factory_power_json(&app, &user)))
}
/// Open issues per repository as the forge lists them; cached for a minute so that the board can ask often.
static BACKLOG_CACHE: std::sync::OnceLock<std::sync::Mutex<std::collections::HashMap<String, (std::time::Instant, Vec<Value>)>>> = std::sync::OnceLock::new();
#[derive(Deserialize)]
struct BacklogQuery {
#[serde(default)]
refresh: bool,
}
/// The backlog: open issues of the configured repositories that are not in the factory yet.
async fn factory_backlog(Extension(user): Extension<User>, State(app): State<AppState>, Query(q): Query<BacklogQuery>) -> ApiResult {
let s: crate::factory::FactorySettings = app.store.user_setting(&user.id, "factory")?;
let cache = BACKLOG_CACHE.get_or_init(Default::default);
let tracked_all = app.store.factory_issues(&user.id)?;
let (mut issues, mut errors) = (Vec::new(), Vec::new());
for cfg in s.repos.iter().filter(|r| r.enabled).map(|r| s.resolve(r)).filter(|r| !r.token.is_empty()) {
let key = format!("{}|{}", user.id, cfg.url);
let cached = cache.lock().unwrap().get(&key).filter(|(t, _)| !q.refresh && t.elapsed().as_secs() < 60).map(|(_, v)| v.clone());
let result = async {
let g = crate::factory::Forge::new(&cfg)?;
let open = match cached {
Some(v) => v,
None => {
let v = g.open_issues().await?;
cache.lock().unwrap().insert(key.clone(), (std::time::Instant::now(), v.clone()));
v
}
};
let allowed = crate::factory::allowed_authors(&g, &cfg).await?;
let tracked: Vec<i64> = tracked_all.iter().filter(|r| r["repo"].as_str() == Some(cfg.url.as_str())).map(|r| r["number"].as_i64().unwrap_or(0)).collect();
anyhow::Ok(crate::factory::backlog_of(&cfg, &open, &tracked, &allowed))
}
.await;
match result {
Ok(v) => issues.extend(v),
Err(e) => errors.push(format!("{}: {e:#}", cfg.url)),
}
}
Ok(Json(json!({"issues": issues, "errors": errors})))
}
#[derive(Deserialize)]
struct Enqueue {
repo: String,
numbers: Vec<i64>,
}
/// Put backlog issues into the process: give them the factory label, the next poll picks them up.
async fn factory_enqueue(Extension(user): Extension<User>, State(app): State<AppState>, headers: axum::http::HeaderMap, Json(b): Json<Enqueue>) -> ApiResult {
let cfg = factory_repo_cfg(&app, &user, &b.repo)?;
if b.numbers.is_empty() || b.numbers.len() > 100 {
return Err(ApiError(StatusCode::BAD_REQUEST, "1 to 100 issues".into()));
}
let bad = |e: anyhow::Error| ApiError(StatusCode::BAD_GATEWAY, format!("{e:#}"));
let g = crate::factory::Forge::new(&cfg).map_err(bad)?;
let allowed = crate::factory::allowed_authors(&g, &cfg).await.map_err(bad)?;
let open = g.open_issues().await.map_err(bad)?;
g.ensure_labels().await.map_err(bad)?;
let (mut queued, mut errors) = (Vec::new(), Vec::new());
for n in b.numbers {
let Some(issue) = open.iter().find(|i| crate::factory::issue_no(i) == n) else {
errors.push(json!({"number": n, "error": "not an open issue of this repository"}));
continue;
};
let author = issue["user"]["login"].as_str().unwrap_or("");
if !allowed.iter().any(|a| a.eq_ignore_ascii_case(author)) {
errors.push(json!({"number": n, "error": format!("the author {author} is not allowed to file factory issues (see the repository settings)")}));
continue;
}
match g.add_label(n as u64, &cfg.label).await {
Ok(()) => queued.push(n),
Err(e) => errors.push(json!({"number": n, "error": format!("{e:#}")})),
}
}
BACKLOG_CACHE.get_or_init(Default::default).lock().unwrap().remove(&format!("{}|{}", user.id, cfg.url));
app.audit(Some(&user), "factory.backlog.enqueue", &format!("{} {:?}", b.repo, queued), &crate::auth::client_ip(&headers));
// Take the issues up right away instead of waiting for the next poll.
if !queued.is_empty() {
let (app2, user2) = (app.clone(), user.clone());
tokio::spawn(async move {
let _ = crate::factory::poll_repo(&app2, &user2, &cfg).await;
});
}
Ok(Json(json!({"queued": queued, "errors": errors})))
}
/// Look for new issues right now instead of waiting for the next poll.
async fn factory_poll(Extension(user): Extension<User>, State(app): State<AppState>) -> ApiResult {
let s: crate::factory::FactorySettings = app.store.user_setting(&user.id, "factory")?;
+125 -5
View File
@@ -17,6 +17,28 @@ pub const FACTORY_FOLDER: &str = "Factory";
pub const PHASES: [&str; 3] = ["review", "build", "qa"];
/// The master switch of a user's factory. Switched off, no new agent starts (a soft stop: agents that
/// are running finish their phase); the poller still keeps the board up to date.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Power {
pub on: bool,
}
impl Default for Power {
fn default() -> Self {
Self { on: true }
}
}
/// "running" (on), "stopping" (off, agents still working) or "stopped" (off, nobody working).
pub fn power_state(on: bool, active: i64) -> &'static str {
match (on, active) {
(true, _) => "running",
(false, 0) => "stopped",
(false, _) => "stopping",
}
}
/// Status labels of an issue, in the order of the workflow.
pub const STATUS_LABELS: [(&str, &str); 9] = [
("factory", "0e8a16"),
@@ -556,6 +578,49 @@ impl Forge {
Ok(out)
}
/// All open issues (pull requests excluded), up to 200, in the shape of `issues()`.
pub async fn open_issues(&self) -> Result<Vec<Value>> {
let mut out = Vec::new();
for page in 1..=4 {
let url = match self.kind {
Kind::Gitea => self.rp(&format!("/issues?state=open&type=issues&limit=50&page={page}")),
Kind::Github => self.rp(&format!("/issues?state=open&per_page=50&page={page}")),
Kind::Gitlab => self.rp(&format!("/issues?state=opened&per_page=50&page={page}")),
};
let v = self.call(reqwest::Method::GET, url, None).await?;
let a = v.as_array().cloned().unwrap_or_default();
let n = a.len();
for i in a {
if !i.get("pull_request").map_or(true, |p| p.is_null()) {
continue;
}
out.push(if self.kind == Kind::Gitlab { norm_gitlab_issue(&i) } else { i });
}
if n < 50 {
break;
}
}
Ok(out)
}
/// Add one label to an issue without touching its other labels.
pub async fn add_label(&self, issue: u64, name: &str) -> Result<()> {
match self.kind {
Kind::Gitea => {
let all = self.label_names().await?;
let id = all.iter().find(|l| l["name"].as_str() == Some(name)).map(|l| l["id"].clone()).with_context(|| format!("label {name} does not exist"))?;
self.call(reqwest::Method::POST, self.rp(&format!("/issues/{issue}/labels")), Some(json!({"labels": [id]}))).await?;
}
Kind::Github => {
self.call(reqwest::Method::POST, self.rp(&format!("/issues/{issue}/labels")), Some(json!({"labels": [name]}))).await?;
}
Kind::Gitlab => {
self.call(reqwest::Method::PUT, self.rp(&format!("/issues/{issue}")), Some(json!({"add_labels": name}))).await?;
}
}
Ok(())
}
/// Is the issue still open on the forge?
pub async fn issue_is_open(&self, number: u64) -> Result<bool> {
let v = self.call(reqwest::Method::GET, self.rp(&format!("/issues/{number}")), None).await?;
@@ -738,7 +803,12 @@ impl Forge {
/// GitLab issue → {number, title, body, user.login, html_url}.
fn norm_gitlab_issue(i: &Value) -> Value {
json!({"number": i["iid"], "title": i["title"], "body": i["description"], "user": {"login": i["author"]["username"]}, "html_url": i["web_url"]})
json!({"number": i["iid"], "title": i["title"], "body": i["description"], "user": {"login": i["author"]["username"]}, "html_url": i["web_url"], "labels": i["labels"]})
}
/// Label names of an issue (Gitea/GitHub: objects with a name, GitLab: plain strings).
pub fn issue_labels(i: &Value) -> Vec<String> {
i["labels"].as_array().map(|a| a.iter().filter_map(|l| l["name"].as_str().or_else(|| l.as_str()).map(String::from)).collect()).unwrap_or_default()
}
fn urlenc(s: &str) -> String {
@@ -1396,6 +1466,33 @@ pub(crate) async fn alert(app: &App, repo: &str, n: i64, what: &str, detail: &st
}
/// One pass over a repository: take up new issues, restart reviews after answers.
/// Who may file issues for the factory: the configured users, by default the token's owner.
pub async fn allowed_authors(g: &Forge, cfg: &RepoCfg) -> Result<Vec<String>> {
let mut allowed = cfg.allowed_users.clone();
if allowed.is_empty() {
allowed.push(g.login().await?);
}
Ok(allowed)
}
/// Open issues of the forge that are not in the factory (yet): the backlog.
/// `open` is the forge's list of open issues, `tracked` the issue numbers the factory already knows.
pub fn backlog_of(cfg: &RepoCfg, open: &[Value], tracked: &[i64], allowed: &[String]) -> Vec<Value> {
open.iter()
.filter_map(|i| {
let n = issue_no(i);
let author = i["user"]["login"].as_str().unwrap_or("");
let ok = allowed.iter().any(|a| a.eq_ignore_ascii_case(author));
let labelled = issue_labels(i).iter().any(|l| l == &cfg.label);
// Labelled issues of allowed authors are taken up by the next poll anyway.
if n == 0 || tracked.contains(&n) || (labelled && ok) {
return None;
}
Some(json!({"repo": cfg.url, "number": n, "title": i["title"], "author": author, "url": i["html_url"], "allowed": ok, "labels": issue_labels(i)}))
})
.collect()
}
pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()> {
let g = Forge::new(cfg)?;
let mut allowed = cfg.allowed_users.clone();
@@ -1403,6 +1500,7 @@ pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()>
allowed.push(g.login().await?);
}
let issues = g.issues(&cfg.label).await?;
let power_on = app.store.user_setting::<Power>(&user.id, "factory_power").unwrap_or_default().on;
for issue in issues {
let n = issue_no(&issue);
let author = issue["user"]["login"].as_str().unwrap_or("");
@@ -1423,7 +1521,7 @@ pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()>
}
"approved" | "rework" => {
let feedback = if state == "rework" { row["note"].as_str().unwrap_or("").to_string() } else { String::new() };
if app.store.factory_running(&cfg.url)? < cfg.max_parallel as i64 {
if power_on && app.store.factory_running(&cfg.url)? < cfg.max_parallel as i64 {
let comments = g.comments(n as u64).await.unwrap_or_default();
app.store.factory_issue_set(&cfg.url, n, &[("title", json!(title)), ("state", json!("building"))])?;
tokio::spawn(build(app.clone(), user.clone(), cfg.clone(), issue, comments, feedback));
@@ -1431,7 +1529,7 @@ pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()>
continue;
}
"qa" => {
if app.store.factory_running(&cfg.url)? < cfg.max_parallel as i64 {
if power_on && app.store.factory_running(&cfg.url)? < cfg.max_parallel as i64 {
app.store.factory_issue_set(&cfg.url, n, &[("title", json!(title))])?;
// Mark the run before it starts so the next poll does not take it up again.
app.store.factory_issue_set(&cfg.url, n, &[("state", json!("testing"))])?;
@@ -1441,7 +1539,7 @@ pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()>
}
_ => false,
};
if !start || app.store.factory_running(&cfg.url)? >= cfg.max_parallel as i64 {
if !start || !power_on || app.store.factory_running(&cfg.url)? >= cfg.max_parallel as i64 {
continue;
}
if comments.is_empty() {
@@ -1642,7 +1740,7 @@ How to work:
5. Also keep the file `setup.json` in your working directory: it tells the acceptance stage how to start the finished app, so the app can be checked by looking at it. Once the tech stack is settled write it, and update it when the stack changes. Format (one JSON object, all values strings, no comments):
`{"install": "optional one-off setup command, e.g. npm ci", "start": "command that runs the app in the foreground", "url": "where it listens, e.g. http://localhost:8080"}`
Ask the user for the port and commands if the spec leaves them open. A static site may use e.g. `"start": "python3 -m http.server 8080"`. Without a start command acceptance has to guess, so do not skip this file for anything that runs.
Acceptance may run the app in a fresh throw-away container: then add `"image"` (a Docker image that has the toolchain for install/start, e.g. `node:22-bookworm`, `python:3.12`, `golang:1.23`) and, if the app needs a database or similar, `"services": {"db": {"image": "postgres:16", "env": {"POSTGRES_PASSWORD": "app"}}}` (reachable under the name `db`). Never write secrets there.
Acceptance may run the app in a fresh throw-away container: then add `"image"` (a Docker image that has the toolchain for install/start, e.g. `node:22-bookworm`, `python:3.12`, `golang:1.23`) and, if the app needs a database or similar, `"services": {"db": {"image": "postgres:16", "env": {"POSTGRES_PASSWORD": "app"}}}` (reachable under the name `db`). Use `"ready_seconds"` for apps that need long to install and start. The app must listen on 0.0.0.0, not only 127.0.0.1. For something that cannot run in a container (a native desktop window, a library) set `"isolated": false`. Never write secrets there.
6. When the user says the spec is done, propose a short project name and a repository slug (lowercase, digits and dashes) and end your message with exactly one fenced json block and nothing after it:
```json
{"decision": "ready", "name": "Project name", "slug": "project-name", "description": "one sentence"}
@@ -1832,6 +1930,28 @@ pub async fn create_project(app: &Arc<App>, user: &User, settings: &mut FactoryS
mod tests {
use super::*;
#[test]
fn power_states() {
assert_eq!(power_state(true, 0), "running");
assert_eq!(power_state(true, 3), "running");
assert_eq!(power_state(false, 2), "stopping");
assert_eq!(power_state(false, 0), "stopped");
assert!(Power::default().on);
}
#[test]
fn backlog_skips_tracked_and_queued_issues() {
let cfg = repo("https://git.example.org/o/r.git");
let issue = |n: i64, author: &str, labels: &[&str]| json!({"number": n, "title": format!("t{n}"), "user": {"login": author}, "html_url": "u", "labels": labels.iter().map(|l| json!({"name": l})).collect::<Vec<_>>()});
let open = vec![issue(1, "me", &[]), issue(2, "me", &[&cfg.label]), issue(3, "me", &["bug"]), issue(4, "stranger", &[&cfg.label]), issue(5, "me", &[])];
let b = backlog_of(&cfg, &open, &[5], &["ME".to_string()]);
let nums: Vec<i64> = b.iter().map(|i| i["number"].as_i64().unwrap()).collect();
// 2 is labelled by an allowed author (the poll takes it), 5 is tracked; 4 stays visible but not allowed.
assert_eq!(nums, vec![1, 3, 4]);
assert_eq!(b[2]["allowed"], false);
assert_eq!(issue_labels(&json!({"labels": ["a", {"name": "b"}]})), vec!["a", "b"]);
}
fn repo(url: &str) -> RepoCfg {
serde_json::from_value(json!({"url": url, "token": "tok"})).unwrap()
}
+67 -1
View File
@@ -125,6 +125,13 @@ impl Store {
last_status TEXT,
created_at INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS chat_drafts (
session_id TEXT NOT NULL,
user_id TEXT NOT NULL,
text TEXT NOT NULL,
updated_at INTEGER NOT NULL,
PRIMARY KEY (session_id, user_id)
);
CREATE TABLE IF NOT EXISTS user_settings (
user_id TEXT NOT NULL,
key TEXT NOT NULL,
@@ -1569,13 +1576,42 @@ impl Store {
Ok(rows.filter_map(|r| r.ok()).collect())
}
/// The unsent message of a chat, kept on the server so that it can be continued on another device.
pub fn chat_draft(&self, session: &str, user: &str) -> Result<Option<(String, i64)>> {
Ok(self.conn.lock().unwrap().query_row("SELECT text, updated_at FROM chat_drafts WHERE session_id = ?1 AND user_id = ?2", params![session, user], |r| Ok((r.get(0)?, r.get(1)?))).optional()?)
}
/// Store the unsent message (an empty text deletes it).
pub fn chat_draft_set(&self, session: &str, user: &str, text: &str) -> Result<i64> {
let conn = self.conn.lock().unwrap();
let now = crate::types::now_ms();
if text.trim().is_empty() {
conn.execute("DELETE FROM chat_drafts WHERE session_id = ?1 AND user_id = ?2", params![session, user])?;
} else {
conn.execute("INSERT INTO chat_drafts (session_id, user_id, text, updated_at) VALUES (?1,?2,?3,?4) ON CONFLICT(session_id, user_id) DO UPDATE SET text = ?3, updated_at = ?4", params![session, user, text, now])?;
}
Ok(now)
}
pub fn factory_issues(&self, owner: &str) -> Result<Vec<Value>> {
let nums: Vec<(String, i64)> = {
let conn = self.conn.lock().unwrap();
let mut st = conn.prepare("SELECT repo_url, number FROM factory_issues WHERE owner_id = ?1 ORDER BY updated_at DESC")?;
st.query_map([owner], |r| Ok((r.get(0)?, r.get(1)?)))?.filter_map(|r| r.ok()).collect()
};
Ok(nums.into_iter().filter_map(|(r, n)| self.factory_issue(&r, n).ok().flatten()).collect())
let mut rows: Vec<Value> = nums.into_iter().filter_map(|(r, n)| self.factory_issue(&r, n).ok().flatten()).collect();
// The newest phase chat that still exists, for the "open chat" button of the card.
let conn = self.conn.lock().unwrap();
if let Ok(mut chat) = conn.prepare("SELECT r.session_id, r.phase FROM factory_runs r WHERE r.repo_url = ?1 AND r.issue = ?2 AND EXISTS (SELECT 1 FROM sessions s WHERE s.id = r.session_id) ORDER BY r.started_at DESC LIMIT 1") {
for row in rows.iter_mut() {
let (repo, n) = (row["repo"].as_str().unwrap_or("").to_string(), row["number"].as_i64().unwrap_or(0));
if let Ok((sid, phase)) = chat.query_row(params![repo, n], |x| Ok((x.get::<_, String>(0)?, x.get::<_, String>(1)?))) {
row["chat_session"] = json!(sid);
row["chat_phase"] = json!(phase);
}
}
}
Ok(rows)
}
pub fn factory_run_add(&self, id: &str, owner: &str, repo: &str, issue: i64, phase: &str, round: i64, session: &str, model: &str) -> Result<()> {
@@ -1597,6 +1633,11 @@ impl Store {
Ok(self.conn.lock().unwrap().query_row("SELECT COUNT(*) FROM factory_issues WHERE repo_url = ?1 AND state IN ('review', 'building', 'testing')", [repo], |r| r.get(0))?)
}
/// Phases of this user that are running right now (any repository).
pub fn factory_active(&self, owner: &str) -> Result<i64> {
Ok(self.conn.lock().unwrap().query_row("SELECT COUNT(*) FROM factory_issues WHERE owner_id = ?1 AND state IN ('review', 'building', 'testing')", [owner], |r| r.get(0))?)
}
/// Runs with token and cost totals (joined from the usage table).
pub fn factory_runs(&self, owner: &str, repo: Option<&str>, issue: Option<i64>, limit: i64) -> Result<Vec<Value>> {
let conn = self.conn.lock().unwrap();
@@ -2022,3 +2063,28 @@ mod link_tests {
std::fs::remove_dir_all(&dir).unwrap();
}
}
#[cfg(test)]
mod draft_tests {
use super::*;
#[test]
fn drafts_are_kept_per_chat_and_user_and_cleared_when_empty() {
let dir = std::env::temp_dir().join(format!("cc-drafts-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let store = Store::open(&dir.join("t.db")).unwrap();
assert!(store.chat_draft("s1", "u1").unwrap().is_none());
store.chat_draft_set("s1", "u1", "half a message").unwrap();
store.chat_draft_set("s1", "u2", "someone else").unwrap();
store.chat_draft_set("s2", "u1", "other chat").unwrap();
assert_eq!(store.chat_draft("s1", "u1").unwrap().unwrap().0, "half a message");
store.chat_draft_set("s1", "u1", "continued on another device").unwrap();
assert_eq!(store.chat_draft("s1", "u1").unwrap().unwrap().0, "continued on another device");
assert_eq!(store.chat_draft("s1", "u2").unwrap().unwrap().0, "someone else");
// Sending clears it.
store.chat_draft_set("s1", "u1", " \n").unwrap();
assert!(store.chat_draft("s1", "u1").unwrap().is_none());
assert_eq!(store.chat_draft("s2", "u1").unwrap().unwrap().0, "other chat");
let _ = std::fs::remove_dir_all(&dir);
}
}
+9 -2
View File
@@ -75,6 +75,10 @@ pub struct Started {
/// Parse `.factory/setup.json` into a request (without `work`). `None` when there is nothing to start.
pub fn parse_setup(text: &str) -> Option<StartReq> {
let v: Value = serde_json::from_str(text).ok()?;
// `"isolated": false`: the app cannot run in a container (e.g. a native window); acceptance starts it itself.
if v["isolated"].as_bool() == Some(false) {
return None;
}
let start = v["start"].as_str()?.trim().to_string();
if start.is_empty() {
return None;
@@ -111,8 +115,9 @@ pub fn parse_setup(text: &str) -> Option<StartReq> {
/// Port of `http://host:1234/path` (80/443 by scheme when missing).
pub fn port_of(url: &str) -> Option<u16> {
let (scheme, rest) = url.split_once("://")?;
let host = rest.split('/').next()?;
let (scheme, rest) = url.trim().split_once("://")?;
// Free text after the URL ("http://localhost:8080 (trunk serve)") is ignored.
let host = rest.split(|c: char| c == '/' || c.is_whitespace()).next()?;
match host.rsplit_once(':') {
Some((_, p)) if p.chars().all(|c| c.is_ascii_digit()) && !p.is_empty() => p.parse().ok(),
_ => Some(if scheme == "https" { 443 } else { 80 }),
@@ -548,6 +553,8 @@ mod tests {
assert_eq!(port_of("http://localhost"), Some(80));
assert_eq!(port_of("https://x/y"), Some(443));
assert_eq!(port_of("nonsense"), None);
assert_eq!(port_of("http://localhost:8080 (web build: trunk serve)"), Some(8080));
assert!(parse_setup(r#"{"start":"x","port":1,"isolated":false}"#).is_none());
}
#[test]
+1 -1
View File
@@ -128,7 +128,7 @@ export function App() {
);
else if (section === "settings") content = <Settings tab={arg} onMenu={openMenu} />;
else if (section === "p" && arg) content = <ProjectPage key={arg} cwd={decodeURIComponent(arg)} onMenu={openMenu} />;
else if (section === "factory") content = <Factory onMenu={openMenu} />;
else if (section === "factory") content = <Factory onMenu={openMenu} overlayId={arg === "s" ? route[2] : undefined} />;
else if (section === "stats") content = <Stats onMenu={openMenu} />;
else if (section === "images") content = <Images onMenu={openMenu} />;
else if (section === "jobs" && arg) content = <JobEditor key={arg} id={arg} onMenu={openMenu} />;
+52
View File
@@ -543,6 +543,57 @@ function OlderLoader({ sessionId, afterSummary, scrollRef }: { sessionId: string
);
}
/**
* Keep the unsent message of a chat on the server, so that it survives a reload and can be continued
* on another device: it is saved shortly after typing, loaded when the chat opens and again when the
* window comes back – as long as this device has no unsaved edits of its own.
*/
function useDraftSync(sessionId: string, text: string, setText: (s: string) => void, readOnly: boolean) {
const synced = useRef<string | null>(null);
const current = useRef(text);
current.current = text;
const pull = (initial: boolean) => {
if (readOnly) return;
get<{ text: string }>(`/sessions/${sessionId}/composer-draft`)
.then((d) => {
// Only take over when nothing was typed here since the last sync (on opening: when the field is empty).
const untouched = initial ? current.current === "" : current.current === (synced.current ?? "");
if (synced.current === null) synced.current = initial && current.current !== "" ? "" : d.text;
if (untouched && d.text !== current.current) {
synced.current = d.text;
setText(d.text);
} else if (initial && current.current === "") synced.current = d.text;
})
.catch(() => {});
};
useEffect(() => {
synced.current = null;
pull(true);
const again = () => document.visibilityState === "visible" && pull(false);
document.addEventListener("visibilitychange", again);
window.addEventListener("focus", again);
const h = setInterval(again, 10000);
return () => {
document.removeEventListener("visibilitychange", again);
window.removeEventListener("focus", again);
clearInterval(h);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sessionId, readOnly]);
useEffect(() => {
if (readOnly || synced.current === null || text === synced.current) return;
const h = setTimeout(() => {
const value = text;
put(`/sessions/${sessionId}/composer-draft`, { text: value })
.then(() => {
synced.current = value;
})
.catch(() => {});
}, 700);
return () => clearTimeout(h);
}, [text, sessionId, readOnly]);
}
export function ChatView({ sessionId, onMenu, onClosePane }: { sessionId: string; onMenu: () => void; onClosePane?: () => void }) {
const t = useT();
const session = useStore((s) => s.sessionById[sessionId]);
@@ -572,6 +623,7 @@ export function ChatView({ sessionId, onMenu, onClosePane }: { sessionId: string
const models = useModels();
const [loadError, setLoadError] = useState<string>();
const [text, setText] = useState(() => takePrefill(sessionId) ?? "");
useDraftSync(sessionId, text, setText, readOnly);
const [stats, setStats] = useState<SessionStats>();
const [showStats, setShowStats] = useState(false);
const [editingTitle, setEditingTitle] = useState(false);
+136 -8
View File
@@ -7,6 +7,7 @@ import { Icon } from "./Icon";
import { Spinner } from "./Activity";
import { ModelSelect } from "./ModelSelect";
import { RecreateDialog } from "./FactoryDraft";
import { ChatOverlay, openFactoryChat } from "./FactoryChat";
import { ReleaseDialog, ReleasesPanel, type ReleaseRow } from "./FactoryRelease";
interface PrInfo {
@@ -76,9 +77,21 @@ interface Issue {
pr_url: string;
branch: string;
rounds: number;
/** Newest phase chat that still exists. */
chat_session?: string;
chat_phase?: Phase;
created_at: number;
updated_at: number;
}
interface BacklogIssue {
repo: string;
number: number;
title: string;
author: string;
url: string;
allowed: boolean;
labels: string[];
}
interface Run {
id: string;
repo: string;
@@ -105,8 +118,15 @@ interface RepoInfo {
running: number;
version?: string | null;
}
interface Power {
on: boolean;
/** Agents that are working right now. */
active: number;
state: "running" | "stopping" | "stopped";
}
interface Overview {
area: boolean;
power?: Power;
repos: RepoInfo[];
issues: Issue[];
runs: Run[];
@@ -138,7 +158,7 @@ function fmtDuration(ms: number) {
const runMs = (r: Run, now: number) => (r.ended_at ?? now) - r.started_at;
/** Software factory: spec issues in Gitea are reviewed, built and accepted by agents with a model per phase. */
export function Factory({ onMenu }: { onMenu: () => void }) {
export function Factory({ onMenu, overlayId }: { onMenu: () => void; overlayId?: string }) {
const t = useT();
const [tab, setTab] = useState<"overview" | "settings">("overview");
return (
@@ -159,14 +179,33 @@ export function Factory({ onMenu }: { onMenu: () => void }) {
</div>
</div>
<div className="page">
<div className="page-inner" style={{ maxWidth: 1280 }}>
<div className="page-inner" style={{ maxWidth: tab === "overview" ? "none" : 1280 }}>
{tab === "overview" ? <FactoryOverview onSettings={() => setTab("settings")} /> : <FactorySettings />}
</div>
</div>
{overlayId && <ChatOverlay id={overlayId} />}
</>
);
}
/** The factory's main switch, coloured by state: green = running, yellow = stopping, red = stopped. */
function PowerSwitch({ power, onToggle }: { power: Power; onToggle: (on: boolean) => void }) {
const t = useT();
const label = power.state === "running" ? t("factory.power.running") : power.state === "stopping" ? t("factory.power.stopping", { n: power.active }) : t("factory.power.stopped");
const hint = power.on ? t("factory.power.stopHint") : t("factory.power.startHint");
return (
<button type="button" role="switch" aria-checked={power.on} className={`factory-power ${power.state}`} onClick={() => onToggle(!power.on)} title={hint}>
<span className="factory-power-track">
<span className="factory-power-knob" />
</span>
<span className="factory-power-text">
<b>{label}</b>
<span className="hint">{hint}</span>
</span>
</button>
);
}
function FactoryOverview({ onSettings }: { onSettings: () => void }) {
const t = useT();
const [data, setData] = useState<Overview>();
@@ -188,10 +227,21 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
const [busy, setBusy] = useState(false);
const [recreate, setRecreate] = useState(false);
const reload = () =>
get<Overview>("/factory/overview")
const [backlog, setBacklog] = useState<BacklogIssue[]>([]);
const [backlogErrors, setBacklogErrors] = useState<string[]>([]);
const loadBacklog = (refresh = false) =>
get<{ issues: BacklogIssue[]; errors: string[] }>(`/factory/backlog${refresh ? "?refresh=1" : ""}`)
.then((r) => {
setBacklog(r.issues);
setBacklogErrors(r.errors);
})
.catch(() => {});
const reload = () => {
void loadBacklog();
return get<Overview>("/factory/overview")
.then(setData)
.catch((e) => toast(e.message));
};
useEffect(() => {
void reload();
const h = setInterval(() => {
@@ -263,6 +313,24 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
};
const issues = useMemo(() => (data?.issues ?? []).filter((i) => !repo || i.repo === repo), [data, repo]);
const backlogShown = useMemo(() => backlog.filter((i) => !repo || i.repo === repo), [backlog, repo]);
/** Put backlog issues into the process (they get the factory label on the forge). */
const enqueue = async (items: BacklogIssue[]) => {
if (items.length === 0) return;
if (items.length > 1 && !(await confirmDialog({ message: t("factory.backlog.allConfirm", { n: items.length }), confirmLabel: t("factory.backlog.queueAll") }))) return;
setBusy(true);
try {
for (const r of [...new Set(items.map((i) => i.repo))]) {
const res = await post<{ queued: number[]; errors: { number: number; error: string }[] }>("/factory/backlog/enqueue", { repo: r, numbers: items.filter((i) => i.repo === r).map((i) => i.number) });
for (const e of res.errors) toast(`#${e.number}: ${e.error}`);
}
} catch (e: any) {
toast(e.message);
}
setBusy(false);
await loadBacklog(true);
await reload();
};
const runs = useMemo(() => (data?.runs ?? []).filter((r) => !repo || r.repo === repo), [data, repo]);
const selected = issues.find((i) => `${i.repo}#${i.number}` === sel);
const [pr, setPr] = useState<PrInfo | null>(null);
@@ -379,10 +447,21 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
}
};
const phaseRunning = !!selected && ["review", "building", "testing"].includes(selected.state);
/** Master switch: a soft stop – no new agent starts, running ones finish their phase. */
const setPower = async (on: boolean) => {
try {
const power = await post<Power>("/factory/power", { on });
setData((d) => (d ? { ...d, power } : d));
void reload();
} catch (e: any) {
toast(e.message);
}
};
return (
<>
{!data.area && <div className="notice err">{t("factory.noArea")}</div>}
{data.power && <PowerSwitch power={data.power} onToggle={(on) => void setPower(on)} />}
<div className="kpis">
<div className="kpi">
<div className="k-label">{t("factory.kpi.running")}</div>
@@ -462,6 +541,31 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
</div>
<div className="factory-board">
<div className="factory-col backlog">
<h4>
{t("factory.col.backlog")} <span className="chip">{backlogShown.length}</span>
</h4>
{backlogShown.length > 1 && (
<button className="small" onClick={() => void enqueue(backlogShown.filter((i) => i.allowed))} disabled={busy || !backlogShown.some((i) => i.allowed)} title={t("factory.backlog.queueAllHint")}>
<Icon name="plus" /> {t("factory.backlog.queueAll")}
</button>
)}
{backlogShown.map((i) => (
<div key={`${i.repo}#${i.number}`} className="factory-card backlog">
<span className="hint">
{repoName(i.repo)} #{i.number} · {i.author}
</span>
<a href={i.url || issueUrl(i.repo, i.number)} target="_blank" rel="noreferrer" title={i.title}>
<b>{i.title || `#${i.number}`}</b>
</a>
<button className="small" onClick={() => void enqueue([i])} disabled={busy || !i.allowed} title={i.allowed ? t("factory.backlog.queueHint") : t("factory.backlog.notAllowed", { user: i.author })}>
<Icon name="plus" /> {t("factory.backlog.queue")}
</button>
</div>
))}
{backlogShown.length === 0 && <span className="hint">{t("factory.backlog.empty")}</span>}
{backlogErrors.length > 0 && <span className="hint" title={backlogErrors.join("\n")}>{t("factory.backlog.error")}</span>}
</div>
{COLUMNS.map((c) => {
const cards = issues.filter((i) => c.states.includes(i.state));
return (
@@ -475,9 +579,33 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
const latest = active ?? rs[0];
const tokens = rs.reduce((a, r) => a + r.input_tokens + r.output_tokens, 0);
return (
<button key={`${i.repo}#${i.number}`} className={`factory-card ${sel === `${i.repo}#${i.number}` ? "active" : ""} ${active ? "running" : ""}`} onClick={() => setSel(sel === `${i.repo}#${i.number}` ? "" : `${i.repo}#${i.number}`)}>
<span className="hint">
{repoName(i.repo)} #{i.number}
<button key={`${i.repo}#${i.number}`} data-state={i.state} className={`factory-card ${sel === `${i.repo}#${i.number}` ? "active" : ""} ${active ? "running" : ""}`} onClick={() => setSel(sel === `${i.repo}#${i.number}` ? "" : `${i.repo}#${i.number}`)}>
<span className="factory-card-head">
<span className="hint">
{repoName(i.repo)} #{i.number}
</span>
{i.chat_session && (
<span
role="link"
tabIndex={0}
className="factory-open"
title={`${t("factory.openChat")}: ${t(`factory.phase.${i.chat_phase ?? "review"}` as any)}`}
aria-label={t("factory.openChat")}
onClick={(e) => {
e.stopPropagation();
openFactoryChat(i.chat_session!);
}}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
e.stopPropagation();
openFactoryChat(i.chat_session!);
}
}}
>
<Icon name="eye" />
</span>
)}
</span>
<b>{i.title || `#${i.number}`}</b>
{latest && (
@@ -614,7 +742,7 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
</td>
<td>{fmtCost(r.cost, "USD")}</td>
<td>
<button className="small" onClick={() => navigate(`/s/${r.session_id}`)}>
<button className="small" onClick={() => openFactoryChat(r.session_id)}>
<Icon name="eye" /> {t("factory.openChat")}
</button>
</td>
+47
View File
@@ -0,0 +1,47 @@
import { useEffect } from "react";
import { navigate } from "../router";
import { useT } from "../i18n";
import { ChatView } from "./ChatView";
import { Icon } from "./Icon";
/** Desktop only: chats of the factory open over the board and are closed with one click. */
export const isDesktop = () => window.matchMedia("(min-width: 801px)").matches;
/** Open the chat of a phase: in the overlay on the desktop, as a page on small screens. */
export function openFactoryChat(sessionId: string) {
navigate(isDesktop() ? `/factory/s/${sessionId}` : `/s/${sessionId}`);
}
export function ChatOverlay({ id }: { id: string }) {
const t = useT();
const close = () => navigate("/factory");
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
// Esc closes – unless it is meant for a field, a dialog or the image viewer on top.
const el = document.activeElement;
const typing = el instanceof HTMLTextAreaElement || el instanceof HTMLInputElement || el instanceof HTMLSelectElement;
if (e.key === "Escape" && !typing && !document.querySelector(".modal-backdrop, .viewer-overlay")) close();
};
window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey);
}, []);
return (
<div className="chat-overlay" onMouseDown={(e) => e.target === e.currentTarget && close()}>
<div className="chat-overlay-box" role="dialog" aria-modal="true">
<div className="chat-overlay-bar">
<span className="hint">{t("factory.chatOverlay")}</span>
<span className="spacer" />
<button className="small" onClick={() => navigate(`/s/${id}`)} title={t("factory.openFullHint")}>
<Icon name="external" /> {t("factory.openFull")}
</button>
<button className="small" onClick={close} aria-label={t("common.close")}>
<Icon name="close" /> {t("common.close")}
</button>
</div>
<div className="chat-overlay-body">
<ChatView key={id} sessionId={id} onMenu={close} />
</div>
</div>
</div>
);
}
+17
View File
@@ -1226,6 +1226,23 @@ export const de: Messages = {
"factory.repoLine": "{n} Issues · {run} laufen",
"factory.noToken": "kein Token",
"factory.pollNow": "Jetzt prüfen",
"factory.backlog.queue": "Einreihen",
"factory.backlog.queueAll": "Alle einreihen",
"factory.backlog.queueHint": "Dem Issue das Factory-Label geben, damit es in den Prozess kommt",
"factory.backlog.queueAllHint": "Alle Issues dieser Liste einreihen",
"factory.backlog.allConfirm": "{n} Issues einreihen? Sie bekommen das Factory-Label im Forge und werden nacheinander geprüft.",
"factory.backlog.notAllowed": "{user} darf keine Factory-Issues anlegen (Repository-Einstellungen → erlaubte Nutzer)",
"factory.backlog.empty": "Keine offenen Issues außerhalb der Factory",
"factory.backlog.error": "Der Forge konnte für einige Projekte nicht gelesen werden",
"factory.col.backlog": "Backlog",
"factory.chatOverlay": "Chat der Factory",
"factory.openFull": "Als Seite öffnen",
"factory.openFullHint": "Den Chat im ganzen Fenster öffnen",
"factory.power.running": "Factory läuft",
"factory.power.stopping": "Factory stoppt – {n} Agent(en) arbeiten noch",
"factory.power.stopped": "Factory gestoppt",
"factory.power.stopHint": "Klicken zum Stoppen: keine neuen Agenten, laufende werden fertig",
"factory.power.startHint": "Klicken, um die Factory zu starten",
"factory.col.review": "Prüfung",
"factory.col.question": "Rückfragen",
"factory.col.approved": "Freigegeben",
+17
View File
@@ -1225,6 +1225,23 @@ export const en = {
"factory.repoLine": "{n} issues · {run} running",
"factory.noToken": "no token",
"factory.pollNow": "Check now",
"factory.backlog.queue": "Queue",
"factory.backlog.queueAll": "Queue all",
"factory.backlog.queueHint": "Give the issue the factory label so that it enters the process",
"factory.backlog.queueAllHint": "Queue all issues of this list",
"factory.backlog.allConfirm": "Queue {n} issues? They get the factory label on the forge and are reviewed one after another.",
"factory.backlog.notAllowed": "{user} is not allowed to file factory issues (repository settings → allowed users)",
"factory.backlog.empty": "No open issues outside the factory",
"factory.backlog.error": "The forge could not be read for some projects",
"factory.col.backlog": "Backlog",
"factory.chatOverlay": "Chat of the factory",
"factory.openFull": "Open as page",
"factory.openFullHint": "Open the chat in the full window",
"factory.power.running": "Factory running",
"factory.power.stopping": "Factory stopping – {n} agent(s) still working",
"factory.power.stopped": "Factory stopped",
"factory.power.stopHint": "Click to stop: no new agents start, running ones finish",
"factory.power.startHint": "Click to start the factory",
"factory.col.review": "Review",
"factory.col.question": "Questions",
"factory.col.approved": "Approved",
+197
View File
@@ -5107,6 +5107,203 @@ td.fold-indent {
border-radius: 8px;
padding: 8px 10px;
}
/* A faint tint by status, also on the border; --tone is set per state. */
.factory-card[data-state] {
--tone: var(--muted);
border-color: color-mix(in srgb, var(--tone) 50%, var(--bg2));
background: color-mix(in srgb, var(--tone) 7%, var(--bg0));
}
.factory-card[data-state="new"],
.factory-card[data-state="review"] {
--tone: var(--aqua);
}
.factory-card[data-state="question"] {
--tone: var(--accent);
}
.factory-card[data-state="approved"] {
--tone: var(--blue);
}
.factory-card[data-state="building"],
.factory-card[data-state="rework"] {
--tone: var(--purple);
}
.factory-card[data-state="qa"],
.factory-card[data-state="testing"] {
--tone: var(--accent2);
}
.factory-card[data-state="failed"],
.factory-card[data-state="rejected"] {
--tone: var(--red);
}
.factory-card[data-state="done"] {
--tone: var(--green);
}
.factory-card.backlog {
gap: 4px;
border-style: dashed;
color: inherit;
}
.factory-card.backlog {
min-width: 0;
max-width: 100%;
}
.factory-card.backlog a {
display: block;
max-width: 100%;
color: inherit;
text-decoration: none;
/* The title is one line; the full text is in the tooltip. */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.factory-card.backlog .hint {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The backlog column is twice as wide as the others. */
.factory-col.backlog {
grid-column: span 2;
min-width: 0;
}
/* Main switch of the factory. The colours come from the theme (--power-on / -warn / -off). */
.factory-power {
--tone: var(--power-off, var(--red));
display: flex;
align-items: center;
gap: 14px;
width: 100%;
margin: 0 0 12px;
padding: 10px 16px;
text-align: left;
color: var(--fg0);
background: color-mix(in srgb, var(--tone) 18%, var(--bg1));
border: 2px solid var(--tone);
border-radius: 12px;
cursor: pointer;
transition: background 0.25s, border-color 0.25s;
}
.factory-power.running {
--tone: var(--power-on, var(--green));
}
.factory-power.stopping {
--tone: var(--power-warn, var(--accent));
}
.factory-power.stopped {
--tone: var(--power-off, var(--red));
}
.factory-power:hover {
background: color-mix(in srgb, var(--tone) 26%, var(--bg1));
}
.factory-power-track {
position: relative;
flex: none;
width: 52px;
height: 28px;
border-radius: 14px;
background: var(--tone);
transition: background 0.25s;
}
.factory-power-knob {
position: absolute;
top: 3px;
left: 3px;
width: 22px;
height: 22px;
border-radius: 50%;
background: var(--bg0);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
transition: transform 0.2s;
}
/* on = knob right; stopping is still "off" but pulses until the last agent is done */
.factory-power.running .factory-power-knob {
transform: translateX(24px);
}
.factory-power.stopping .factory-power-track {
animation: factory-pulse 1.4s ease-in-out infinite;
}
.factory-power-text {
display: flex;
flex-direction: column;
gap: 1px;
}
.factory-power-text b {
font-size: 15px;
}
/* Chats of the factory open over the board. */
.chat-overlay {
position: fixed;
inset: 0;
z-index: 25;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
padding: 3vh 3vw;
}
.chat-overlay-box {
width: min(1200px, 100%);
height: 100%;
background: var(--bg0);
border: 1px solid var(--bg2);
border-radius: 12px;
box-shadow: var(--shadow, 0 12px 40px rgba(0, 0, 0, 0.45));
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-overlay-bar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: var(--bg1);
border-bottom: 1px solid var(--bg2);
}
.chat-overlay-body {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
@media (max-width: 800px) {
.chat-overlay {
padding: 0;
}
.chat-overlay-box {
border-radius: 0;
border: 0;
}
}
.factory-card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
width: 100%;
}
.factory-open {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 6px;
color: var(--muted);
cursor: pointer;
}
.factory-open:hover,
.factory-open:focus-visible {
color: var(--fg0);
background: var(--bg2);
}
.factory-open .icon {
width: 15px;
height: 15px;
}
.factory-card.active {
border-color: var(--accent);
}
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #1c1b1f;
--red: #c15c46;
--green: #8f9a5c;
/* Factory master switch: running / stopping / stopped */
--power-on: #8f9a5c;
--power-warn: #d9b45a;
--power-off: #c15c46;
--aqua: #8aa89a;
--blue: #7c9aa1;
--purple: #b47e99;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #96392a;
--green: #5c6631;
/* Factory master switch: running / stopping / stopped */
--power-on: #5c6631;
--power-warn: #9a7413;
--power-off: #96392a;
--aqua: #3d6b72;
--blue: #3d6b72;
--purple: #7c4a66;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #1e1e2e;
--red: #f38ba8;
--green: #a6e3a1;
/* Factory master switch: running / stopping / stopped */
--power-on: #a6e3a1;
--power-warn: #f9e2af;
--power-off: #f38ba8;
--aqua: #94e2d5;
--blue: #89b4fa;
--purple: #f5c2e7;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #d20f39;
--green: #40a02b;
/* Factory master switch: running / stopping / stopped */
--power-on: #40a02b;
--power-warn: #df8e1d;
--power-off: #d20f39;
--aqua: #179299;
--blue: #1e66f5;
--purple: #ea76cb;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #1d150f;
--red: #d78a6f;
--green: #b5b27a;
/* Factory master switch: running / stopping / stopped */
--power-on: #a9b86a;
--power-warn: #e8c36a;
--power-off: #d4694f;
--aqua: #9fb8a8;
--blue: #a3b4c7;
--purple: #cf90a2;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #a4405e;
--green: #4f6b00;
/* Factory master switch: running / stopping / stopped */
--power-on: #4f6b00;
--power-warn: #a8780a;
--power-off: #a93a2e;
--aqua: #3f6b5e;
--blue: #8e2d53;
--purple: #7a003b;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #282a36;
--red: #ff5555;
--green: #50fa7b;
/* Factory master switch: running / stopping / stopped */
--power-on: #50fa7b;
--power-warn: #f1fa8c;
--power-off: #ff5555;
--aqua: #8be9fd;
--blue: #8be9fd;
--purple: #ff79c6;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #cb3a2a;
--green: #14710a;
/* Factory master switch: running / stopping / stopped */
--power-on: #14710a;
--power-warn: #846e15;
--power-off: #cb3a2a;
--aqua: #036a96;
--blue: #036a96;
--purple: #a3144d;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #2d353b;
--red: #e67e80;
--green: #a7c080;
/* Factory master switch: running / stopping / stopped */
--power-on: #a7c080;
--power-warn: #dbbc7f;
--power-off: #e67e80;
--aqua: #83c092;
--blue: #7fbbb3;
--purple: #d699b6;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #2d353b;
--red: #f85552;
--green: #8da101;
/* Factory master switch: running / stopping / stopped */
--power-on: #8da101;
--power-warn: #dfa000;
--power-off: #f85552;
--aqua: #35a77c;
--blue: #3a94c5;
--purple: #df69ba;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #0d1117;
--red: #f85149;
--green: #3fb950;
/* Factory master switch: running / stopping / stopped */
--power-on: #3fb950;
--power-warn: #d29922;
--power-off: #f85149;
--aqua: #39c5cf;
--blue: #58a6ff;
--purple: #bc8cff;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #d1242f;
--green: #1a7f37;
/* Factory master switch: running / stopping / stopped */
--power-on: #1a7f37;
--power-warn: #9a6700;
--power-off: #d1242f;
--aqua: #1b7c83;
--blue: #0969da;
--purple: #8250df;
+4
View File
@@ -22,6 +22,10 @@
--on-accent: #282828;
--red: #fb4934;
--green: #b8bb26;
/* Factory master switch: running / stopping / stopped */
--power-on: #b8bb26;
--power-warn: #fabd2f;
--power-off: #fb4934;
--aqua: #8ec07c;
--blue: #83a598;
--purple: #d3869b;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #282828;
--red: #9d0006;
--green: #79740e;
/* Factory master switch: running / stopping / stopped */
--power-on: #79740e;
--power-warn: #b57614;
--power-off: #9d0006;
--aqua: #427b58;
--blue: #076678;
--purple: #8f3f71;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #1b1b1b;
--red: #f44336;
--green: #a99b7a;
/* Factory master switch: running / stopping / stopped */
--power-on: #8fae72;
--power-warn: #e0b350;
--power-off: #f44336;
--aqua: #8a9ba6;
--blue: #77838a;
--purple: #e58980;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #b14752;
--green: #556753;
/* Factory master switch: running / stopping / stopped */
--power-on: #5a7a43;
--power-warn: #a87b1a;
--power-off: #b14752;
--aqua: #3d727d;
--blue: #4c6c94;
--purple: #8a5b81;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #1f1f28;
--red: #e46876;
--green: #98bb6c;
/* Factory master switch: running / stopping / stopped */
--power-on: #98bb6c;
--power-warn: #e6c384;
--power-off: #e46876;
--aqua: #7aa89f;
--blue: #7fb4ca;
--purple: #957fb8;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #c84053;
--green: #6f894e;
/* Factory master switch: running / stopping / stopped */
--power-on: #6f894e;
--power-warn: #b07a00;
--power-off: #c84053;
--aqua: #597b75;
--blue: #4d699b;
--purple: #624c83;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #2e3440;
--red: #bf616a;
--green: #a3be8c;
/* Factory master switch: running / stopping / stopped */
--power-on: #a3be8c;
--power-warn: #ebcb8b;
--power-off: #bf616a;
--aqua: #8fbcbb;
--blue: #81a1c1;
--purple: #b48ead;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #a9434d;
--green: #5f7d48;
/* Factory master switch: running / stopping / stopped */
--power-on: #5f7d48;
--power-warn: #9a7b2f;
--power-off: #a9434d;
--aqua: #4d8a89;
--blue: #5e81ac;
--purple: #8f6a8a;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #282c34;
--red: #e06c75;
--green: #98c379;
/* Factory master switch: running / stopping / stopped */
--power-on: #98c379;
--power-warn: #e5c07b;
--power-off: #e06c75;
--aqua: #56b6c2;
--blue: #61afef;
--purple: #c678dd;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #e45649;
--green: #50a14f;
/* Factory master switch: running / stopping / stopped */
--power-on: #50a14f;
--power-warn: #c18401;
--power-off: #e45649;
--aqua: #0184bc;
--blue: #4078f2;
--purple: #a626a4;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #191724;
--red: #eb6f92;
--green: #9ccfd8;
/* Factory master switch: running / stopping / stopped */
--power-on: #95b88f;
--power-warn: #f6c177;
--power-off: #eb6f92;
--aqua: #9ccfd8;
--blue: #31748f;
--purple: #c4a7e7;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #b4637a;
--green: #56949f;
/* Factory master switch: running / stopping / stopped */
--power-on: #5e8f60;
--power-warn: #c98a1b;
--power-off: #b4637a;
--aqua: #56949f;
--blue: #286983;
--purple: #907aa9;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #002b36;
--red: #dc322f;
--green: #859900;
/* Factory master switch: running / stopping / stopped */
--power-on: #859900;
--power-warn: #b58900;
--power-off: #dc322f;
--aqua: #2aa198;
--blue: #268bd2;
--purple: #6c71c4;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #002b36;
--red: #dc322f;
--green: #859900;
/* Factory master switch: running / stopping / stopped */
--power-on: #859900;
--power-warn: #b58900;
--power-off: #dc322f;
--aqua: #2aa198;
--blue: #268bd2;
--purple: #6c71c4;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #232a44;
--red: #d47a6a;
--green: #96b4bc;
/* Factory master switch: running / stopping / stopped */
--power-on: #8fb98a;
--power-warn: #e0b860;
--power-off: #d47a6a;
--aqua: #96b4bc;
--blue: #7aa0cc;
--purple: #c896b2;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #f0ead9;
--red: #8a3028;
--green: #4a5a3a;
/* Factory master switch: running / stopping / stopped */
--power-on: #4a6b3a;
--power-warn: #9a7218;
--power-off: #8a3028;
--aqua: #3a5a6a;
--blue: #3a5a8a;
--purple: #5a4a72;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #24283b;
--red: #f7768e;
--green: #9ece6a;
/* Factory master switch: running / stopping / stopped */
--power-on: #9ece6a;
--power-warn: #e0af68;
--power-off: #f7768e;
--aqua: #73daca;
--blue: #7aa2f7;
--purple: #bb9af7;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #f52a65;
--green: #587539;
/* Factory master switch: running / stopping / stopped */
--power-on: #587539;
--power-warn: #8c6c3e;
--power-off: #f52a65;
--aqua: #118c74;
--blue: #2e7de9;
--purple: #9854f1;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #f14c4c;
--green: #89d185;
/* Factory master switch: running / stopping / stopped */
--power-on: #89d185;
--power-warn: #cca700;
--power-off: #f14c4c;
--aqua: #4ec9b0;
--blue: #3794ff;
--purple: #c586c0;
+4
View File
@@ -21,6 +21,10 @@
--on-accent: #ffffff;
--red: #cd3131;
--green: #388a34;
/* Factory master switch: running / stopping / stopped */
--power-on: #388a34;
--power-warn: #bf8803;
--power-off: #cd3131;
--aqua: #267f99;
--blue: #005fb8;
--purple: #af00db;
+16
View File
@@ -3,6 +3,22 @@
* under "unreleased"; scripts/release.sh renames the key to the release version.
*/
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
"202611-00071": {
en: ["Unsent messages are saved per chat and can be continued on another device (web and terminal client)", "Factory: main switch (green running, yellow stopping, red stopped) with a soft stop – running agents finish", "Factory: chats open in an overlay on the desktop; every issue card has an open-chat button; the overview uses the full width"],
de: ["Ungesendete Nachrichten werden pro Chat gespeichert und lassen sich auf einem anderen Gerät fortsetzen (Web und Terminal-Client)", "Factory: Hauptschalter (grün läuft, gelb stoppt, rot gestoppt) mit sanftem Stopp – laufende Agenten werden fertig", "Factory: Chats öffnen auf dem Desktop in einem Overlay; jede Issue-Karte hat einen Chat-Knopf; die Übersicht nutzt die volle Breite"],
},
"202611-00070": {
en: ["Factory backlog: wider column, titles on one line"],
de: ["Factory-Backlog: breitere Spalte, Titel einzeilig"],
},
"202611-00069": {
en: ["Factory: backlog column with all open issues of the forge – queue them into the process with one click", "Factory: issue cards are faintly tinted by status, including the border"],
de: ["Factory: Backlog-Spalte mit allen offenen Issues des Forges – mit einem Klick in den Prozess einreihen", "Factory: Issue-Karten sind dezent nach Status eingefärbt, auch der Rahmen"],
},
"202611-00068": {
en: ["Test runner: \"isolated\": false in .factory/setup.json for apps that cannot run in a container"],
de: ["Test-Runner: \"isolated\": false in .factory/setup.json für Apps, die nicht im Container laufen können"],
},
"202611-00067": {
en: ["Factory: acceptance runs can use throw-away containers (optional test runner service) for the app and helper services such as a database"],
de: ["Factory: Abnahmeläufe können Wegwerf-Container nutzen (optionaler Test-Runner-Dienst) für die App und Hilfsdienste wie eine Datenbank"],