Skip to content

fix(ui): restore terminal button in chat header - #120436

Merged
steipete merged 2 commits into
mainfrom
steipete/missing-terminal-button-3412cc
Aug 8, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/missing-terminal-button-3412cc

Conversation

@steipete

@steipete steipete commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

AI-assisted: Yes. The implementation and PR preparation were AI-assisted, and the final UI-only branch autoreview was clean.

What Problem This Solves

Ordinary chat users lost the always-visible terminal action after collapsed workspace chrome was removed. The terminal became discoverable only after opening the workspace rail or using a shortcut.

Why This Change Was Made

This uses one shared chat-header terminal renderer. Ordinary sessions consume the existing availability-gated toggle callback, while catalog sessions retain their targeted eligibility checks.

User Impact

Terminal-capable sessions again show an accessible Toggle terminal button in the chat header. Unavailable sessions remain unchanged.

Evidence

@steipete
steipete marked this pull request as ready for review August 8, 2026 02:44
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 8, 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. P2 Normal backlog priority with limited blast radius. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 4:49 AM ET / 08:49 UTC.

ClawSweeper review

What this changes

The PR makes the terminal toggle visible in the web chat header for eligible ordinary sessions while preserving the catalog session’s separate open-in-terminal behavior.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No patch defect was found: the change restores the ordinary-session action by reusing its existing availability-gated callback while retaining catalog eligibility. This protected maintainer PR is currently dirty against main, so it needs a rebase, exact-head validation, and human merge review.

Priority: P2
Reviewed head: bb36368ff6d0619d389ccefbf123e09f27cb9a54
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered repair with no code finding, but its current dirty merge state prevents an exact-head merge verdict.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the claimed browser run was not independently inspectable while GitHub DNS was unavailable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the claimed browser run was not independently inspectable while GitHub DNS was unavailable.
Evidence reviewed 6 items Base behavior: The checked-out PR base passes a catalog-only renderer at the header action slot; that renderer returns nothing for non-catalog session keys, which establishes the reported omission in the available source.
Owner-boundary repair: The PR head routes ordinary sessions through the existing workspace callback, while catalog sessions retain their terminal-availability and can-open-terminal checks.
End-to-end UI event contract: The existing callback emits the canonical terminal event with an explicit right dock and open state; the terminal panel consumes that event to open and restore ordinary sessions, while catalog payloads take the catalog-session path.
Findings None None.
Security None None.

How this fits together

The Control UI builds chat-header actions from session state and workspace callbacks. A terminal action either opens the local terminal dock for an ordinary session or resumes an eligible catalog session in a terminal.

flowchart LR
A[Chat session state] --> B[Chat header]
C[Workspace terminal callback] --> B
D[Catalog eligibility] --> E[Shared terminal action]
B --> E
E --> F[Terminal panel event]
F --> G[Terminal dock or catalog session]
Loading

Decision needed

Question Recommendation
Should this protected maintainer PR be rebased onto current main and revalidated as the canonical terminal-header repair? Rebase and validate: Resolve the current-main header/test conflict, retain the existing ordinary and catalog terminal contracts, and review the exact rebased head.

Why: The reported dirty merge state overlaps a current-main change to the same header surface, and the exact post-rebase behavior cannot be established from the unavailable current-main blob.

Before merge

  • Resolve merge risk (P1) - GitHub reports the branch as dirty, and current main changed the same chat-header/test surface after the PR base; merge safety requires resolving the rebase and reviewing the resulting exact head.
  • Resolve merge risk (P1) - The local partial clone could not read the current-main header blob and GitHub DNS was unavailable, so current-main equivalence and the latest ClawSweeper rank-up moves could not be independently verified.
  • Complete next step (P2) - The protected maintainer PR needs an owner-led rebase and exact-head validation, not an automated replacement repair.
Agent review details

Security

None.

PR surface

Source +10, Tests +58. Total +68 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 18 8 +10
Tests 2 60 2 +58
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 78 10 +68

Review metrics

Metric Value Why it matters
Production vs test LOC production +18/-8 (net +10); tests +60/-2 (net +58) The small production increase consolidates two terminal-header cases behind one renderer, while focused tests cover both availability and catalog behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase onto current main, preserve the one callback/event path for ordinary sessions and catalog eligibility path, then obtain exact-head UI validation before maintainer merge review.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase onto current main, preserve the one callback/event path for ordinary sessions and catalog eligibility path, then obtain exact-head UI validation before maintainer merge review.

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

Yes: source on the PR base shows that ordinary session keys always cause the catalog-only renderer to return no header action, while the existing workspace callback defines the intended terminal behavior.

Is this the best way to solve the issue?

Yes, subject to the rebase: sharing the existing availability-gated callback avoids a second event path while preserving the catalog-specific eligibility contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Control UI usability regression on the terminal-capable chat path, without evidence of data loss, security exposure, or service unavailability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository state identifies a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the claimed browser run was not independently inspectable while GitHub DNS was unavailable.

Evidence

