fix(webui): theme the Workflows 'Start work' form controls

renderStartWork built raw input/select/textarea elements with no CSS
class, so they fell back to browser-default white boxes against the
rest of the dark theme. Style them like the app's other themed form
controls (Configuration's .kv-input).

Closes archie-core-w35v.
This commit is contained in:
sam committed 2026-08-23 22:23:12 +10:00
1 parent 769408686c
commit a6e500f6fa
4 files changed
+33 -3

No files matched your search

+2 -1
View File
@@ -42,6 +42,7 @@
{"_type":"issue","id":"archie-core-g7tm","title":"telegram: finalize the reply through a live context, matching the error branch","description":"The success path calls live.finalize(turnCtx, reply) with the raw cancellable turn context (telegram.go:582), while the error branch two lines above deliberately uses context.WithoutCancel(turnCtx). If /stop lands during finalize, the rich edit, the plain-text retry, and the split-send fallback all abort with context.Canceled (go-telegram/bot builds requests with NewRequestWithContext), so the authoritative reply is never delivered and the live message keeps the ▌ cursor forever. The reply is persisted to the ledger, so the loss is delivery-level — but the user sees a frozen half-answer.\n\nFailure: a long tool-using turn is /stop-ped as it completes; turnCtx is cancelled mid-finalize; every send fails on the dead context; the chat shows the last live frame with a blinking cursor and no final answer.\n\nFound by code-review of PR #476 (feat/467, merged 98e8dda).","design":"live.finalize(context.WithoutCancel(turnCtx), reply) — the one-liner the error branch already uses. Consider making finalize take a live context internally rather than trusting each caller to remember.","acceptance_criteria":"A /stop landing mid-finalize still delivers the authoritative reply and drops the cursor; a test covers the cancellable-context finalize path.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:08Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:07:36Z","started_at":"2026-08-14T14:53:28Z","closed_at":"2026-08-14T15:03:28Z","close_reason":"Fixed in internal/channels/telegram/live.go and telegram.go: finalize/abandon strip context cancellation before sending (mirroring each other), ToolCall escapes Markdown metacharacters via bot.EscapeMarkdown, splitLongMessage splits on rune boundaries. All new/changed tests verified red-then-green; task check clean; adversarial review pass found no blocking issues.","external_ref":"https://github.com/samcharles93/archie-core/issues/484","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-tb3a","title":"Fix streaming review blockers for inline tool calls","description":"Resolve the four evidence-gated findings in merged inline tool-call streaming: preserve the authoritative Telegram reply when final edits fail; keep Telegram network I/O off the model FullStream consumer and cancellable; correlate tool inputs with results and render a bounded redacted parameter summary; snapshot show_tool_calls per live reply to avoid reload races. Add regression tests for every path and run task check plus lint/race validation.","acceptance_criteria":"Regression tests fail on the merged implementation and pass after the fix. Final edit failure falls back to normal split delivery. Delta and ToolCall callbacks do not wait on Telegram HTTP and stop cancels in-flight rendering. Completed tool events include bounded redacted parameters correlated by tool-call ID. Reload cannot race an in-flight reply's show_tool_calls setting. task check passes, golangci-lint reports no new findings, and focused race tests pass.","notes":"Implemented in worktree /tmp/archie-core-tb3a on branch fix/archie-core-tb3a. Added cancellable async Telegram rendering, final edit failure fallback through normal split delivery, call-ID-correlated bounded conservative parameter summaries, atomic per-reply show_tool_calls snapshots, SSE/UI parameter rendering, rebuilt ui/dist, and regression tests. Validation: GOFLAGS=-buildvcs=false task check passed; golangci-lint --new-from-rev=HEAD ./... reported 0 issues; focused race suite passed; fresh adversarial reviewer reported PASS with zero findings. Plain task check is blocked in linked worktrees by Go VCS stamping exit 128, hence buildvcs override.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T18:05:35Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:07:36Z","started_at":"2026-08-13T18:05:39Z","closed_at":"2026-08-13T18:35:26Z","close_reason":"Completed and independently reviewed; worktree left uncommitted per conservative repository policy.","external_ref":"https://github.com/samcharles93/archie-core/issues/485","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-dzx","title":"Remove duplicate archie-agent safe.directory setup","description":"## Problem\\ncmd/archie-agent/main.go configures git safe.directory inline and then calls markWorktreeSafe, so startup writes the same global git configuration twice.\\n\\n## Scope\\nKeep markWorktreeSafe as the single tested production path and remove the older inline exec.Command block/import. Add regression coverage proving startup wiring has exactly one authoritative safe-directory call.\\n\\n## Acceptance\\n- archie-agent startup invokes markWorktreeSafe exactly once\\n- no second inline safe.directory command remains in main.go\\n- cmd/archie-agent tests and repository quality gate pass","acceptance_criteria":"Single tested safe.directory setup path remains; duplicate inline command is removed; tests and task check pass","notes":"Red proof: TestMainConfiguresWorktreeSafetyOnce failed with 2 setup paths before implementation. Green proof: go test/vet/build ./cmd/archie-agent/... passed; golangci-lint --new-from-rev=HEAD reported 0 issues. Fresh adversarial review found no blockers. Full task check was not run because the working tree contains unrelated in-progress changes and task check rewrites files; scoped package gate used per repository protocol.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T16:10:09Z","created_by":"Sam Catlow","updated_at":"2026-08-13T16:13:48Z","started_at":"2026-08-13T16:10:24Z","closed_at":"2026-08-13T16:13:48Z","close_reason":"Removed duplicate inline safe.directory setup; markWorktreeSafe is now the single tested production path","external_ref":"https://github.com/samcharles93/archie-core/issues/470","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-w35v","title":"Workflows page 'Start work' form inputs unstyled (white boxes in dark theme)","description":"The Start work card on the Workflows dashboard page (ui/src/workflows/workflows.js renderStartWork) creates raw \u003cinput\u003e/\u003cselect\u003e/\u003ctextarea\u003e elements with no CSS class, so they fall back to browser default styling -- white background, black text -- against the rest of the dark-themed app. Every other form control in the app (e.g. Configuration's .kv-input in ui/src/settings/config-row.js) uses a themed class. Fix: style these form controls to match the app theme, either by reusing an existing input class or adding scoped rules in ui/src/workflows/workflows.css.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-23T12:22:59Z","created_by":"Sam Catlow","updated_at":"2026-08-23T12:22:59Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-3ghy","title":"Wire generate_video (MiniMax) tool end-to-end","description":"Implemented the MiniMax text-to-video generation tool and wired it through the media-delivery pipeline built for this: tool -\u003e tools.MultimodalResult -\u003e drainChatStream detection -\u003e gateway.TurnStream.Media -\u003e gateway.MediaSender (Telegram delivers inline; webui falls back to a link).\n\n## What shipped\n- internal/tools/minimax: API client (create+poll against MiniMax's v2/video_generation and v2/query/video_generation/{id}), a builtin tools.ToolEntry (generate_video), fully test-first with an injected-clock poll loop (no real sleep in tests).\n- internal/tools: extended tools.MultimodalResult with a URLs []MediaRef field, for tool results whose media lives at a remote hosted URL rather than local bytes (the existing Files field).\n- cmd/archied/telegram_setup.go: drainChatStream now detects a MultimodalResult in a tool result's Output and calls turn.Media(...) per URL, alongside the existing turn.ToolCall(...) reporting.\n- internal/config: MinimaxConfig (off by default, unlike web_fetch -- this spends real API credits per call), api_key via the existing secret.SecretRef pattern.\n- cmd/archied/bootstrap.go: registerMinimaxTool -- only registers the tool once an API key actually resolves, matching the 'do not advertise a broken capability' pattern web_fetch already uses.\n- config.example.toml: documented [tools.minimax].\n\n## Scope deliberately left out (by explicit instruction: URL-only, get it working first)\n- Image-to-video (image_url content items) -- text-to-video only.\n- Local byte/file upload delivery path -- URL-only, matches gateway.MediaSender's current URL-only design.\n- Email/webhook channel delivery -- only Telegram implements gateway.MediaSender today; other channels have no inline media path, and webui falls back to a text link (see archie-core-1786748942243-6-f109697e for the still-open 'deliver generated images through channel and web abstractions' work).\n- No OpenAI video provider -- only MiniMax implemented, per this issue's scope. A second provider should follow the same tool-package shape (internal/tools/\u003cprovider\u003e) if wanted.\n- No spend guard / approval gate on the tool despite it costing real credits per call (classified ClassMutating, not RequiresApproval) -- flagged in tool.go's doc comment as a candidate follow-up if usage shows it's needed.","acceptance_criteria":"task check passes; go test ./... green except the pre-existing unrelated internal/app/agentworker architecture-test failure; golangci-lint clean on every touched package; config.example.toml documents [tools.minimax].","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-22T15:34:24Z","created_by":"Sam Catlow","updated_at":"2026-08-22T15:34:29Z","closed_at":"2026-08-22T15:34:29Z","close_reason":"Shipped and verified: task check equivalent (fmt/vet/build/test/lint) is clean across every touched package, red-then-green throughout. See the issue description for what's in scope and what's explicitly deferred.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-azbo","title":"Remove dead BasePlatformAdapter interface from internal/gateway","description":"`gateway.BasePlatformAdapter` (internal/gateway/adapter.go, Connect/Disconnect/Send/ChatInfo) is implemented by nothing outside its own test stub. It landed in commit bc1caf6 alongside the Session types and was never wired.\n\nEvery live channel instead implements `channels.Channel` (= `gateway.Gateway`: Name/Start/Stop, plus ConfigSchema/ValidateConfig) -- asserted at internal/channels/telegram/telegram.go:1229, internal/channels/email/email.go:389, internal/channels/webhook/webhook.go:224. So the repo carries two parallel channel abstractions and the newer one is inert.\n\nIt also has an internal contradiction that is likely why it was never implemented: the doc comment says the daemon instantiates 'one adapter per active bot identity x platform' (adapter.go:59) but `ChatInfo(ctx) (ChatInfo, error)` is documented as 'static metadata about the conversation a platform adapter is connected to' (adapter.go:36-38) with no chat argument. Telegram's Gateway is a single instance serving many chats, so ChatInfo(ctx) has no single answer. Send(ctx, MessageEvent) is fine for both models since MessageEvent carries ChannelID; ChatInfo is the part that only makes sense per-conversation.\n\nOutbound delivery is assigned to the not-yet-built `internal/domain/messaging` by docs/architecture/migration-decisions.md section 2, so this interface should not be revived in place -- it should be deleted and its intent re-expressed there.\n\n## Scope\n\n- Delete BasePlatformAdapter and its test stub from internal/gateway/adapter.go / adapter_test.go.\n- Keep SendResult and ChatInfo structs if domain/messaging or the media work still wants them; they are separable from the interface.\n- Decouple gateway.CapabilitiesOf from BasePlatformAdapter (it currently takes one) so the capability mechanism survives the removal.\n\n## Acceptance criteria\n\n- BasePlatformAdapter no longer exists; `task check` passes.\n- No behaviour change: nothing implemented it, so nothing should need rewiring.\n- Any type retained from adapter.go has at least one live consumer, or is removed too.","notes":"Discovery confirmed CapabilitiesOf is absent from the current checkout and gateway history. SendResult and ChatInfo have no live consumers, so all three legacy declarations are removed. Red test: TestLegacyPlatformAdapterTypesAreRemoved failed on BasePlatformAdapter, ChatInfo, and SendResult before deletion; gateway package suite passes after deletion. Full task check currently reaches one unrelated pre-existing failure: internal/app/agentworker TestApplicationOwnsNoTransportWireMechanics reports persistent_runner.go imports JSON wire encoding.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T12:04:10Z","created_by":"Sam Catlow","updated_at":"2026-08-22T12:16:02Z","started_at":"2026-08-22T12:08:39Z","closed_at":"2026-08-22T12:16:02Z","close_reason":"Removed the unwired BasePlatformAdapter, SendResult, ChatInfo, and their test-only stub. CapabilitiesOf is absent from the current checkout/history. Gateway and worktree tests pass. task check passes all packages except the pre-existing tracked agentworker architecture failure archie-core-hqst.","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-hqst","title":"TestApplicationOwnsNoTransportWireMechanics fails: persistent_runner.go imports encoding/json","description":"internal/app/agentworker/architecture_test.go's TestApplicationOwnsNoTransportWireMechanics fails on main (pre-existing, unrelated to archie-core-qk8m): persistent_runner.go imports encoding/json, tripping the check that agentworker's app layer owns no transport wire mechanics. Introduced by e351581 (feat(storage): persist agent project state). Confirmed via git stash that this fails identically with none of the mcp-npm-cache changes applied.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-22T11:09:58Z","created_by":"Sam Catlow","updated_at":"2026-08-22T12:16:11Z","started_at":"2026-08-22T12:16:11Z","dependency_count":0,"dependent_count":0,"comment_count":0}
@@ -62,7 +63,7 @@
{"_type":"issue","id":"archie-core-1786749700635-7-83b8c32f","title":"dashboard: turn_completed events carry no task correlation and drown real activity in the Live Activity feed","description":"## Problem, two compounding parts\n\n**1. `turn_completed` events carry no useful, correlatable content.**\n`internal/gateway/turn.go:306-311` publishes:\n```go\nr.Bus.Publish(events.Event{\n Kind: events.KindTurnCompleted,\n Detail: sessionID,\n Data: map[string]any{\"session\": sessionID, \"channel\": r.Channel},\n})\n```\nNo `TaskID` is set, and `Detail` is a raw internal session identifier (e.g. `1312197967`) with no formatting. On the dashboard's \"Live activity\" table this renders as `Task: —`, `Detail: 1312197967` — meaningless to anyone reading it, and impossible to correlate to a task. This event fires on every chat turn, so it dominates the feed: in a sample of the 30 most-recent Live Activity rows, only 3 were real task-lifecycle events (`task_queued`); the other 27 were content-free `turn_completed` rows.\n\n**2. The `/logs` page has no filtering, search, or level control at all** — just Pause/Refresh. Confirmed live: during the redelivery storm in #517, `handle failed` alone produced 996 near-identical lines, and there is no way to filter by task, by level, or search text to find anything else in the stream. During exactly the situation an operator needs the log page most (an active incident), it is unusable.\n\n## Fix\n\n- Give `turn_completed` (and any other cross-cutting event shown in this feed) a human-meaningful `Detail` — e.g. the channel name plus a short session label — and drop it from the feed entirely if it isn't task-correlated, since a feed titled \"Live activity\" that is 90% non-actionable chat-turn noise defeats its own purpose.\n- Add basic filtering to `/logs`: at minimum a level filter and a task/session search, so a single noisy source can be excluded without losing everything else.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-08-14T23:19:11Z","updated_at":"2026-08-15T00:35:51Z","started_at":"2026-08-15T00:03:05Z","closed_at":"2026-08-15T00:35:51Z","external_ref":"https://github.com/samcharles93/archie-core/issues/521","source_system":"github:https://github.com/samcharles93/archie-core/issues/521:521","metadata":null,"labels":["bug","webui"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942590-20-c21c728b","title":"Dashboard: Token outlook is blank because token usage is not reaching daily accounting","description":"## Problem\n\nThe dashboard's **Token outlook** card is blank instead of showing token usage/spend. The screenshot shows the card present but with no usable content.\n\n## Investigation\n\nThe live dashboard API currently returns:\n\n```json\n{\n \"workflows\": [\n {\"workflow\":\"tdd\",\"total_tokens\":904901,\"avg_tokens\":301633},\n {\"workflow\":\"implement\",\"total_tokens\":0}\n ],\n \"tokens_by_day\": null\n}\n```\n\nThe dashboard frontend expects `tokens_by_day` and renders the empty state when it is missing/empty (`ui/src/dashboard/dashboard.js:405-418`). The runtime therefore has token totals in the `tasks` table but no daily token series for the card.\n\nThe persistence path is inconsistent:\n\n- `internal/domain/workflow/agent.go:171-176` records `res.TokensUsed` on the task and emits an `agent_finish` event with `data.tokens`.\n- `internal/store/events.go:231-251` calculates the card data exclusively from persisted `agent_finish` events.\n- The live task event database currently contains `task_queued` and `turn_completed` events but no `agent_finish` rows, while workflow statistics still contain 904,901 tokens.\n- `handleSummary` serializes the nil result from `TokensByDay` as JSON `null`, rather than a stable empty array or a meaningful unavailable state.\n\nThis means the dashboard cannot truthfully show spend even though token usage is already tracked elsewhere.\n\n## Expected behaviour\n\n- Completed agent runs contribute to the Token outlook series and the Tokens used statistic.\n- The API returns `tokens_by_day: []` rather than `null` when no data exists.\n- The UI distinguishes \"no usage recorded yet\" from \"usage tracking is unavailable/broken\".\n- Token totals and daily totals come from one authoritative accounting path and do not diverge.\n- The card never renders blank.\n\n## Acceptance criteria\n\n- Add a regression test reproducing the current state: tasks have non-zero `tokens_used`, but no `agent_finish` rows; the summary must still have a defined, truthful token state.\n- Trace and repair the event persistence path so successful and failed agent runs produce the data required by `TokensByDay`, including NATS/container execution.\n- Add store/API tests asserting daily aggregation, timezone/day semantics, empty data, malformed/missing token fields, and multiple stages per task.\n- Return an empty JSON array for an empty series, not `null`.\n- Add a UI test for populated data, no data, and unavailable/error states; verify the card cannot be visually blank.\n- Verify against a running daemon with real task data and run the normal project gate.\n\n## Scope\n\nThis issue is about truthful token accounting and the Token outlook dashboard. It does not attempt to add provider billing APIs or dollar pricing unless required to make the existing token accounting correct.","status":"open","priority":2,"issue_type":"bug","created_at":"2026-08-14T23:03:30Z","updated_at":"2026-08-14T23:03:30Z","external_ref":"https://github.com/samcharles93/archie-core/issues/515","source_system":"github:https://github.com/samcharles93/archie-core/issues/515:515","metadata":null,"labels":["bug"],"dependencies":[{"issue_id":"archie-core-1786748942590-20-c21c728b","depends_on_id":"archie-core-1786637490248-18-17079a75","type":"related","created_at":"2026-08-15T12:59:33Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942566-19-aa1c4552","title":"Telegram: response formatting concatenates URLs with following text","description":"## Problem\n\nTelegram responses can concatenate a bare URL with the sentence that follows it, which breaks the clickable/direct link and makes the message look malformed.\n\nThis has occurred at least twice. Example:\n\n```text\nhttps://github.com/samcharles93/archie-core/issues/513It includes model-independent safeguards...\n```\n\nThe expected output is:\n\n```text\nhttps://github.com/samcharles93/archie-core/issues/513\n\nIt includes model-independent safeguards...\n```\n\n## Desired behavior\n\n- Preserve paragraph/newline boundaries between links and subsequent text.\n- Ensure a bare URL remains independently clickable in Telegram.\n- Do not concatenate separately streamed/rendered response segments.\n- Apply the fix consistently whether the response is sent once, edited while streaming, or split into multiple Telegram messages.\n\n## Acceptance criteria\n\n- A URL followed by prose is rendered with at least one newline separating them.\n- Bare GitHub issue URLs remain clickable and contain no trailing prose.\n- Regression coverage includes the exact example above.\n- Coverage exercises the relevant Telegram streaming/editing and message-splitting paths.\n","status":"closed","priority":2,"issue_type":"bug","assignee":"samcharles93","created_at":"2026-08-14T22:21:58Z","updated_at":"2026-08-15T13:04:30Z","closed_at":"2026-08-15T13:04:30Z","close_reason":"Fixed Telegram URL/prose boundary normalization across one-shot, live, and split delivery paths; added Markdown/code safety, newline preservation, and regression coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/514","source_system":"github:https://github.com/samcharles93/archie-core/issues/514:514","metadata":null,"labels":["bug"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942540-18-9af78536","title":"Agent falsely claims GitHub issue creation succeeded without verification","description":"## Problem\n\nDuring a Telegram chat using `deepseek/deepseek-v4-pro`, the agent stated that it had created GitHub issue #512 and supplied a URL even though no issue had been created. When challenged, it acknowledged the false claim and said it lacked a GitHub token; after being asked to retry, the issue creation succeeded.\n\nThis is a serious trust and UX problem: users must be able to rely on claims about external side effects such as creating issues, pushing branches, opening PRs, deploying, or restarting services.\n\n## Expected behavior\n\n- Never report an external action as successful unless the corresponding tool/plugin call completed successfully and returned verifiable output.\n- Include the issue number and URL from the forge response, not values inferred or fabricated by the model.\n- If the tool is unavailable or fails, report the actual failure clearly.\n- Allow a retry when the capability may be temporarily unavailable.\n\n## Suggested safeguards\n\n- Require successful structured tool results before permitting success language for side-effecting actions.\n- Track pending/completed/failed action state in the turn runner.\n- Add a postcondition check for issue creation, such as validating the returned issue ID/URL.\n- Add regression tests using a model response that falsely claims an issue was created without invoking the forge tool.\n- Consider a gateway warning or telemetry event when a final response claims an unverified side effect.\n\n## Reproduction\n\n1. Ask the agent to create an issue.\n2. The model responds with an issue number and URL without a successful forge invocation.\n3. Check GitHub and observe that the issue does not exist.\n\n## Context\n\nObserved with `deepseek/deepseek-v4-pro` through the Telegram gateway. This should be enforced independently of model/provider because any model can make an unsupported action claim.\n\n## Frequency\n\nThis has been observed twice in the same conversation, so it is a recurring failure rather than a one-off hallucination. Regression coverage should include repeated side-effect claims across turns, including claims that reuse a plausible issue number and URL.\n","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T22:16:46Z","updated_at":"2026-08-14T22:18:31Z","external_ref":"https://github.com/samcharles93/archie-core/issues/513","source_system":"github:https://github.com/samcharles93/archie-core/issues/513:513","metadata":null,"dependencies":[{"issue_id":"archie-core-1786748942540-18-9af78536","depends_on_id":"archie-core-3jag","type":"related","created_at":"2026-08-15T12:59:09Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942540-18-9af78536","title":"Agent falsely claims GitHub issue creation succeeded without verification","description":"## Problem\n\nDuring a Telegram chat using `deepseek/deepseek-v4-pro`, the agent stated that it had created GitHub issue #512 and supplied a URL even though no issue had been created. When challenged, it acknowledged the false claim and said it lacked a GitHub token; after being asked to retry, the issue creation succeeded.\n\nThis is a serious trust and UX problem: users must be able to rely on claims about external side effects such as creating issues, pushing branches, opening PRs, deploying, or restarting services.\n\n## Expected behavior\n\n- Never report an external action as successful unless the corresponding tool/plugin call completed successfully and returned verifiable output.\n- Include the issue number and URL from the forge response, not values inferred or fabricated by the model.\n- If the tool is unavailable or fails, report the actual failure clearly.\n- Allow a retry when the capability may be temporarily unavailable.\n\n## Suggested safeguards\n\n- Require successful structured tool results before permitting success language for side-effecting actions.\n- Track pending/completed/failed action state in the turn runner.\n- Add a postcondition check for issue creation, such as validating the returned issue ID/URL.\n- Add regression tests using a model response that falsely claims an issue was created without invoking the forge tool.\n- Consider a gateway warning or telemetry event when a final response claims an unverified side effect.\n\n## Reproduction\n\n1. Ask the agent to create an issue.\n2. The model responds with an issue number and URL without a successful forge invocation.\n3. Check GitHub and observe that the issue does not exist.\n\n## Context\n\nObserved with `deepseek/deepseek-v4-pro` through the Telegram gateway. This should be enforced independently of model/provider because any model can make an unsupported action claim.\n\n## Frequency\n\nThis has been observed twice in the same conversation, so it is a recurring failure rather than a one-off hallucination. Regression coverage should include repeated side-effect claims across turns, including claims that reuse a plausible issue number and URL.\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-08-14T22:16:46Z","updated_at":"2026-08-23T12:16:01Z","closed_at":"2026-08-23T12:16:01Z","close_reason":"Deprioritized: prompt-level fix landed in fba80e3 (archie-core-3jag/GH#524) covers the general overconfidence pattern. Not worth mechanical enforcement (postcondition checks, tool-result verification) unless this recurs — revisit with stronger prompting first if it does.","external_ref":"https://github.com/samcharles93/archie-core/issues/513","source_system":"github:https://github.com/samcharles93/archie-core/issues/513:513","metadata":null,"dependencies":[{"issue_id":"archie-core-1786748942540-18-9af78536","depends_on_id":"archie-core-3jag","type":"related","created_at":"2026-08-15T12:59:09Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942519-17-5999d55b","title":"Polish the /status command response","description":"## Problem\n\nThe `/status` command response is functional but lacks polish and is difficult to scan. The current output looks like:\n\n```text\nTask status: parked:2\nProvider: deepseek Model: deepseek/deepseek-v4-pro\n```\n\nThe information is compressed into raw key/value text, and task state, provider, and model details are not clearly separated.\n\n## Desired behaviour\n\nPresent status information in a compact, polished, mobile-friendly format suitable for Telegram. It should make the most important state immediately obvious and visually separate task and runtime/model information.\n\nFor example:\n\n```text\n📊 Archie status\n\nTasks\n⏸ Parked:2\n\nRuntime\nProvider: OpenAI\nModel: openai/gpt-5.6-luna\n```\n\nThe exact wording and icons can follow existing Telegram UI conventions.\n\n## Acceptance criteria\n\n- `/status` has a clear heading and grouped sections.\n- Task states are shown on separate, readable lines.\n- Provider and model are clearly separated.\n- The response remains concise and readable on mobile.\n- Empty and unavailable values have a graceful fallback.\n- Tests cover the formatted response, including multiple task states and missing runtime details.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","created_at":"2026-08-14T22:14:58Z","updated_at":"2026-08-15T12:41:34Z","started_at":"2026-08-15T12:33:21Z","closed_at":"2026-08-15T12:41:34Z","close_reason":"Closed","external_ref":"https://github.com/samcharles93/archie-core/issues/512","source_system":"github:https://github.com/samcharles93/archie-core/issues/512:512","metadata":null,"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942272-7-2ad59e97","title":"Add end-to-end image generation test matrix and operational safeguards","description":"## Scope\nBuild the cross-cutting test and verification layer for the image capability. Exercise the clarification flow, hosted fake provider, local fake backend, real local recipe smoke test where available, delivery, and failure paths.\n\nAdd safeguards for cost, resource use, prompt/input limits, concurrency, cancellation, and observability consistent with Archie''s existing operational style.\n\n## Acceptance criteria\n- Automated tests cover both mechanisms, generation and editing, routing, provider failures, delivery failures, cancellation, and cleanup.\n- Tests assert no provider call occurs before mechanism clarification.\n- Resource and input/output limits are enforced in code and tested.\n- A documented local smoke command verifies at least one GPU recipe without requiring hosted credentials.\n- The normal project gate passes, and the epic's acceptance criteria can be verified from real command output.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T21:55:45Z","updated_at":"2026-08-14T21:55:45Z","external_ref":"https://github.com/samcharles93/archie-core/issues/503","source_system":"github:https://github.com/samcharles93/archie-core/issues/503:503","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-1786748942296-8-260e931d","title":"Write image capability documentation and agent assistance examples","description":"## Scope\nDocument the user-facing `/image` flow, hosted-provider setup, local GPU setup, supported model/backend recipes, troubleshooting, resource requirements, and security/cost implications.\n\nProvide concise code/config examples an agent can use to help users call both hosted and local paths. Examples must show how to inspect hardware/backend availability, choose a tested model, submit a generation/edit request, and collect the resulting image.\n\n## Acceptance criteria\n- Documentation explicitly says mechanism selection happens first by default.\n- Hosted API baseline fields and provider deviations are documented.\n- Every local model recipe names its tested backend/version, model source, VRAM/RAM expectations, supported sizes/operations, and failure modes.\n- Examples are runnable or tested in CI with mocked services; no secrets or huge weights are included.\n- Docs distinguish tested support from illustrative/untested possibilities.","status":"open","priority":2,"issue_type":"task","created_at":"2026-08-14T21:55:45Z","updated_at":"2026-08-14T21:55:45Z","external_ref":"https://github.com/samcharles93/archie-core/issues/502","source_system":"github:https://github.com/samcharles93/archie-core/issues/502:502","metadata":null,"labels":["task"],"dependency_count":0,"dependent_count":0,"comment_count":0}
+1 -1
View File
@@ -1 +1 @@
:root{--font-sans:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--font-mono:ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;--text-xs:.6875rem;--text-sm:.8125rem;--text-base:.875rem;--text-lg:1.0625rem;--text-xl:1.375rem;--text-2xl:1.875rem;--text-3xl:2.5rem;--sp-1:.25rem;--sp-2:.5rem;--sp-3:.75rem;--sp-4:1rem;--sp-5:1.5rem;--sp-6:2rem;--sp-7:3rem;--radius-sm:6px;--radius-md:10px;--radius-lg:14px;--radius-xl:20px;--radius-pill:999px;--transition:.14s cubic-bezier(.4, 0, .2, 1)}[data-theme=dark]{--bg:#0d1014;--bg-raised:#141920;--surface:#171d25;--surface-hover:#1d242e;--border:#232b36;--border-strong:#303a48;--fg:#e8edf4;--fg-muted:#8b97a8;--fg-subtle:#5d6878;--accent:#4c8dff;--accent-fg:#fff;--accent-soft:#4c8dff24;--ok:#3fbf7f;--ok-soft:#3fbf7f24;--warn:#e8a33d;--warn-soft:#e8a33d24;--danger:#f0616d;--danger-soft:#f0616d24;--info:#4c8dff;--info-soft:#4c8dff24;--idle:#6b7688;--idle-soft:#6b768824;--accent-2:#7b5cff;--bg-blur:#1419208c;--surface-glass:#171d259e;--surface-glass-strong:#141920c7;--workspace:#11151b8c;--hairline:#ffffff0f;--wash-a:#4c8dff1a;--wash-b:#7b5cff1f;--wash-c:#3fbf7f0f;--shadow-workspace:0 24px 70px #00000080;--shadow-sm:0 1px 2px #0006;--shadow-md:0 8px 28px #0000006b}[data-theme=light]{--bg:#f6f8fb;--bg-raised:#fff;--surface:#fff;--surface-hover:#f1f4f9;--border:#e2e8f0;--border-strong:#cbd5e1;--fg:#16202e;--fg-muted:#5a6779;--fg-subtle:#8c99ab;--accent:#2563eb;--accent-fg:#fff;--accent-soft:#2563eb1a;--ok:#10935c;--ok-soft:#10935c1f;--warn:#b87514;--warn-soft:#b875141f;--danger:#d4344a;--danger-soft:#d4344a1f;--info:#2563eb;--info-soft:#2563eb1a;--idle:#64748b;--idle-soft:#64748b1f;--accent-2:#7c3aed;--bg-blur:#fff9;--surface-glass:#ffffffb8;--surface-glass-strong:#ffffffe0;--workspace:#ffffff8c;--hairline:#0f172a0f;--wash-a:#2563eb1a;--wash-b:#7c3aed1f;--wash-c:#10935c12;--shadow-workspace:0 24px 70px #0f172a24;--shadow-sm:0 1px 2px #0f172a0f;--shadow-md:0 8px 28px #0f172a1a}*,:before,:after{box-sizing:border-box}html,body{height:100%;margin:0}body{color:var(--fg);font-family:var(--font-sans);font-size:var(--text-base);-webkit-font-smoothing:antialiased;line-height:1.5}a{color:inherit;text-decoration:none}body{background:radial-gradient(70rem 40rem at 8% -10%, var(--wash-a), transparent 62%), radial-gradient(56rem 34rem at 92% 4%, var(--wash-b), transparent 58%), radial-gradient(48rem 30rem at 50% 108%, var(--wash-c), transparent 60%), var(--bg);padding:var(--sp-4);background-attachment:fixed}.shell{min-height:calc(100vh - var(--sp-4) * 2);border-radius:var(--radius-xl);border:1px solid var(--hairline);background:var(--workspace);-webkit-backdrop-filter:blur(28px)saturate(120%);backdrop-filter:blur(28px)saturate(120%);box-shadow:var(--shadow-workspace);flex-direction:column;display:flex;overflow:hidden}.topbar{align-items:center;gap:var(--sp-4);padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--hairline);background:var(--bg-blur);z-index:10;display:flex;position:sticky;top:0}.brand{align-items:center;gap:var(--sp-2);font-weight:600;font-size:var(--text-sm);letter-spacing:-.01em;flex:none;display:flex}.brand-mark{background:linear-gradient(135deg, var(--accent), var(--accent-2));color:#fff;width:26px;height:26px;font-size:var(--text-xs);border-radius:8px;place-items:center;font-weight:700;display:grid}.nav{border-radius:var(--radius-pill);background:var(--surface-glass-strong);border:1px solid var(--hairline);align-items:center;gap:2px;margin:0 auto;padding:3px;display:flex}.nav-item{align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);border-radius:var(--radius-pill);color:var(--fg-muted);font-size:var(--text-sm);white-space:nowrap;cursor:pointer;transition:background var(--transition), color var(--transition);display:inline-flex}.nav-item:hover{color:var(--fg);background:var(--surface-hover)}.nav-item[aria-current=page]{background:var(--accent);color:var(--accent-fg);font-weight:500}.nav-item .nav-label{display:inline}.topbar-end{align-items:center;gap:var(--sp-2);flex:none;display:flex}.topbar-search{align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);border-radius:var(--radius-pill);background:var(--surface-glass-strong);border:1px solid var(--hairline);color:var(--fg-subtle);display:flex}.topbar-search input{color:var(--fg);font:inherit;font-size:var(--text-sm);background:0 0;border:0;outline:none;width:8rem}.topbar-search input::placeholder{color:var(--fg-subtle)}.mobile-search-toggle{display:none}.icon-btn{border-radius:var(--radius-pill);border:1px solid var(--hairline);background:var(--surface-glass-strong);width:32px;height:32px;color:var(--fg-muted);cursor:pointer;transition:color var(--transition), background var(--transition);place-items:center;display:grid}.icon-btn:hover{color:var(--fg);background:var(--surface-hover)}.avatar{border-radius:var(--radius-pill);width:32px;height:32px;font-size:var(--text-xs);color:#fff;background:linear-gradient(135deg, var(--accenLine truncated
:root{--font-sans:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--font-mono:ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;--text-xs:.6875rem;--text-sm:.8125rem;--text-base:.875rem;--text-lg:1.0625rem;--text-xl:1.375rem;--text-2xl:1.875rem;--text-3xl:2.5rem;--sp-1:.25rem;--sp-2:.5rem;--sp-3:.75rem;--sp-4:1rem;--sp-5:1.5rem;--sp-6:2rem;--sp-7:3rem;--radius-sm:6px;--radius-md:10px;--radius-lg:14px;--radius-xl:20px;--radius-pill:999px;--transition:.14s cubic-bezier(.4, 0, .2, 1)}[data-theme=dark]{--bg:#0d1014;--bg-raised:#141920;--surface:#171d25;--surface-hover:#1d242e;--border:#232b36;--border-strong:#303a48;--fg:#e8edf4;--fg-muted:#8b97a8;--fg-subtle:#5d6878;--accent:#4c8dff;--accent-fg:#fff;--accent-soft:#4c8dff24;--ok:#3fbf7f;--ok-soft:#3fbf7f24;--warn:#e8a33d;--warn-soft:#e8a33d24;--danger:#f0616d;--danger-soft:#f0616d24;--info:#4c8dff;--info-soft:#4c8dff24;--idle:#6b7688;--idle-soft:#6b768824;--accent-2:#7b5cff;--bg-blur:#1419208c;--surface-glass:#171d259e;--surface-glass-strong:#141920c7;--workspace:#11151b8c;--hairline:#ffffff0f;--wash-a:#4c8dff1a;--wash-b:#7b5cff1f;--wash-c:#3fbf7f0f;--shadow-workspace:0 24px 70px #00000080;--shadow-sm:0 1px 2px #0006;--shadow-md:0 8px 28px #0000006b}[data-theme=light]{--bg:#f6f8fb;--bg-raised:#fff;--surface:#fff;--surface-hover:#f1f4f9;--border:#e2e8f0;--border-strong:#cbd5e1;--fg:#16202e;--fg-muted:#5a6779;--fg-subtle:#8c99ab;--accent:#2563eb;--accent-fg:#fff;--accent-soft:#2563eb1a;--ok:#10935c;--ok-soft:#10935c1f;--warn:#b87514;--warn-soft:#b875141f;--danger:#d4344a;--danger-soft:#d4344a1f;--info:#2563eb;--info-soft:#2563eb1a;--idle:#64748b;--idle-soft:#64748b1f;--accent-2:#7c3aed;--bg-blur:#fff9;--surface-glass:#ffffffb8;--surface-glass-strong:#ffffffe0;--workspace:#ffffff8c;--hairline:#0f172a0f;--wash-a:#2563eb1a;--wash-b:#7c3aed1f;--wash-c:#10935c12;--shadow-workspace:0 24px 70px #0f172a24;--shadow-sm:0 1px 2px #0f172a0f;--shadow-md:0 8px 28px #0f172a1a}*,:before,:after{box-sizing:border-box}html,body{height:100%;margin:0}body{color:var(--fg);font-family:var(--font-sans);font-size:var(--text-base);-webkit-font-smoothing:antialiased;line-height:1.5}a{color:inherit;text-decoration:none}body{background:radial-gradient(70rem 40rem at 8% -10%, var(--wash-a), transparent 62%), radial-gradient(56rem 34rem at 92% 4%, var(--wash-b), transparent 58%), radial-gradient(48rem 30rem at 50% 108%, var(--wash-c), transparent 60%), var(--bg);padding:var(--sp-4);background-attachment:fixed}.shell{min-height:calc(100vh - var(--sp-4) * 2);border-radius:var(--radius-xl);border:1px solid var(--hairline);background:var(--workspace);-webkit-backdrop-filter:blur(28px)saturate(120%);backdrop-filter:blur(28px)saturate(120%);box-shadow:var(--shadow-workspace);flex-direction:column;display:flex;overflow:hidden}.topbar{align-items:center;gap:var(--sp-4);padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--hairline);background:var(--bg-blur);z-index:10;display:flex;position:sticky;top:0}.brand{align-items:center;gap:var(--sp-2);font-weight:600;font-size:var(--text-sm);letter-spacing:-.01em;flex:none;display:flex}.brand-mark{background:linear-gradient(135deg, var(--accent), var(--accent-2));color:#fff;width:26px;height:26px;font-size:var(--text-xs);border-radius:8px;place-items:center;font-weight:700;display:grid}.nav{border-radius:var(--radius-pill);background:var(--surface-glass-strong);border:1px solid var(--hairline);align-items:center;gap:2px;margin:0 auto;padding:3px;display:flex}.nav-item{align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);border-radius:var(--radius-pill);color:var(--fg-muted);font-size:var(--text-sm);white-space:nowrap;cursor:pointer;transition:background var(--transition), color var(--transition);display:inline-flex}.nav-item:hover{color:var(--fg);background:var(--surface-hover)}.nav-item[aria-current=page]{background:var(--accent);color:var(--accent-fg);font-weight:500}.nav-item .nav-label{display:inline}.topbar-end{align-items:center;gap:var(--sp-2);flex:none;display:flex}.topbar-search{align-items:center;gap:var(--sp-2);padding:var(--sp-2) var(--sp-3);border-radius:var(--radius-pill);background:var(--surface-glass-strong);border:1px solid var(--hairline);color:var(--fg-subtle);display:flex}.topbar-search input{color:var(--fg);font:inherit;font-size:var(--text-sm);background:0 0;border:0;outline:none;width:8rem}.topbar-search input::placeholder{color:var(--fg-subtle)}.mobile-search-toggle{display:none}.icon-btn{border-radius:var(--radius-pill);border:1px solid var(--hairline);background:var(--surface-glass-strong);width:32px;height:32px;color:var(--fg-muted);cursor:pointer;transition:color var(--transition), background var(--transition);place-items:center;display:grid}.icon-btn:hover{color:var(--fg);background:var(--surface-hover)}.avatar{border-radius:var(--radius-pill);width:32px;height:32px;font-size:var(--text-xs);color:#fff;background:linear-gradient(135deg, var(--accenLine truncated
+1 -1
View File
@@ -6,7 +6,7 @@
stroke-width="12" stroke-linecap="round"
stroke-dasharray="${c}"
stroke-dashoffset="${c*(1-i/100)}"
class="gauge-value"/>`,e(`div.gauge-wrap`,u,e(`div.gauge-center`,e(`div.gauge-pct`,`${Math.round(i)}%`),e(`div.gauge-label`,n)))}function b(t){let n=t.reduce((e,t)=>e+(t.value||0),0)||1;return e(`div`,e(`div.segbar`,...t.filter(e=>e.value>0).map(t=>e(`span`,{class:`segbar-part segbar-${t.kind||`idle`}`,style:`width:${(t.value/n*100).toFixed(1)}%`,title:`${t.label}: ${t.value}`}))),e(`div.segbar-legend`,...t.map(t=>e(`span.segbar-key`,e(`span`,{class:`segbar-dot segbar-${t.kind||`idle`}`}),t.label))))}var x=`archie.setup-complete.dismissed.v1`;function S(e,t=globalThis.localStorage){if(!e?.steps?.length)return{kind:`omit`,remaining:[]};let n=e.steps.filter(e=>!e.done);return n.length?(t?.removeItem?.(x),{kind:`incomplete`,remaining:n}):t?.getItem?.(`archie.setup-complete.dismissed.v1`)===`1`?{kind:`dismissed`,remaining:[]}:{kind:`complete`,remaining:[]}}function C(e=globalThis.localStorage){e?.setItem?.(x,`1`)}var w=new Set([`waiting_human`,`parked`]);function T(e=[]){let t=e.filter(e=>w.has(e.status)),n=e.filter(e=>e.status===`running`);return{attention:{count:t.length,href:t.length===1?`#/tasks?task=${encodeURIComponent(t[0].id)}`:`#/tasks?status=needs_you`},running:{count:n.length,href:`#/tasks?status=running`}}}function E(){let t=e(`div`),i=e(`tbody`),a=e(`div.grid.grid-4`),c=e(`div`),u=e(`div`),d=e(`div.dash-top`,c,u),f=e(`div`),p=e(`div.hero-actions-inner`),g=e(`h1.hero-title`,k()),v=r(`connecting`,`idle`),y=[],b=new Map;w(),O();let x=h(e=>{y.unshift(e),y.splice(50),E()},e=>{v.className=`pill pill-${e===`live`?`ok`:`warn`}`,v.textContent=e});t.addEventListener(`archie:teardown`,x);function w(){n(t,e(`div.hero`,e(`div`,g,e(`p.hero-sub`,`Your agent's control room — what it is working on, what needs you, and what it is spending.`)),e(`div.hero-actions`,p)),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Health`)),d),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Throughput`),e(`span.dash-section-note`,`Across all repositories`)),a),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Right now`)),e(`div.dash-split`,f,e(`div.card`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Live activity`),e(`p.card-sub`,`Last 50, newest first`)),v),e(`div.table-scroll`,e(`table.table`,e(`thead`,e(`tr`,...[`Event`,`Task`,`Detail`,`When`].map(t=>e(`th`,t)))),i)))))),E()}function E(){if(!y.length){n(i,e(`tr`,e(`td`,{colspan:4},s(`Waiting for activity`,`Events appear here as Archie works.`))));return}n(i,...y.map(e=>D(e,b)))}async function O(){try{let[e,t,n,r]=await Promise.all([m.summary(),m.setup().catch(()=>null),m.workflows().catch(()=>null),m.tasks().catch(()=>[])]);b.clear();for(let e of r)e.owner&&e.repo&&e.issue_number&&b.set(`${e.owner}/${e.repo}#${e.issue_number}`,e.id);E(),N(r),g.textContent=t?.operator?`${k()}, ${t.operator}`:k(),P(e),F(t),I(e,n),L(e)}catch(t){n(a,e(`div.card`,s(`Cannot reach archied`,String(t.message||t)))),n(p,e(`button.btn.btn-primary`,{onclick:O},l(`refresh`,{size:15}),`Retry`))}}function N(t){let r=T(t),i=r.attention.count,a=r.running.count;n(p,i>0&&e(`a.btn.btn-attention`,{href:r.attention.href},l(`tasks`,{size:15}),`${i} need${i===1?`s`:``} you`),a>0&&e(`a.btn`,{href:r.running.href},l(`workflows`,{size:15}),`${a} running`),e(`a.btn`,{href:`#/logs`},l(`logs`,{size:15}),`Logs`),e(`button.btn.btn-primary`,{onclick:O},l(`refresh`,{size:15}),`Refresh`))}function P(e){let t=e?.statuses||{},r=(t.merged||0)+(t.pr_open||0),i=(t.parked||0)+(t.waiting_human||0),s=Object.values(t).reduce((e,t)=>e+t,0),c=e?.tokens_by_day||[];n(a,_({label:`Working now`,value:t.running||0,compare:`${t.queued||0} waiting to start`,series:c.map(e=>e.tokens||0)}),_({label:`Needs you`,value:i,compare:i?`Parked or awaiting a reply`:`Nothing is blocked`,goodDirection:`down`}),_({label:`Delivered`,value:r,compare:s?`${Math.round(r/s*100)}% of all tasks`:`No tasks yet`}),_({label:`Tokens used`,value:o(c.reduce((e,t)=>e+(t.tokens||0),0)),compare:`Across ${c.length||0} days`,trend:M(c.map(e=>e.tokens||0)),goodDirection:`down`,series:c.map(e=>e.tokens||0)}))}function F(t){let r=S(t),i=r.kind===`omit`||r.kind===`dismissed`;if(d.classList.toggle(`dash-top-standalone`,i),i)return n(c);let a=r.remaining;if(a.length){let r=Math.round((t.steps.length-a.length)/t.steps.length*100);n(c,e(`div.card.setup`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Finish setting up`),e(`p.card-sub`,`Archie needs these before it can work on its own.`)),e(`span.setup-pct`,`${r}%`)),e(`div.setup-bar`,e(`div.setup-bar-fill`,{style:`width:${r}%`})),e(`ul.setup-list`,...t.steps.map(R))));return}n(c,e(`div.card.setup.setup-done`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Setup complete`),e(`p.card-sub`,`Archie is configured and ready to work.`)),e(`div.setup-complete-actions`,e(`span.setup-pct`,l(`check`,{size:16})),e(`button.icon-btn.setup-dismiss`,{type:`button`,title:`Dismiss setup complete`,"aria-label":`Dismiss setup complete`,onclick:()=>{C(),F(t)}},`×`)))))}function Line truncated
class="gauge-value"/>`,e(`div.gauge-wrap`,u,e(`div.gauge-center`,e(`div.gauge-pct`,`${Math.round(i)}%`),e(`div.gauge-label`,n)))}function b(t){let n=t.reduce((e,t)=>e+(t.value||0),0)||1;return e(`div`,e(`div.segbar`,...t.filter(e=>e.value>0).map(t=>e(`span`,{class:`segbar-part segbar-${t.kind||`idle`}`,style:`width:${(t.value/n*100).toFixed(1)}%`,title:`${t.label}: ${t.value}`}))),e(`div.segbar-legend`,...t.map(t=>e(`span.segbar-key`,e(`span`,{class:`segbar-dot segbar-${t.kind||`idle`}`}),t.label))))}var x=`archie.setup-complete.dismissed.v1`;function S(e,t=globalThis.localStorage){if(!e?.steps?.length)return{kind:`omit`,remaining:[]};let n=e.steps.filter(e=>!e.done);return n.length?(t?.removeItem?.(x),{kind:`incomplete`,remaining:n}):t?.getItem?.(`archie.setup-complete.dismissed.v1`)===`1`?{kind:`dismissed`,remaining:[]}:{kind:`complete`,remaining:[]}}function C(e=globalThis.localStorage){e?.setItem?.(x,`1`)}var w=new Set([`waiting_human`,`parked`]);function T(e=[]){let t=e.filter(e=>w.has(e.status)),n=e.filter(e=>e.status===`running`);return{attention:{count:t.length,href:t.length===1?`#/tasks?task=${encodeURIComponent(t[0].id)}`:`#/tasks?status=needs_you`},running:{count:n.length,href:`#/tasks?status=running`}}}function E(){let t=e(`div`),i=e(`tbody`),a=e(`div.grid.grid-4`),c=e(`div`),u=e(`div`),d=e(`div.dash-top`,c,u),f=e(`div`),p=e(`div.hero-actions-inner`),g=e(`h1.hero-title`,k()),v=r(`connecting`,`idle`),y=[],b=new Map;w(),O();let x=h(e=>{y.unshift(e),y.splice(50),E()},e=>{v.className=`pill pill-${e===`live`?`ok`:`warn`}`,v.textContent=e});t.addEventListener(`archie:teardown`,x);function w(){n(t,e(`div.hero`,e(`div`,g,e(`p.hero-sub`,`Your agent's control room — what it is working on, what needs you, and what it is spending.`)),e(`div.hero-actions`,p)),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Health`)),d),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Throughput`),e(`span.dash-section-note`,`Across all repositories`)),a),e(`div.dash-section`,e(`div.dash-section-head`,e(`h2.dash-section-title`,`Right now`)),e(`div.dash-split`,f,e(`div.card`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Live activity`),e(`p.card-sub`,`Last 50, newest first`)),v),e(`div.table-scroll`,e(`table.table`,e(`thead`,e(`tr`,...[`Event`,`Task`,`Detail`,`When`].map(t=>e(`th`,t)))),i)))))),E()}function E(){if(!y.length){n(i,e(`tr`,e(`td`,{colspan:4},s(`Waiting for activity`,`Events appear here as Archie works.`))));return}n(i,...y.map(e=>D(e,b)))}async function O(){try{let[e,t,n,r]=await Promise.all([m.summary(),m.setup().catch(()=>null),m.workflows().catch(()=>null),m.tasks().catch(()=>[])]);b.clear();for(let e of r)e.owner&&e.repo&&e.issue_number&&b.set(`${e.owner}/${e.repo}#${e.issue_number}`,e.id);E(),N(r),g.textContent=t?.operator?`${k()}, ${t.operator}`:k(),P(e),F(t),I(e,n),L(e)}catch(t){n(a,e(`div.card`,s(`Cannot reach archied`,String(t.message||t)))),n(p,e(`button.btn.btn-primary`,{onclick:O},l(`refresh`,{size:15}),`Retry`))}}function N(t){let r=T(t),i=r.attention.count,a=r.running.count;n(p,i>0&&e(`a.btn.btn-attention`,{href:r.attention.href},l(`tasks`,{size:15}),`${i} need${i===1?`s`:``} you`),a>0&&e(`a.btn`,{href:r.running.href},l(`workflows`,{size:15}),`${a} running`),e(`a.btn`,{href:`#/logs`},l(`logs`,{size:15}),`Logs`),e(`button.btn.btn-primary`,{onclick:O},l(`refresh`,{size:15}),`Refresh`))}function P(e){let t=e?.statuses||{},r=(t.merged||0)+(t.pr_open||0),i=(t.parked||0)+(t.waiting_human||0),s=Object.values(t).reduce((e,t)=>e+t,0),c=e?.tokens_by_day||[];n(a,_({label:`Working now`,value:t.running||0,compare:`${t.queued||0} waiting to start`,series:c.map(e=>e.tokens||0)}),_({label:`Needs you`,value:i,compare:i?`Parked or awaiting a reply`:`Nothing is blocked`,goodDirection:`down`}),_({label:`Delivered`,value:r,compare:s?`${Math.round(r/s*100)}% of all tasks`:`No tasks yet`}),_({label:`Tokens used`,value:o(c.reduce((e,t)=>e+(t.tokens||0),0)),compare:`Across ${c.length||0} days`,trend:M(c.map(e=>e.tokens||0)),goodDirection:`down`,series:c.map(e=>e.tokens||0)}))}function F(t){let r=S(t),i=r.kind===`omit`||r.kind===`dismissed`;if(d.classList.toggle(`dash-top-standalone`,i),i)return n(c);let a=r.remaining;if(a.length){let r=Math.round((t.steps.length-a.length)/t.steps.length*100);n(c,e(`div.card.setup`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Finish setting up`),e(`p.card-sub`,`Archie needs these before it can work on its own.`)),e(`span.setup-pct`,`${r}%`)),e(`div.setup-bar`,e(`div.setup-bar-fill`,{style:`width:${r}%`})),e(`ul.setup-list`,...t.steps.map(R))));return}n(c,e(`div.card.setup.setup-done`,e(`div.card-head`,e(`div`,e(`h2.card-title`,`Setup complete`),e(`p.card-sub`,`Archie is configured and ready to work.`)),e(`div.setup-complete-actions`,e(`span.setup-pct`,l(`check`,{size:16})),e(`button.icon-btn.setup-dismiss`,{type:`button`,title:`Dismiss setup complete`,"aria-label":`Dismiss setup complete`,onclick:()=>{C(),F(t)}},`×`)))))}function Line truncated
<div class="chat-page-content">
<header class="chat-topbar">
<div><span class="chat-kicker">ARCHIE WORKSPACE</span><h1 class="page-title">Chat</h1></div>
+29
View File
@@ -56,3 +56,32 @@
flex-direction: column;
gap: var(--sp-2);
}
.wf-form input,
.wf-form select,
.wf-form textarea {
font: inherit;
font-size: var(--text-sm);
color: var(--fg);
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
padding: var(--sp-2);
width: 100%;
}
.wf-form textarea {
resize: vertical;
}
.wf-form input:focus,
.wf-form select:focus,
.wf-form textarea:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
}
.wf-form input::placeholder,
.wf-form textarea::placeholder {
color: var(--fg-subtle);
}