fix(ui): prioritize displayName over label in webchat session picker#13108
Merged
gumadeiras merged 2 commits intoopenclaw:mainfrom Feb 10, 2026
Merged
Conversation
The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645
Contributor
Author
|
@greptile please re-review this PR. |
Comment on lines
+7
to
+9
| function row(overrides: Partial<SessionRow> & { key: string }): SessionRow { | ||
| return { kind: "direct", updatedAt: Date.now(), ...overrides }; | ||
| } |
Contributor
There was a problem hiding this comment.
Nondeterministic updatedAt
row() sets updatedAt: Date.now(), which makes the test data time-dependent. If any logic in SessionsListResult["sessions"][number] consumers (or future changes to resolveSessionDisplayName) starts to incorporate updatedAt, these tests will become flaky across runs. Prefer a fixed constant timestamp in the helper (e.g. updatedAt: 0) to keep the fixtures deterministic.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/ui/app-render.helpers.node.test.ts
Line: 7:9
Comment:
**Nondeterministic `updatedAt`**
`row()` sets `updatedAt: Date.now()`, which makes the test data time-dependent. If any logic in `SessionsListResult["sessions"][number]` consumers (or future changes to `resolveSessionDisplayName`) starts to incorporate `updatedAt`, these tests will become flaky across runs. Prefer a fixed constant timestamp in the helper (e.g. `updatedAt: 0`) to keep the fixtures deterministic.
How can I resolve this? If you propose a fix, please make it concise.
Contributor
Author
There was a problem hiding this comment.
Fixed — changed Date.now() to 0 in the test helper for deterministic fixtures.
Contributor
Author
|
@greptile please re-review this PR. |
gumadeiras
added a commit
that referenced
this pull request
Feb 10, 2026
Member
ProgramCaiCai
pushed a commit
to ProgramCaiCai/openclaw
that referenced
this pull request
Feb 10, 2026
…penclaw#13108) * fix(ui): prioritize displayName over label in webchat session picker The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645 * test: use deterministic updatedAt in session display name tests
YanHaidao
added a commit
to YanHaidao/clawdbot
that referenced
this pull request
Feb 10, 2026
* 'main' of github.com:YanHaidao/clawdbot: (94 commits) fix(auto-reply): prevent sender spoofing in group prompts Discord: add exec approval cleanup option (openclaw#13205) CI: extend stale timelines to be contributor-friendly (openclaw#13209) fix: enforce Discord agent component DM auth (openclaw#11254) (thanks @thedudeabidesai) refactor(security,config): split oversized files (openclaw#13182) Commands: add commands.allowFrom config CI: configure stale automation fix(signal): enforce mention gating for group messages (openclaw#13124) fix(ui): prioritize displayName over label in webchat session picker (openclaw#13108) Chore: add testflight auto-response Docker: include A2UI sources for bundle (openclaw#13114) fix: unify session maintenance and cron run pruning (openclaw#13083) docs: expand vulnerability reporting guidelines in SECURITY.md docs: add vulnerability reporting guidelines to CONTRIBUTING.md refactor: consolidate fetchWithTimeout into shared utility fix(memory): default batch embeddings to off Improve code analyzer for independent packages, CI: only run release-check on push to main fix(tools): correct Grok response parsing for xAI Responses API (openclaw#13049) chore(deps): update dependencies, remove hono pinning Update contributing, deduplicate more functions ...
Hansen1018
pushed a commit
to Hansen1018/openclaw
that referenced
this pull request
Feb 10, 2026
…penclaw#13108) * fix(ui): prioritize displayName over label in webchat session picker The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645 * test: use deterministic updatedAt in session display name tests
michaelleone
pushed a commit
to michaelleone/openclaw
that referenced
this pull request
Feb 11, 2026
…penclaw#13108) * fix(ui): prioritize displayName over label in webchat session picker The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645 * test: use deterministic updatedAt in session display name tests
skyhawk14
pushed a commit
to skyhawk14/openclaw
that referenced
this pull request
Feb 13, 2026
…penclaw#13108) * fix(ui): prioritize displayName over label in webchat session picker The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645 * test: use deterministic updatedAt in session display name tests
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#13108) * fix(ui): prioritize displayName over label in webchat session picker The session picker dropdown in the webchat UI was showing raw session keys instead of human-readable display names. resolveSessionDisplayName() checked label before displayName and formatted displayName-based entries as key (displayName) instead of displayName (key). Swap the priority so displayName is checked first, and use a consistent humanName (key) format for both displayName and label fallbacks. Fixes openclaw#6645 * test: use deterministic updatedAt in session display name tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolveSessionDisplayName()inapp-render.helpers.tscheckedlabelbeforedisplayNameand formatted displayName entries askey (displayName)instead ofdisplayName (key), causing the session picker dropdown to show raw session keys prominently instead of human-readable names.displayNameis checked first, and use a consistenthumanName (key)format for bothdisplayNameandlabelfallbacks.Test plan
pnpm buildpassespnpm checkpasses (format + typecheck + lint)Fixes #6645
Greptile Overview
Greptile Summary
This PR adjusts
resolveSessionDisplayName()inui/src/ui/app-render.helpers.tsso the session picker renders a human-friendlydisplayNameahead oflabel, and formats both as"<name> (<key>)"when the name differs from the raw session key. It also adds a focused node-only Vitest suite (ui/src/ui/app-render.helpers.node.test.ts) covering fallback/whitespace/trim/key-match cases to lock in the intended dropdown display behavior.Confidence Score: 5/5