What I checked:

  • Base behavior: The checked-out PR base passes a catalog-only renderer at the header action slot; that renderer returns nothing for non-catalog session keys, which establishes the reported omission in the available source. (ui/src/pages/chat/chat-pane-header.ts:171, d9080cfff86c)
  • Owner-boundary repair: The PR head routes ordinary sessions through the existing workspace callback, while catalog sessions retain their terminal-availability and can-open-terminal checks. (ui/src/pages/chat/components/chat-terminal-button.ts:15, bb36368ff6d0)
  • End-to-end UI event contract: The existing callback emits the canonical terminal event with an explicit right dock and open state; the terminal panel consumes that event to open and restore ordinary sessions, while catalog payloads take the catalog-session path. (ui/src/pages/chat/components/chat-session-workspace.ts:800, d9080cfff86c)
  • Regression coverage: The added jsdom test asserts visible ordinary-session control, its typed event payload, and hiding when unavailable; the existing catalog test continues to assert the catalog payload. (ui/src/pages/chat/chat-pane-terminal.test.ts:17, bb36368ff6d0)
  • Feature provenance: Blame ties both the catalog-only header action and existing ordinary-session callback to the same initial header/workspace extraction, so the shared renderer is a coherent repair at the consumer boundary. (ui/src/pages/chat/chat-pane-header.ts:171, fa9626c4e100)
  • Current-main merge state: Current main is c5d00cb, which changed the header and its tests after the PR base; the provided PR state reports a dirty merge. The current-main header blob was promisor-missing and could not be fetched because GitHub DNS was unavailable, so its post-merge source was not claimed as inspected. (c5d00cb47ddb)

Likely related people:

  • steipete: Peter Steinberger authored the original chat-header/catalog-terminal extraction, the availability callback, and this focused repair. (role: feature author and recent area contributor; confidence: high; commits: fa9626c4e100, d8d2f83cc196, bb36368ff6d0; files: ui/src/pages/chat/chat-pane-header.ts, ui/src/pages/chat/components/chat-session-workspace.ts, ui/src/pages/chat/components/catalog-terminal-button.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase onto current main, resolve the overlapping header/test changes, and refresh exact-head validation.

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-08T02:50:17.280Z sha f5c3bf9640f3145e556d6fd7b39dfde1f87ffe25 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-08T03:46:22.192Z sha c45e7ed :: needs maintainer review before merge. :: none
  • reviewed 2026-08-08T05:45:46.270Z sha 8493430 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

steipete added a commit that referenced this pull request Aug 8, 2026
Repair the exact red-main blockers required to land #120436.
@steipete
steipete force-pushed the steipete/missing-terminal-button-3412cc branch from 808ddf8 to c45e7ed Compare August 8, 2026 03:37
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 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 repository_dispatch).
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 force-pushed the steipete/missing-terminal-button-3412cc branch from c45e7ed to 8493430 Compare August 8, 2026 04:57
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 849343060e62b10c88b2014b32e6030686b50524

@clawsweeper

clawsweeper Bot commented Aug 8, 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 repository_dispatch).
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 force-pushed the steipete/missing-terminal-button-3412cc branch from 8493430 to 5a5f93d Compare August 8, 2026 06:03
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 5a5f93d4f8c6d41df63a94e83fe2e61846d95ac4

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete

steipete commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@steipete
steipete force-pushed the steipete/missing-terminal-button-3412cc branch from 1d98d51 to bb36368 Compare August 8, 2026 08:42
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: bb36368ff6d0619d389ccefbf123e09f27cb9a54

@clawsweeper

clawsweeper Bot commented Aug 8, 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 repository_dispatch).
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 force-pushed the steipete/missing-terminal-button-3412cc branch from bb36368 to 1c50071 Compare August 8, 2026 09:05
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation commands Command implementations labels Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Remove the callback option retired by #120463 so the terminal header regression test type-checks on current main.
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 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 repository_dispatch).
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 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 91efbbec7efa859f118147da2f6af07d8031ff4b:

  • node scripts/run-vitest.mjs ui/src/pages/chat/chat-pane-terminal.test.ts ui/src/pages/chat/chat-pane.test.ts: 41/41 passed; pnpm tsgo:test:ui passed.
  • Targeted type-aware oxlint, oxfmt, and git diff --check are clean. Fresh branch autoreview is clean with no accepted/actionable findings.
  • Exact-head CI run 31250685244 completed successfully; the exact-head check rollup is 79 passed, 24 skipped, 0 failed.
  • Exact-head ClawSweeper run 31251285305 completed successfully; its immutable artifact reports high confidence with no findings, risks, questions, or rank-up moves. GitHub App throttling delayed replacement of the exact-head placeholder, so the older durable review remains stale and is not treated as head coverage.
  • Visual proof gap: the original screenshot was withheld because it contained private browser chrome. The unavailable browser state was observed, and the terminal-capable positive path was integration-tested.

@steipete
steipete merged commit 6ae7a86 into main Aug 8, 2026
103 checks passed
@steipete
steipete deleted the steipete/missing-terminal-button-3412cc branch August 8, 2026 10:26
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
* fix(ui): restore terminal button in chat header

* test(ui): follow background task props API

Remove the callback option retired by openclaw#120463 so the terminal header regression test type-checks on current main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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