Skip to content

Fix console leftovers from the UX review - #702

Merged
SaladDay merged 4 commits into
mainfrom
fix-console-leftovers-from-ux-review
Oct 14, 2026
Merged

SaladDay merged 4 commits into
mainfrom
fix-console-leftovers-from-ux-review

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

This is Part 2 of UX polish lane E: the console leftovers from the UX review. I checked each premise in the code first, and all seven held.

  • Retries. The global React Query default was retry: 1, which also retried 4xx answers. A read is now tried again only once, and only after a 5xx answer or a failed fetch (TypeError). retryTransient moves to lib/queries.ts as that default. The eight per-query retry: retryTransient overrides in detail and Session queries were redundant and are deleted. Deliberate retry: false overrides stay, because their polling is the retry.
  • Uncatalogued Core codes. coreError showed Core's English message for any code without copy, e.g. invalid_request or the client's 502 invalid_admin_response, even in Chinese. Such codes now go through one copy entry, readFailure.code:
    • English still shows Core's own message, which is English and more specific.
    • Chinese reads "Core 请求失败(code)。".
    • A failure without a code names its HTTP status.
    • coreFieldError uses the same fallback.
    • readError had become identical to coreError, so lib/read-error.ts is deleted and its four callers use coreError.
    • Per-project list read failures (useProjectCollection) now go through coreError too, instead of error.message.
  • Resource lists. On Agents, Environment templates, Skills, Files and Vaults, selecting a project with no items, or one whose read fails, hid the toolbar. That left no way to switch back. The toolbar now stays visible whenever a project filter is set. It shows no count while there are no rows.
  • Workspace storage. On a first failed read, the error said "Previously displayed settings may be out of date". A first failure now reads "Workspace storage could not be read." / "无法读取工作区存储。". The earlier copy stays for a failed refresh, including a refresh inside the editor after an uncertain save, because that refresh follows a successful read.
  • Connect a host. The install guide link went to GitHub. It now uses docsUrl (docs/getting-started/self-hosted), in the console's language.
  • Status second. Overview's Needs attention table and Sandbox metrics' Hosted Runtimes table now show Status right after the Session, as the Session log does. A phone sees each Session's status beside it.
  • One Status column for hosted Runtimes. Sandbox metrics' Hosted Runtimes showed Status next to Recorded compute (状态 next to 记录的计算状态).
    • Status was the Runtime observation's lifecycle state, replaced by the sample reason whenever no sample came back. A suspended sandbox therefore read "Not running".
    • Recorded compute was the allocation's compute phase.
    • Core derives the lifecycle state from that same phase (runtimeLifecycleState in services/core/internal/api/runtime_observations.go). Both columns answered whether a sandbox uses compute now, is suspended or is gone.
    • Status now shows only Core's lifecycle record (Active, Suspended, Changing state, Waiting for allocation, Stopped), with a help tip. The Recorded compute column, its dialog fact and the unused allocation row field are gone.
    • When an active sandbox has no sample, its CPU and Memory cells say why, e.g. "Sample timed out".
    • The Session page's Runtime state follows the same rule and uses the same labels. Its own copy, which said "Sleeping" / "休眠", is deleted.
    • The Nodes page keeps each allocation's state and compute phase.
  • Session page failure.
    • The Status fact now shows the status alone.
    • The classified reason and its next step read as one block under the facts, at up to 880 px wide. The block also holds "Failure details unavailable" with its retry.
    • Lists keep one truncated reason line, with the next step in its tooltip.
    • diagnosticNext gives the next step one home.
  • Docs. apps/web/PRODUCT.md and apps/web/DESIGN.md describe the retry rule, the copy for unknown codes, the first-read copy, the toolbar rule, the column order, the failure block and the single Runtime Status. docs/web/index.md and its zh translation no longer mention Recorded compute; the zh row uses the zh page names (监控 | 沙箱监控) and 项目, and the zh source_hash is refreshed.

Why

These are follow-ups from lanes A, B and D of the UX review, plus the re-walk of the deployed console. Retrying a 4xx answer doubled every definite refusal. Chinese pages showed English text. An empty project trapped the filter. The storage error referred to settings nobody had seen. The narrow Status cell squeezed a two-sentence next step.

Verification

  • pnpm --filter @oac/web typecheck
  • vitest run across all of apps/web, because lib/queries.ts, lib/core-error.ts and lib/projects.tsx are shared: 71 files, 394 tests passed.
  • New or changed acceptance tests:
    • the global retry default and transient rule (session-queries.test.ts)
    • uncatalogued and code-less errors in both languages (core-error.test.ts)
    • first-read compared with refresh copy (workspace-storage-view.test.tsx)
    • the Session page failure block (session-diagnostics.test.tsx)
    • the filter on an empty project (e2e/resources.spec.ts)
    • a sample reason shown only for an active sandbox (sandbox-runtime.test.ts)
    • no Recorded compute column, and Suspended in Status (e2e/sandbox-lifecycle.spec.ts)
  • Playwright with the bundled Chromium instead of the chrome channel. diagnostics and monitoring now look for the failure block and the docs link.
    • First round: resources, diagnostics, monitoring, overview-readiness and unified-settings, 36 passed.
    • After the review fixes: sandbox-lifecycle, monitoring, diagnostics and unified-settings, 24 passed.
  • make check-names, make check-docs and pnpm --dir website check-translations
  • Fixture screenshots in zh and en at 1440 and 390 px: the failed Session page, Needs attention, Hosted Runtimes (also with suspended sandboxes and a timed-out sample), Skills filtered to an empty project, and Workspace storage on a failed first read.

Skipped

  • Full make check, per lane rules.
  • The other Playwright specs.
  • Go checks, because no Go code changed.

Follow-up

About ten Web helpers still show error.message directly: errorText and message in Overview, Session, Vaults, Default models, Session Runtime, session history, Agent metrics, Core metrics, Sandbox metrics' hosted read and Node host. In Chinese they still show Core's English text. Moving them to coreError is a separate sweep.

Merging with #701

Whichever of #701 and #702 merges second gets small conflicts with adjacent lines: apps/web/PRODUCT.md, apps/web/e2e/diagnostics.spec.ts:57, en/sessions.ts, zh-CN/sessions.ts and docs/zh/web/index.md. Keep #702's structure (locators, Status copy, the Sandbox metrics row, source_hash) and #701's terms (e.g. 模型提供商认证失败).

@SaladDay
SaladDay force-pushed the fix-console-leftovers-from-ux-review branch from 74e6376 to fc63157 Compare October 14, 2026 10:07
A refresh after an uncertain save follows a successful read, so it keeps
the "may be out of date" wording. Only the page's first read says the
storage could not be read.
Hosted Runtimes showed Status (the Runtime observation, replaced by the
sample reason when no sample came back) next to Recorded compute (the
allocation's compute phase). Core derives the lifecycle state from that
same phase, so both columns answered whether a sandbox uses compute, is
suspended or is gone. Status now shows Core's lifecycle record alone, with
a help tip. When an active sandbox has no sample, its CPU and Memory cells
name why. The Session page's Runtime state uses the same rule and labels.
@SaladDay
SaladDay merged commit 3795154 into main Oct 14, 2026
17 checks passed
@SaladDay
SaladDay deleted the fix-console-leftovers-from-ux-review branch October 14, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant