Repository navigation
feat(ui): durable session board face and dashboards index - #114262
Conversation
Board face lived only in client-side boardSessionViews, capped at 50 entries, so the preference never followed the user to another device, evicted as sessions accumulated, and could not be seen as a set. Persist it as SessionEntry.boardFace, which rides the existing entry_json blob and so needs no SQLite schema change or version bump. Expose it on the session list row and add it to the sessions.patch write-scope allowlist alongside label, pinned, and archived: setting your own view preference is user-level chat organization, not policy. Unknown patch fields still fail closed to operator.admin. Generic navigation now reads the stored face, so the sidebar and session list open a thread on the face you left it on. boardSessionViews keeps only activeTabId and reopenDockByTab, which are genuinely per-device. Add /dashboards listing threads whose preferred face is dashboard. Filtering runs server-side in filterSessionEntries before pagination, because the client holds only a capped page and a client-side filter would silently omit dashboards.
The gateway-protocol validator test still passed the pre-rename 'face' key, which the closed schema rejects. Use boardFace, and pin the old name as a negative case so it cannot silently return.
Adding boardFace to the sessions schema changes two committed generated artifacts: the Swift gateway models (pnpm protocol:gen:swift) and the docs map (pnpm docs:map:gen), which now lists the dashboards index section.
|
Codex review: found issues before merge. Reviewed July 27, 2026, 12:15 AM ET / 04:15 UTC. ClawSweeper reviewWhat this changesThe PR stores each Control UI thread’s preferred Chat or Dashboard face in its gateway session entry, uses that preference for generic navigation, and adds a server-filtered Merge readinessKeep this PR open: the prior P2 blocker remains. Generic navigation resolves a stored face only from the current in-memory session page, so a session referenced by Tasks, Workboard, or another caller but absent from that capped cache silently opens in Chat despite a persisted Dashboard preference. Likely related people: steipete (high confidence), based on the merged path-based session/dashboard navigation work and this follow-up branch. Priority: P2 Review scores
Verification
How this fits togetherControl UI session rows come from Gateway flowchart LR
User[Control UI user] --> Toggle[Chat or Dashboard switch]
Toggle --> Patch[Gateway session patch]
Patch --> Store[Persisted session entry]
Store --> List[Gateway session list]
List --> CachedRows[Control UI cached rows]
CachedRows --> Navigation[Generic thread navigation]
List --> Dashboards[Dashboards index]
Navigation --> Surface[Chat or Dashboard surface]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +251, Tests +266, Docs +15, Other +12. Total +544 across 55 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make generic navigation obtain the authoritative preferred face when its target is not in the cached session rows, or carry that face on every upstream record that creates such a link; retain Chat only as the explicit default for sessions with no stored preference. Do we have a high-confidence way to reproduce the issue? Yes, from source: persist Is this the best way to solve the issue? No. Persisting the preference and filtering Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 66714b862267. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Maintainer decision on ClawSweeper's P2Finding accepted as real. Decision: land this PR, fix it in the follow-up. Reasoning:
Bundling both into one follow-up keeps this PR at its verified scope instead of growing new Follow-up (PR 3): resolve session references against the gateway rather than the cached page.
|
|
Merged via squash.
|
…14262) * feat(ui): durable session board face and dashboards index Board face lived only in client-side boardSessionViews, capped at 50 entries, so the preference never followed the user to another device, evicted as sessions accumulated, and could not be seen as a set. Persist it as SessionEntry.boardFace, which rides the existing entry_json blob and so needs no SQLite schema change or version bump. Expose it on the session list row and add it to the sessions.patch write-scope allowlist alongside label, pinned, and archived: setting your own view preference is user-level chat organization, not policy. Unknown patch fields still fail closed to operator.admin. Generic navigation now reads the stored face, so the sidebar and session list open a thread on the face you left it on. boardSessionViews keeps only activeTabId and reopenDockByTab, which are genuinely per-device. Add /dashboards listing threads whose preferred face is dashboard. Filtering runs server-side in filterSessionEntries before pagination, because the client holds only a capped page and a client-side filter would silently omit dashboards. * test(protocol): assert the pre-rename face param is rejected The gateway-protocol validator test still passed the pre-rename 'face' key, which the closed schema rejects. Use boardFace, and pin the old name as a negative case so it cannot silently return. * chore(protocol): regenerate Swift bindings and docs map for boardFace Adding boardFace to the sessions schema changes two committed generated artifacts: the Swift gateway models (pnpm protocol:gen:swift) and the docs map (pnpm docs:map:gen), which now lists the dashboards index section.
What Problem This Solves
A thread's board face (Chat vs Dashboard) was stored only in client-side
boardSessionViews,capped at 50 entries. So the preference never followed you to another device, evicted as threads
accumulated, and a shared link never carried it. There was also no way to see your dashboards as a
set — only to remember which threads happened to have one.
This is the follow-up to #113883, which made the board face part of the URL (
/chat/...vs/dashboard/...). That fixed sharing a face; this fixes remembering one.Why This Change Was Made
Durable face. The preference persists as
SessionEntry.boardFace. Session entries alreadyserialize to
session_entries.entry_json, so this needs no SQLite schema change and noschema-version bump. It is exposed on the session list row and added to the
sessions.patchwrite-scope allowlist beside
label,category,icon,pinned,archived— setting your ownview preference is user-level chat organization, not policy. Unknown patch fields still fail closed
to
operator.admin, and a test pins that.No new gateway method and no protocol version bump:
sessions.patchandsessions.listalreadycarried the right shape.
Generic navigation reads it. #113883 made the destination face a required parameter on
sessionNavigationTarget, so every caller must state which face it wants. Callers that have noexplicit intent — the sidebar, the session list, Tasks — now say "the face this thread was left
on". An explicit URL still wins; the stored face is only the default.
boardSessionViewskeepsactiveTabIdandreopenDockByTab, which are genuinely per-device.There is no migration for previously stored local faces: cache state gets no compat path, and
losing one silently is acceptable.
/dashboardsindex. Lists threads whose preferred face is dashboard, most recently updatedfirst. Filtering runs server-side in
filterSessionEntriesbefore pagination — the client holdsonly a capped 50-row page, so a client-side filter would silently omit dashboards from the list
whose entire purpose is completeness.
Naming. The field is
boardFace, notface.src/plugins/session-entry-slot-keys.tsreservesevery
SessionEntrykey against plugin extension slots, so the name is claimed permanently acrossthe plugin ecosystem;
faceis too generic to take.User Impact
Your Chat/Dashboard choice per thread now follows you across devices and browsers, and generic
navigation opens each thread on the face you left it on.
/dashboardsshows your dashboard threadsin one place, with an empty state explaining how a thread gets one.
Locally stored face preferences are not migrated and reset once on upgrade. Tab and dock state
remain per-device, unchanged.
Evidence
tsgoui / core / extensions / test-uipackages/gateway-protocolui/src/lib/sessionsui/src/appui/src/pagesui/src/componentssrc/config/sessionssrc/gateway/method-scopessrc/gateway/sessions-patchsrc/gateway/server.sessions.facerun-oxlint/oxfmt --check(52 files)pnpm ui:i18n:verifyBehavioral coverage: a write-scoped face patch is visible to another client; an unknown patch field
still requires
operator.admin;sessions.listapplies the face filter before pagination; theprotocol validator rejects the pre-rename
facekey; generic navigation resolves a thread's storedface;
/dashboardsrequests the filter server-side and renders its empty state.Diff: prod +235, tests +180, docs +14 across 51 files. No schema change, no protocol bump, no new
gateway method, no new config keys or env vars.
Behavior proof (real gateway + real browser). Ran a dev gateway from a full
pnpm buildon anisolated
OPENCLAW_STATE_DIRand free port, and drove the Control UI in a browser:/chat/main— canonical path resolves, no?session=query./dashboards— renders with the empty state ("No dashboards yet / Open a thread and switch tothe Dashboard face to add it here.").
sessions.list {boardFace:"dashboard"}-> 0,then
sessions.patch {key:"agent:main:main", boardFace:"dashboard"}-> entry.boardFace persisted,then
sessions.listagain -> 1 (agent:main:main=dashboard). This exercises the server-sidefilter, not a client-side one.
("Main Thread / agent:main:main / just now"). This is the cross-device claim, observed rather
than inferred.
/dashboard/main(the dashboard namespace, not/chat)./dashboard/mainresolves and stays canonical. The board surface is absent only because thethread has no pinned widgets yet, which matches documented behavior.
Two staleness traps worth recording: the gateway serves prebuilt
dist/control-uianddist/*.js,so a browser check against an unbuilt tree silently tests old code — the first attempt showed
/dashboardsfalling through to/chat/mainpurely because the bundle predated the route, and alater attempt showed the gateway rejecting
boardFacebecause the compiled validator was stale.Both cleared after
pnpm build.Still not covered: the in-app Chat/Dashboard toggle path was not exercised, because that control
only appears once a thread has pinned widgets. Face persistence was verified through the same
sessions.patchcall that the toggle issues.src/gateway's full suite could not run locally: it crashes a Vitest worker on this machine underNode 26.5.0 (CI uses Linux Node 24), including on tests this branch does not touch (
mcp-http,image-attachment cases in
server.agent.*), andmain's CI is green on those. CI is authoritativefor that suite.