Skip to content

feat(ui): persistent emoji session icons in the sidebar - #124034

Merged
steipete merged 8 commits into
mainfrom
steipete/sidebar-icon-context-menu-0336cc
Aug 15, 2026
Merged

steipete merged 8 commits into
mainfrom
steipete/sidebar-icon-context-menu-0336cc

Conversation

@steipete

@steipete steipete commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Sessions in the sidebar are only distinguishable by text. Agents can raise transient attention icons, but neither operators nor agents can set a durable visual marker. The old icon session field was retired and ignored.

Why This Change Was Made

This maintainer-requested change restores the owner-approved icon field as a first-class product surface. Icons use an emoji-only, single-grapheme grammar so the six curated attention icons remain unambiguous state signals; attention always outranks the decorative icon, and an empty string clears it. Doctor canonicalization drops invalid legacy values such as hammer.

The pre-existing nullable SQLite icon column is reused, so there is no schema change or version bump. The gateway protocol gains additive icon row and patch fields.

User Impact

The session context menu gains Set icon with eight emoji choices, Remove, and the I shortcut. The agent sessions tool gains an icon patch parameter. In the sidebar, a configured emoji becomes the leading glyph instead of the owner avatar whenever no higher-priority attention state is active.

Evidence

Sidebar: before and after

Before: sidebar sessions are distinguished by text and owner avatars

After: persistent emoji session icons appear as leading sidebar glyphs

Context menu: before and after

Before: the session context menu has no durable icon control

After: the Set icon submenu provides eight emoji choices and Remove

Focused test tails:

session-menu                        32 passed
server.sessions.store-rpc           7 passed
doctor canonical keys              15 passed
session-agent-status               12 passed
scopes                             23 passed
protocol validators               63 passed
agent sessions tool                31 passed
UI reconcile                       17 passed

node scripts/check-changed.mjs exited 0 after full local recovery, including typecheck, lint, i18n, schema, and import-cycle checks, following Blacksmith unavailability and missing Daytona workspace dependencies.

Post-rebase compatibility: current main added a macOS-sensitive group-defaults assertion that compared /var/... with the gateway-canonical /private/var/... path. The branch canonicalizes that expected test path. The first exact-head CI run then exposed two branch-owned gaps: stale generated Swift protocol models and a max-lines overage in the gateway RPC test. The generated model is now current, and icon persistence/clearing assertions were consolidated into the existing RPC flow without changing the seven-test count or any baseline.

Autoreview: clean (Codex gpt-5.6-sol, confidence 0.98) for the feature stack; clean (Codex gpt-5.6-sol, confidence 0.99) for both post-rebase repair passes.

Production LOC: +173/-32. Tests: +114/-37. Generated Swift: +12/-0. Docs: +6/-2.

AI-assisted: yes.

Release-note context: operators and agents can assign persistent per-session emoji icons in the sidebar; no external contributors to credit.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 15, 2026 05:24
@steipete
steipete force-pushed the steipete/sidebar-icon-context-menu-0336cc branch from 6db1184 to 258cf6c Compare August 15, 2026 05:26
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Aug 15, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 2:52 AM ET / 06:52 UTC.

ClawSweeper review

What this changes

The PR adds persistent emoji session icons that operators and agents can set, store, synchronize through the Gateway, and display in the Control UI sidebar.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: current main still intentionally discards session icons, while this maintainer-held PR restores a validated storage-to-Gateway-to-Control-UI path. No patch-introduced correctness defect was found; exact-head CI remains the remaining merge gate.

Priority: P2
Reviewed head: 034e71522817edb0d738c15d6f304ddbc2dba55c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong visible proof and coherent boundary coverage support the feature; remaining exact-head CI is a normal merge gate.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body includes before-and-after screenshots of the sidebar and context-menu flow, supported by focused after-fix boundary tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body includes before-and-after screenshots of the sidebar and context-menu flow, supported by focused after-fix boundary tests.
Evidence reviewed 6 items Current main still removes icons: Current main explicitly clears the retired icon column during session-node updates, so the requested behavior is not already implemented.
Canonical persistence and validation: The PR normalizes or clears icon patches at the Gateway owner boundary, retains valid values in the canonical entry, and writes the promoted SQLite column.
Protocol, event, and UI path: The patch adds the field to the Gateway row schema and event payload, then preserves explicit null clears during UI reconciliation.
Findings None None.
Security None None.

How this fits together

Session metadata is stored in the agent SQLite database, projected into Gateway session rows and events, and reconciled into Control UI navigation. This change adds a durable icon alongside existing transient attention state and renders it when no attention marker takes precedence.

flowchart LR
  A[Operator or agent] --> B[Session icon patch]
  B --> C[Gateway validation]
  C --> D[Session SQLite metadata]
  D --> E[Gateway rows and events]
  E --> F[Control UI reconciliation]
  F --> G[Sidebar glyph]
Loading

Before merge

  • Resolve merge risk (P1) - The PR deliberately changes legacy beta icon patches from silently ignored to validation errors when they are not a single emoji; the stated no-shipped-sender rationale makes this reasonable, but exact-head CI should complete before merge.
  • Complete next step (P2) - No repair is indicated; retain this maintainer-held feature PR for exact-head CI completion and normal merge review.
Agent review details

Security

None.

PR surface

Source +137, Tests +80, Docs +4, Other +12. Total +233 across 41 files.

View PR surface stats
Area Files Added Removed Net
Source 30 169 32 +137
Tests 8 117 37 +80
Docs 2 6 2 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 12 0 +12
Total 41 304 71 +233

Review metrics

Metric Value Why it matters
Production versus test delta production +169/-32; tests +117/-37; generated Swift +12/-0; docs +6/-2 The production growth implements a new persisted protocol and UI capability; focused tests cover its validation, storage, and menu boundaries.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-session-canonical-keys.test.ts, serialized state: packages/gateway-protocol/src/schema/sessions-patch.ts, serialized state: packages/gateway-protocol/src/schema/sessions-row.ts, serialized state: src/agents/tools/sessions-tool.test.ts, serialized state: src/agents/tools/sessions-tool.ts, serialized state: src/commands/doctor-session-canonical-keys.test.ts, and 23 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Finish exact-head compatibility checks (recommended)
    Let the remaining exact-head CI complete while retaining the documented fail-loud handling for unsupported legacy non-emoji icon patches.
  2. Pause if beta-client compatibility is required
    Do not merge if maintainers need pre-release v4 clients to keep silently discarding arbitrary legacy icon values.

Technical review

Best possible solution:

Land the single canonical emoji-only icon path after exact-head CI confirms the additive protocol, native generated models, persisted session entries, and Control UI behavior together.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds a capability rather than repairing a reported existing-behavior failure; its screenshots and focused tests demonstrate the after-fix flow.

Is this the best way to solve the issue?

Yes. Reusing the existing nullable SQLite column and restoring one validated canonical session field is cleaner than creating separate UI-only state or a parallel compatibility path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7bb3909e4b5a.

Labels

Label justifications:

  • P2: This is a bounded user-facing session-management feature spanning persistence, Gateway protocol, and the Control UI.
  • merge-risk: 🚨 compatibility: Reactivating a retired persisted field changes Gateway patch behavior for legacy callers and requires native-client and upgrade-path confirmation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes before-and-after screenshots of the sidebar and context-menu flow, supported by focused after-fix boundary tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before-and-after screenshots of the sidebar and context-menu flow, supported by focused after-fix boundary tests.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes before-and-after screenshots of the sidebar and context-menu flow, supported by focused after-fix boundary tests.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the prior session-icon retirement path to this contributor, who also has recent Gateway/session history and owns this PR's coherent replacement. (role: recent area contributor; confidence: high; commits: a32a7ae9af96, c7090706d4b0; files: src/config/sessions/session-accessor.sqlite-entry-store.ts, src/gateway/sessions-patch.ts, ui/src/components/session-leading-indicator.ts)

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 (3 earlier review cycles)
  • reviewed 2026-08-15T05:53:41.158Z sha 0dc097adad4242c883b6d579747ae79ab365d8e4 :: found issues before merge. :: [P2] Reject non-emoji graphemes
  • reviewed 2026-08-15T06:23:17.132Z sha d3bd38d11ec9f1b5f68c58181436e38302a28068 :: found issues before merge. :: [P2] Reject non-emoji graphemes
  • reviewed 2026-08-15T06:34:30.507Z sha d667530 :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Aug 15, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI update: the checks-node-compact-small-42 failure was main breakage from #124024, which added extensions/memory-core/src/memory/manager-session-update-race.test.ts without updating src/scripts/test-projects.test.ts. This PR carries the one-line inventory registration required by the repo's broken-CI rule. Focused proof: 84/84 passed.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 15, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper checklist:

  • Reject non-emoji graphemes (P2): fixed by b8a5c86582e with an anchored \p{RGI_Emoji} check. 漢 and ä are rejected; keycap, ZWJ, and flag sequences are accepted; all eight menu emoji are verified.
  • Resolve merge risk (P1): consciously kept fail-loud. No shipped sender exists: Control UI is gateway-served and cannot version-skew, while the native apps' generated Swift models lacked this field until this PR, so no tagged release ever sent icon patches. Silently dropping the field would recreate the silent-failure bug class the repository doctrine ranks worst.
  • Complete next step (P2): satisfied by b8a5c86582e on this branch.

Focused proof: session-agent-status 15/15, test-projects 84/84, autoreview clean at 0.98.

ClawSweeper P2: single non-emoji graphemes like 漢 passed the segmenter-based predicate. Anchored \p{RGI_Emoji} admits exactly one interchange emoji sequence and deletes the length cap and ASCII carve-out.
@steipete
steipete force-pushed the steipete/sidebar-icon-context-menu-0336cc branch from b8a5c86 to d667530 Compare August 15, 2026 06:28
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Aug 15, 2026
@steipete
steipete merged commit d2be00e into main Aug 15, 2026
194 checks passed
@steipete
steipete deleted the steipete/sidebar-icon-context-menu-0336cc branch August 15, 2026 07:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
)

* feat(gateway): persist emoji session icons

* feat(ui): add persistent session icon menu

* docs: explain persistent session icons

* docs: list Set icon in the session context menu enumeration

* test(gateway): canonicalize group defaults workspace path

* fix(ci): sync session icon protocol coverage

* fix(sessions): enforce RGI emoji sequences for session icons

ClawSweeper P2: single non-emoji graphemes like 漢 passed the segmenter-based predicate. Anchored \p{RGI_Emoji} admits exactly one interchange emoji sequence and deletes the length cap and ASCII carve-out.

* fix(sessions): compile RGI emoji validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui commands Command implementations 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. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant