Skip to content

feat(ui): named glyphs and custom emoji entry for session icons - #124629

Merged
steipete merged 5 commits into
mainfrom
steipete/session-icon-picker-v3
Aug 16, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/session-icon-picker-v3

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #124034, #124335

What Problem This Solves

The session icon picker only offered a fixed emoji grid. The intended design also includes monochrome icon choices and a path to any emoji, including the operating system emoji picker, but neither path had a UI.

Why This Change Was Made

This is the maintainer-approved third design pass. The session icon grammar now accepts exactly one RGI emoji or one curated glyph id: braces, book, monitor, bot, kanban, or coins. Those ids are deliberately disjoint from the six attention ids, and tests assert that boundary.

normalizeSessionIconValue moved to packages/gateway-protocol as the single owner shared by gateway validation, the agent sessions tool, and the picker's live input validation. The custom entry provides a focused input plus Set action and shows the platform OS-picker shortcut (⌃⌘Space / Win+.); browsers cannot open the operating system picker programmatically, so a focused input is the honest integration.

The wire schema is unchanged: icon remains a plain string, so no protocol bump is needed. Existing stored ⭐ values keep rendering; only the quick-pick slot was replaced by the custom entry cell.

User Impact

The picker gains an Icons section and a “…” custom-emoji entry. Users can choose a named monochrome glyph or enter any supported emoji, and the agent sessions tool accepts the same named glyphs.

Evidence

Still image:

Session icon picker v3

12-second recording covering glyph selection, selected state, the custom entry with a typed emoji, and remove-restores-avatar:

v3-picker.mp4

Focused validation after rebasing onto current main:

  • node scripts/run-vitest.mjs ui/src/components/session-menu.test.ts — 38 tests passed
  • node scripts/run-vitest.mjs packages/gateway-protocol/src/session-agent-status.test.ts — 27 tests passed
  • Existing focused proof: menu 38; protocol normalizer 27 + 38; store RPC 7; sessions tool 30; English catalog 263
  • Autoreview clean at 0.98 confidence
  • Diff: +668/-131 across 21 files
  • check-changed phases passed. The aggregate runner reached its six-minute ceiling after the final guard had independently exited 0; this is a runner-ceiling limitation, not a reported failed phase.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 14:10
@steipete steipete self-assigned this Aug 16, 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: 🎥 video Contributor real behavior proof includes video or recording 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 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 10:51 AM ET / 14:51 UTC.

ClawSweeper review

What this changes

This branch expands persistent session icons to accept six named monochrome glyphs or one emoji, adds a custom-emoji picker entry, and shares the grammar across the UI, Gateway, persisted sessions, and agent tool.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. Current main still accepts only emoji session icons; this PR adds the requested glyph and custom-entry capability. The previous accessibility and browser-load findings are addressed on the current head, with no new blocking defect found; the named-glyph downgrade loss remains an intentional compatibility tradeoff.

Priority: P2
Reviewed head: 59366f6d7d4c5829fc36f02184d347dd74a55c0f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation has coherent shared ownership and direct UI proof; its only material merge consideration is the explicitly accepted downgrade behavior.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.
Evidence reviewed 8 items Current-main gap: Current main validates a persistent icon solely as an RGI emoji, so it does not yet provide named glyphs or the custom picker path.
Single validation owner: The branch moves normalization into gateway-protocol, accepting only the six curated ids or a normalized emoji, for use by browser and server callers.
Gateway and persistence boundary: Gateway patches validate through the shared normalizer and stored entries are normalized through that same owner before runtime use.
Findings None None.
Security None None.

How this fits together

Session icon choices flow from the Control UI and agent sessions tool through Gateway validation into stored session metadata, then back to the sidebar’s leading icon. The change broadens that value from emoji alone to emoji or a curated glyph identifier.

flowchart LR
  A[Control UI picker] --> C[Shared icon validation]
  B[Agent sessions tool] --> D[Gateway session patch]
  C --> D
  D --> E[Stored session metadata]
  E --> F[Sidebar leading icon]
Loading

Before merge

  • Resolve merge risk (P1) - An operator who later runs an older emoji-only Gateway can have a stored named glyph normalized to unset; the PR discussion accepts this decorative downgrade loss, but it remains a compatibility risk before merge.
  • Complete next step (P2) - No discrete automated repair remains; this maintainer-owned feature PR needs normal merge handling of its explicit compatibility tradeoff.
Agent review details

Security

None.

PR surface

Source +454, Tests +143, Docs 0. Total +597 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 14 537 83 +454
Tests 5 189 46 +143
Docs 2 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 728 131 +597

Review metrics

Metric Value Why it matters
Production versus test LOC production +508/-83 (net +425); tests +218/-46 (net +172); docs +2/-2 The production growth implements a new cross-boundary UI and validation capability; the accompanying tests cover grammar, picker behavior, Gateway validation, and sidebar rendering.

Stored data model

Persistent data-model change detected: serialized state: packages/gateway-protocol/src/session-agent-status.test.ts, serialized state: packages/gateway-protocol/src/session-agent-status.ts, serialized state: src/agents/tools/sessions-tool.test.ts, serialized state: src/agents/tools/sessions-tool.ts, serialized state: src/config/sessions/store-entry-shape.ts, serialized state: src/gateway/sessions-patch.ts, and 13 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #124629
Summary: This is the canonical follow-on implementation for named and custom session icons after the merged persistent-icon and grid-picker work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept the documented downgrade loss (recommended)
    Keep the six named glyph identifiers and accept that an older emoji-only Gateway clears them during a downgrade.
  2. Pause glyph identifiers
    Do not merge this feature if preserving a selected icon across Gateway downgrades is required.

Technical review

Best possible solution:

Retain the shared grammar and land only with the recorded acceptance that named glyphs are not preserved through an older Gateway downgrade.

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

Not applicable: this PR adds a capability rather than repairing an established failing behavior; its supplied recording directly demonstrates the intended picker flow.

Is this the best way to solve the issue?

Yes. One protocol-owned normalizer is reused by the picker, Gateway patch path, persisted-session cleanup, and sessions tool, avoiding competing icon grammars.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded, user-visible session-management improvement with no current crash, data-loss, or delivery regression evidenced.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.
  • remove P1: Current review triage priority is P2, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 availability: Current PR review merge-risk labels are merge-risk: 🚨 compatibility.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded, user-visible session-management improvement with no current crash, data-loss, or delivery regression evidenced.
  • merge-risk: 🚨 compatibility: New stored glyph identifiers are invalid to an older emoji-only Gateway and are cleared on downgrade.
  • 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 (recording): The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body provides a short after-fix recording showing glyph selection, selected state, custom emoji entry, and icon removal restoring the avatar.

Evidence

What I checked:

Likely related people:

  • steipete: Merged persistent-icon and grid-picker commits in the same session-menu and session-status surfaces precede this follow-on feature. (role: feature owner and recent area contributor; confidence: high; commits: d2be00e171f6, b170c2c02179; files: ui/src/components/session-menu.ts, src/sessions/session-agent-status.ts, src/gateway/sessions-patch.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 (2 earlier review cycles)
  • reviewed 2026-08-16T14:16:34.457Z sha 6f1b979 :: found issues before merge. :: [P1] Preserve named glyphs across older Gateway writes | [P2] Name the custom emoji input
  • reviewed 2026-08-16T14:33:49.685Z sha 51dd611 :: needs changes before merge. :: [P1] Guard the shared regex before loading it in the browser

ClawSweeper P2: the input had no label relationship; assistive tech announced an unnamed edit control.
@steipete

steipete commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressing both findings from the latest ClawSweeper review:

  • P2 — unnamed custom emoji input: fixed in 51dd611a611. The custom emoji input now derives its aria-label from the existing customEmojiTitle localization key, with a regression assertion. The menu suite is green: 38/38 tests passed.
  • P1 — downgrade erases named glyphs: consciously accepted as a downgrade loss. Any representation that an older emoji-only Gateway could preserve must itself pass emoji-only validation—in other words, it must be an emoji, which defeats the monochrome-glyph feature. A parallel field would expand the persistent schema solely for a decorative downgrade path. The repository's compatibility requirement is that downgraded readers remain safe: there is no crash or corruption; the icon degrades to unset, the same class of cleanup as the shipped legacy hammer value. Re-upgrading and re-picking the glyph fully recovers it.

That leaves the accessibility defect fixed and the downgrade behavior explicitly decided.

CI note: exact-head run 31952704677 initially hit the unrelated test/scripts/openclaw-live-updater.test.ts standalone-checkout teardown race in checks-node-compact-small-29. The test and updater implementation are byte-for-byte identical to origin/main; a focused rerun passed 87/87, and CI attempt 2 plus openclaw/ci-gate are green on 51dd611a611.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 16, 2026
ClawSweeper P1: the picker's static import evaluates this module in the browser; pre-Unicode-Sets engines threw at module scope and took down the session menu. Lazy capability-guarded construction; such engines fall back to the grapheme heuristic as client pre-validation while the Gateway keeps exact RGI validation.
@steipete

Copy link
Copy Markdown
Contributor Author

Accepted and fixed the browser-load P1 in 59366f6.

The Unicode Sets (v flag) regex is now constructed lazily behind a capability guard. Engines without Unicode Sets support fall back to the pre-v3 grapheme heuristic for client-side pre-validation, while the Gateway on Node 22+ continues to validate with the exact RGI pattern. The regression test stubs RegExp to simulate an engine that throws on v, then proves the module still loads and normalization succeeds.

Focused proof on this head:

  • protocol grammar suite: 28/28 passed
  • session-menu suite: 38/38 passed

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. and removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 16, 2026
@clawsweeper clawsweeper Bot added 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 status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 16, 2026
@steipete
steipete merged commit 9873b0f into main Aug 16, 2026
229 checks passed
@steipete
steipete deleted the steipete/session-icon-picker-v3 branch August 16, 2026 14:55
@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 17, 2026
…claw#124629)

* feat(protocol): add named session icon glyphs

* feat(ui): add session glyph and custom emoji picker

* docs: describe named and custom session icons

* fix(ui): give the custom emoji input an accessible name

ClawSweeper P2: the input had no label relationship; assistive tech announced an unnamed edit control.

* fix(protocol): guard the v-flag icon regex for browser module loads

ClawSweeper P1: the picker's static import evaluates this module in the browser; pre-Unicode-Sets engines threw at module scope and took down the session menu. Lazy capability-guarded construction; such engines fall back to the grapheme heuristic as client pre-validation while the Gateway keeps exact RGI 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 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: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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