Skip to content

feat(ui): durable session board face and dashboards index - #114262

Merged
steipete merged 3 commits into
mainfrom
steipete/dashboards-index-durable-face
Jul 27, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/dashboards-index-durable-face

Conversation

@steipete

@steipete steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

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 already
serialize to session_entries.entry_json, so this needs no SQLite schema change and no
schema-version bump
. It is exposed on the session list row and added to the sessions.patch
write-scope allowlist beside label, category, icon, pinned, archived — setting your own
view 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.patch and sessions.list already
carried 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 no
explicit 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.

boardSessionViews keeps activeTabId and reopenDockByTab, 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.

/dashboards index. Lists threads whose preferred face is dashboard, most recently updated
first. Filtering runs server-side in filterSessionEntries before pagination — the client holds
only 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, not face. src/plugins/session-entry-slot-keys.ts reserves
every SessionEntry key against plugin extension slots, so the name is claimed permanently across
the plugin ecosystem; face is 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. /dashboards shows your dashboard threads
in 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

Gate Result
tsgo ui / core / extensions / test-ui pass
packages/gateway-protocol 303 passed
ui/src/lib/sessions 157 passed
ui/src/app 448 passed
ui/src/pages 3024 passed, 9 skipped
ui/src/components 911 passed, 20 skipped
src/config/sessions 690 passed
src/gateway/method-scopes 141 passed
src/gateway/sessions-patch 87 passed
src/gateway/server.sessions.face 2 passed
run-oxlint / oxfmt --check (52 files) pass
pnpm ui:i18n:verify pass (106 baseline entries, 4038 keys)

Behavioral coverage: a write-scoped face patch is visible to another client; an unknown patch field
still requires operator.admin; sessions.list applies the face filter before pagination; the
protocol validator rejects the pre-rename face key; generic navigation resolves a thread's stored
face; /dashboards requests 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 build on an
isolated OPENCLAW_STATE_DIR and free port, and drove the Control UI in a browser:

  1. /chat/main — canonical path resolves, no ?session= query.
  2. /dashboards — renders with the empty state ("No dashboards yet / Open a thread and switch to
    the Dashboard face to add it here.").
  3. A separate WebSocket operator client called sessions.list {boardFace:"dashboard"} -> 0,
    then sessions.patch {key:"agent:main:main", boardFace:"dashboard"} -> entry.boardFace persisted,
    then sessions.list again -> 1 (agent:main:main=dashboard). This exercises the server-side
    filter, not a client-side one.
  4. The browser — a client that never saw that patch — was reloaded and listed the thread
    ("Main Thread / agent:main:main / just now"). This is the cross-device claim, observed rather
    than inferred.
  5. Index rows link to /dashboard/main (the dashboard namespace, not /chat).
  6. /dashboard/main resolves and stays canonical. The board surface is absent only because the
    thread has no pinned widgets yet, which matches documented behavior.

Two staleness traps worth recording: the gateway serves prebuilt dist/control-ui and dist/*.js,
so a browser check against an unbuilt tree silently tests old code — the first attempt showed
/dashboards falling through to /chat/main purely because the bundle predated the route, and a
later attempt showed the gateway rejecting boardFace because 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.patch call that the toggle issues.

src/gateway's full suite could not run locally: it crashes a Vitest worker on this machine under
Node 26.5.0 (CI uses Linux Node 24), including on tests this branch does not touch (mcp-http,
image-attachment cases in server.agent.*), and main's CI is green on those. CI is authoritative
for that suite.

steipete added 2 commits July 26, 2026 20:23
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.
@steipete
steipete marked this pull request as ready for review July 27, 2026 03:31
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: L maintainer Maintainer-authored PR labels Jul 27, 2026
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.
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 27, 2026, 12:15 AM ET / 04:15 UTC.

ClawSweeper review

What this changes

The 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 /dashboards index.

Merge readiness

⚠️ Needs maintainer review before merge - 3 items remain

Keep 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
Reviewed head: 8dd8d33a58f4a03a9d12615dd0d2e3a03fcc130e

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR has strong real-behavior evidence and broad validation, but the cached-only navigation resolver leaves a normal user path inconsistent with the new durable-preference promise.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.
Evidence reviewed 4 items Cached-row resolver: The new resolver searches only context.sessions.state.result?.sessions and defaults to Chat when no matching row is present; it has no lookup path for a persisted boardFace outside that page.
Generic callers can lack the row: Tasks, Workboard, Worktrees, and shell-level navigation call the cached-row resolver using a session key. The PR itself keeps the ordinary client list capped at 50 rows, so these callers can navigate to a known session whose preferred face is not cached.
Real behavior proof: The PR body records an after-fix real Gateway and browser run: a separate WebSocket client patches and server-filters boardFace, then a browser reload observes the session and /dashboards route. The associated Real behavior proof workflow is successful.
Findings 1 actionable finding [P2] Resolve the preferred face when the row is not cached
Security None None.

How this fits together

Control UI session rows come from Gateway sessions.list and are used to construct links from sidebars, session lists, tasks, and workboards. This change writes a persistent face preference through sessions.patch, returns it with session rows, and uses it to choose Chat or Dashboard routes.

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]
Loading

Before merge

  • Resolve the preferred face when the row is not cached (P2) - resolveSessionPreferredFaceForKey searches only the current session-list result, which is capped, then defaults to Chat. Tasks, Workboard, Worktrees, and shell navigation can target a session outside that page, so a persisted Dashboard preference is silently ignored. This is the still-unfixed blocker from the prior review cycle.
  • Resolve merge risk (P1) - Merging as written makes the durable preference best-effort: any generic entry point whose target session is outside the currently cached page silently routes to Chat, contradicting the cross-device and “generic navigation” behavior promised by the PR.
  • Complete next step (P2) - The remaining defect is concrete, but maintainers should choose the authoritative miss-path boundary—targeted session lookup versus propagating row state—before a repair is attempted.

Findings

  • [P2] Resolve the preferred face when the row is not cached — ui/src/lib/sessions/route-navigation.ts:57-60
Agent review details

Security

None.

PR surface

Source +251, Tests +266, Docs +15, Other +12. Total +544 across 55 files.

View PR surface stats
Area Files Added Removed Net
Source 36 296 45 +251
Tests 15 286 20 +266
Docs 3 15 0 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 1 12 0 +12
Total 55 609 65 +544

Review metrics

Metric Value Why it matters
Persisted session preference 1 added stored session field (boardFace) The field changes cross-device session behavior and must resolve consistently for both cached and uncached session-link paths.

Stored data model

Persistent data-model change detected: serialized state: packages/gateway-protocol/src/schema/sessions-row.ts, serialized state: packages/gateway-protocol/src/schema/sessions.ts, serialized state: src/config/sessions/types.ts, serialized state: src/gateway/session-utils-row.ts, serialized state: src/gateway/session-utils.types.ts, serialized state: ui/src/lib/sessions/index-list.test.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Resolve uncached session faces before navigation (recommended)
    Add an authoritative lookup or propagate boardFace to each generic navigation caller so a stored Dashboard preference is honored even when the normal session page lacks that row.
  2. Accept page-cache-dependent navigation
    Land the current behavior knowing that off-page session links may open Chat until a later navigation refreshes their row.

Technical review

Best 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 boardFace: "dashboard" for a session not present in the capped context.sessions result, then open that session through a Tasks, Workboard, Worktrees, or shell-level generic link; the resolver defaults it to Chat.

Is this the best way to solve the issue?

No. Persisting the preference and filtering /dashboards server-side are sound, but the cached-only resolver leaves a concrete path where the persisted preference is ignored; an authoritative miss path or propagated row data is needed.

Full review comments:

  • [P2] Resolve the preferred face when the row is not cached — ui/src/lib/sessions/route-navigation.ts:57-60
    resolveSessionPreferredFaceForKey searches only the current session-list result, which is capped, then defaults to Chat. Tasks, Workboard, Worktrees, and shell navigation can target a session outside that page, so a persisted Dashboard preference is silently ignored. This is the still-unfixed blocker from the prior review cycle.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 66714b862267.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded user-visible navigation defect in a new Control UI feature, not an availability or security emergency.
  • merge-risk: 🚨 compatibility: Existing generic session links can now choose a different surface, but only while the target row remains in the local page cache.
  • merge-risk: 🚨 session-state: The new persisted boardFace state is not consistently consumed by generic navigation when the session row is absent from memory.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.
  • proof: sufficient: Contributor real behavior proof is sufficient. The updated PR body provides after-fix Gateway and browser live-output evidence for persisted filtering, cross-client visibility, canonical Dashboard links, and the /dashboards empty state; redact private gateway details if further artifacts are added.

Evidence

What I checked:

  • Cached-row resolver: The new resolver searches only context.sessions.state.result?.sessions and defaults to Chat when no matching row is present; it has no lookup path for a persisted boardFace outside that page. (ui/src/lib/sessions/route-navigation.ts:57, 8dd8d33a58f4)
  • Generic callers can lack the row: Tasks, Workboard, Worktrees, and shell-level navigation call the cached-row resolver using a session key. The PR itself keeps the ordinary client list capped at 50 rows, so these callers can navigate to a known session whose preferred face is not cached. (ui/src/pages/tasks/tasks-page.ts:386, 8dd8d33a58f4)
  • Real behavior proof: The PR body records an after-fix real Gateway and browser run: a separate WebSocket client patches and server-filters boardFace, then a browser reload observes the session and /dashboards route. The associated Real behavior proof workflow is successful. (8dd8d33a58f4)
  • Feature-history provenance: The merged predecessor established path-based Chat and Dashboard navigation; this PR builds on that route contract and its author is also the merged predecessor’s author. (ui/src/lib/sessions/route-navigation.ts:43, cca5b147857d)

Likely related people:

  • steipete: Authored the merged path-based session/dashboard navigation predecessor and this follow-up, covering the route and session-navigation boundary affected here. (role: feature owner and recent area contributor; confidence: high; commits: cca5b147857d, 8dd8d33a58f4; files: ui/src/lib/sessions/route-navigation.ts, ui/src/pages/chat/chat-page.ts, ui/src/pages/dashboards/route.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Fix the uncached-row navigation path and add focused regression coverage for a generic caller targeting a session outside the cached list page.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-27T03:40:39.940Z sha 8dd8d33 :: needs real behavior proof before merge. :: [P2] Resolve the preferred face when the row is not cached

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision on ClawSweeper's P2

Finding accepted as real. resolveSessionPreferredFaceForKey searches only
context.sessions.state.result?.sessions — the client's capped page (DEFAULT_SESSION_LIST_QUERY.limit = 50).
A thread linked from Tasks, Workboard, or Worktrees that is not in that page resolves to Chat even
when its persisted boardFace is dashboard. ClawSweeper is right that this is inconsistent with
the durable-preference promise.

Decision: land this PR, fix it in the follow-up. Reasoning:

  1. The uncached case degrades to exactly today's behavior. Before this PR there is no durable face
    at all, so no user loses anything relative to main; they simply do not yet gain the preference
    for threads outside the loaded page.
  2. The correct fix is not a local patch. sessionNavigationTarget builds its href synchronously,
    so a gateway lookup cannot be dropped into the resolver. The right shape is for callers with no
    explicit face intent to say so, and for the route loader to canonicalize once it has resolved the
    row — reusing the self-healing history.replace introduced in feat(ui): path-based session and dashboard URLs #113883.
  3. That is the same mechanism needed for a separate requested feature: best-effort slug resolution,
    where /chat/<agent>/<slug> resolves to the matching session when unambiguous. sessions.list
    already matches display name globally before pagination, and feat(ui): path-based session and dashboard URLs #113883's disambiguation view
    already handles ties.

Bundling both into one follow-up keeps this PR at its verified scope instead of growing new
resolution logic into a branch that is already green and browser-verified.

Follow-up (PR 3): resolve session references against the gateway rather than the cached page.

  • uncached thread -> real stored boardFace for generic navigation
  • /chat/roboclaw/default-mode-with-rare-surprises -> ...-4f385725 when unambiguous
  • ambiguous slug -> existing disambiguation view
  • no new RPC required; sessions.list search is applied in filterSessionEntries before pagination

@steipete
steipete merged commit 8b66fc1 into main Jul 27, 2026
253 of 270 checks passed
@steipete
steipete deleted the steipete/dashboards-index-durable-face branch July 27, 2026 04:35
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 27, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant