Repository navigation
refactor(ui): share cached message extraction - #144244
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 9:16 AM ET / 13:16 UTC (Revision 3). ClawSweeper reviewWhat this changesShares the Control UI’s cache-reading logic for chat text and reasoning while preserving their separate caches and existing output. Merge readiness✅ Ready for maintainer review The unchanged head remains a sound, bounded cleanup with no actionable findings. Current main still contains the duplicated logic, and the prior review projection contains no outstanding findings or rank-up moves. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI extracts display text and reasoning from chat message objects. These cached projections feed chat rendering, filtering, and Markdown export. flowchart LR
A[Chat message] --> B[Text or reasoning request]
B --> C{Object already cached?}
C -->|Yes| D[Separate text and reasoning caches]
C -->|No| E[Existing extractor]
E --> D
D --> F[Chat display and export]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -2. Total -2 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one private cache-read helper while retaining independent text and reasoning extraction and cache lifetimes. Do we have a high-confidence way to reproduce the issue? Not applicable: the PR explicitly proposes a refactor, not a bug fix; its reported baseline/candidate checks demonstrate preservation rather than defect reproduction. Is this the best way to solve the issue? Yes. The private helper removes duplication without introducing another cache owner, public API, persistence format, or caller migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5ff5dcefeb47. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review Please refresh the completed review for unchanged head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* commit 'f2ce199238e974b1d4caff8f11112aa51eb00d9e': (310 commits) refactor(copilot): deduplicate transcript user text (#144888) refactor(sessions): await discovery and config readiness (#144854) refactor(e2e): deduplicate release file assertions (#144904) ci: keep growing hosted test plans within the job cap (#144965) fix(macos): avoid stale dashboard command assertions (#144710) refactor(memory): await standing intent operations (#144832) refactor(ui): derive native device settings types from schemas (#144705) refactor(memory): await journal operations and allocate sequences atomically (#144824) refactor(tests): share command field assertions (#144955) refactor(matrix): share bounded context cache insertion (#144939) refactor(i18n): share Apple catalog reader (#144848) fix(doctor): preserve legacy registry files when quarantine fails (#144787) refactor(tests): reuse PixVerse auth fixtures (#144926) fix(bonjour): silence transient ENODEV socket warnings (#144870) fix(matrix): preserve unrelated files when migration fails (#144883) feat(sqlite): run Team Reports storage in owned workers (#144871) fix(update): install explicit same-version artifacts (#144894) refactor(ui): share cached message extraction (#144244) refactor: normalize Claude usage responses at one boundary (#144707) refactor: simplify CLI child listener registration (#144929) ...
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Maintainer-requested cleanup of duplicated caching in Control UI chat text and
reasoning extraction. This is a behavior-preserving refactor, not a bug fix.
Why This Change Was Made
Use one private, concrete cache-read helper while retaining the separate
module-lifetime text and thinking caches and their existing extractors. Original
object keys, lazy independent extraction, cached null and empty results,
non-object bypass, and uncached exceptions remain unchanged.
The change is limited to
ui/src/lib/chat/message-extract.ts. No new exports,test edits, caller changes, configuration, persistence, or appearance changes.
User Impact
No user-visible change. Chat text projection and reasoning formatting retain
their existing behavior.
Evidence
message-extract.test.tsandchat-imported-history.test.ts: 59 testspassed on the baseline and the candidate. This is preservation PASS/PASS, not
a defect reproduction.
typechecks, dead-export checks, and targeted lint.
chat-reasoning-visibility.e2e.test.tsandchat-export-attribution.e2e.test.tspassed 8/8 on the baseline and 8/8 on thecandidate. Existing assertions cover reasoning visibility, reload, local
toggles, formatting, copy, and export attribution.
680fc46558fd9ce72f903987a675633770202443, candidate70ad6dd13f5c16053b44776cc1eeebac5ff50b88. The materialized candidate treematched the committed source tree; source and test blobs were verified before
both runs.
Both test runs passed before the wrapper exited 1 during cleanup due to a
transport timeout. Cleanup was subsequently recovered, and an independent
provider status read confirmed completion. No global wrapper exit-0 claim.
Commands completed locally: