Skip to content

fix(tui): label persisted session inventory accurately - #147273

Merged
steipete merged 3 commits into
mainfrom
codex/qa-tui-stored-inventory-current-20260913
Sep 15, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa-tui-stored-inventory-current-20260913

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway diagnostics in the terminal UI call persisted conversation inventory “Active sessions,” even when it includes archived conversations and retired agent namespaces.

User Impact

Both /gateway-status and /gwstatus now display “Stored sessions.” Counts, JSON, authorization and session lifecycle behavior are unchanged. No migration or configuration change is needed.

Why This Change Was Made

Correct the label in the existing shared formatter, matching the CLI terminology fixed in #146979. Production is +1/−1, net zero. Existing handler and SQLite inventory fixtures cover both aliases and archived/retired rows; docs explain what is counted.

Evidence

Retained native Gateway/TUI proof at 09cfbcef2c924f526b433a4abc5079a800eb01f3 plus the exact production patch shows the label changing while counts remain 4 and 5. All four inspected, synthetic before/after screenshots are below. Later source refreshes preserve the exact four reviewed postimages; those refreshes are not presented as additional native runs. The retained focused test run passed 289 cases, and independent review found no actionable issues.

Command Before After
/gateway-status Before: Active sessions 4 After: Stored sessions 4
/gwstatus Before: Active sessions 5 After: Stored sessions 5

Current validation

Head 0400692a5f9ddfed09332e065d1813339e50efdf incorporates main ea4428a6a4dad8de980f4e02037c86d79496690f by a normal merge. The four-file repair is unchanged. Fresh CI 34933428935 and Workflow Sanity 34933428933 passed on this exact head. The CI logs explicitly show both diagnostic aliases, both mixed/fully archived-and-retired inventory cases, and both formerly failing include-exclusion cases passing. Those jobs executed merge 094bc84c8abf35c0fb5fd29176fcdae371518e1e over 4d616957712663c069c0e64f951340ec3558d998, with all four PR files and the include-test file matching this head.

The preceding CI run passed both alias cases and both mixed/fully archived inventory cases, but failed two unrelated included-config writer-exclusion tests. That failure remains recorded. Current main includes #148743, which drains observation workers before fixture deletion without changing assertions or timeouts. Its author did not reproduce the original exception, so this refresh does not claim that cleanup alone establishes the exception’s root cause. A bounded local investigation on the preceding head passed the full 15-case config file and captured no exception; the original exception’s cause remains unproven despite the fresh CI passes.

The current-head ClawSweeper review completed with no actionable findings or before-merge items.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 1:41 AM ET / 05:41 UTC (Revision 4).

ClawSweeper review

What this changes

The PR changes the terminal UI’s session-count label to “Stored sessions,” documents archived-session inclusion, and extends existing regression coverage.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main still mislabels stored inventory as active sessions. The focused repair has convincing before/after evidence and no actionable findings.

Priority: P3
Reviewed head: 0400692a5f9ddfed09332e065d1813339e50efdf

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with strong visual proof and useful existing-fixture coverage.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected native Gateway/TUI before/after screenshots show the shared formatter’s label correction for both diagnostic aliases with counts preserved at 4 and 5; retained proof is attributed to its original revision plus the label patch, not a fresh head run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected native Gateway/TUI before/after screenshots show the shared formatter’s label correction for both diagnostic aliases with counts preserved at 4 and 5; retained proof is attributed to its original revision plus the label patch, not a fresh head run.
Evidence reviewed 8 items Verified introduced change: The pinned base-to-head diff matches the supplied introduction evidence: the only production change replaces the displayed label without changing arithmetic, requests, authorization, or persistence.
Still necessary on current main: The fetched main formatter still prints “Active sessions.” The merged CLI terminology correction at #146979 addresses a separate formatter and does not supersede this TUI repair.
Latest release comparison: The v2026.9.4 formatter also contains the old label; the requested TUI correction is not present in the supplied latest release.
Findings None None.
Security None None.

How this fits together

The terminal UI requests Gateway diagnostics and formats the returned session inventory for display. The inventory counts stored conversations, including archived rows and retired agent namespaces.

flowchart LR
  A[Gateway status command or alias] --> B[Gateway status request]
  C[Stored conversation inventory] --> D[Status summary]
  B --> D
  D --> E[Terminal status formatter]
  E --> F[Stored sessions count]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +6, Docs 0. Total +6 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 8 2 +6
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 10 4 +6

Review metrics

None.

Technical review

Best possible solution:

Keep the existing inventory calculation and use accurate stored-session terminology consistently across CLI and TUI diagnostics.

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

Yes: current main passes stored inventory to a formatter that calls it active; archived-row fixtures establish the mismatch. This review did not execute a fresh reproduction.

Is this the best way to solve the issue?

Yes: changing the existing shared formatter fixes both aliases without introducing a competing counter, migration, or configuration surface.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4d6169577126.

Labels

Label justifications:

  • P3: This corrects misleading diagnostic wording while preserving session counts and runtime behavior.
  • 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): Inspected native Gateway/TUI before/after screenshots show the shared formatter’s label correction for both diagnostic aliases with counts preserved at 4 and 5; retained proof is attributed to its original revision plus the label patch, not a fresh head run.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected native Gateway/TUI before/after screenshots show the shared formatter’s label correction for both diagnostic aliases with counts preserved at 4 and 5; retained proof is attributed to its original revision plus the label patch, not a fresh head run.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected native Gateway/TUI before/after screenshots show the shared formatter’s label correction for both diagnostic aliases with counts preserved at 4 and 5; retained proof is attributed to its original revision plus the label patch, not a fresh head run.

Evidence

What I checked:

  • Verified introduced change: The pinned base-to-head diff matches the supplied introduction evidence: the only production change replaces the displayed label without changing arithmetic, requests, authorization, or persistence. (src/tui/tui-status-summary.ts:65, 0400692a5f9d)
  • Still necessary on current main: The fetched main formatter still prints “Active sessions.” The merged CLI terminology correction at fix(status): label stored sessions accurately #146979 addresses a separate formatter and does not supersede this TUI repair. (src/tui/tui-status-summary.ts:65, 4d6169577126)
  • Latest release comparison: The v2026.9.4 formatter also contains the old label; the requested TUI correction is not present in the supplied latest release. (src/tui/tui-status-summary.ts:65, 3a9d69db306c)
  • Inventory semantics and regression coverage: The status owner aggregates each physical store’s count. Existing SQLite fixtures include archived and retired-namespace rows; the added assertions verify their TUI label. Handler coverage exercises both aliases without sending an agent chat request. (src/commands/status.summary-read-only.test.ts:334, 0400692a5f9d)
  • Inspected native visual evidence: Inspected all four prepared images linked in the captured PR body. The before/after pairs show the displayed label changing while counts remain 4 and 5. The body attributes native proof to 09cfbce plus the production patch; comparison with that revision shows exactly the label hunk. These are retained observations, not a new current-head runtime execution. (src/tui/tui-status-summary.ts:65, 0400692a5f9d)
  • Re-review continuity: All four reviewed files are unchanged from the previous completed review. Its projection contains no findings or published rank-up moves. The body separately records config-test failures and does not claim the cleanup in improve: finish config test database work before cleanup #148743 proves their root cause. (0400692a5f9d)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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-09-13T19:10:14.436Z sha 12b4da7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T19:46:12.288Z sha 35cf6a7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T21:46:15.043Z sha 9632bd3 :: needs maintainer review before merge. :: none

Gateway diagnostics count stored sessions, including archived rows. Correct both command aliases through their shared formatter and cover the real stored inventory. Completes the terminology correction from #146979; production net zero lines.
@steipete
steipete force-pushed the codex/qa-tui-stored-inventory-current-20260913 branch from 12b4da7 to 35cf6a7 Compare September 13, 2026 19:38
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The existing net-zero stored-session label repair is unchanged at 35cf6a734a9722070c519b3da0860c8d413c46ec. Please refresh the completed review against current main. Retained Gateway/TUI proof remains attributed to its original revision; this request does not claim a new runtime run.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit acd9c27 into main Sep 15, 2026
201 of 203 checks passed
@steipete
steipete deleted the codex/qa-tui-stored-inventory-current-20260913 branch September 15, 2026 06:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
Gateway diagnostics count stored sessions, including archived rows. Correct both command aliases through their shared formatter and cover the real stored inventory. Completes the terminology correction from openclaw#146979; production net zero lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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