Skip to content

fix(ui): avoid duplicate main landmark on Activity - #127789

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-activity-nested-main
Aug 22, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-activity-nested-main

Conversation

@steipete

@steipete steipete commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening Activity → Sessions would encounter two nested main landmarks: the app shell's page landmark and a second unnamed Activity landmark. Screen-reader landmark navigation therefore exposed an ambiguous duplicate main region on both desktop and mobile.

Why This Change Was Made

The app shell remains the single owner of the page main landmark. The Activity feed keeps its existing class, layout, and content in a neutral container, with a focused renderer regression preventing the nested landmark from returning.

This is a semantics-only change: no visual styling, routing, or Activity behavior changes.

User Impact

Activity now exposes one unambiguous main content landmark, improving screen-reader navigation without changing the page's appearance or controls.

Evidence

  • Pre-fix focused regression failed with one nested main; post-fix renderer emits zero page-owned main elements while the shell retains the route landmark.
  • Exact-head source-browser proof at 1280×900 and 390×844: exactly one visible DOM main (#control-ui-main), one Playwright main role, and one non-ignored accessibility-tree main; it contains the Activity page in both viewports.
  • Focused unit: session-activity-view.test.ts — 6/6 passed.
  • Activity source-browser capture: 1/1 passed.
  • Broad Activity/app proof: 92 tests passed.
  • Full changed-file gate passed, including core/UI typechecking, lint, deadcode, i18n, and related checks.
  • Exact-head Codex branch autoreview: clean, confidence 0.99, no findings.
  • Inspected desktop 1280×900 and mobile 390×844 screenshots show unchanged healthy layout with no clipping, overflow, or error state.

Provenance: the nested landmark was introduced in #125695 (d9dfc5b3d98cae82542b0d46a28fd5d58ccf0e43, 2026-08-18).

Inspected visual proof

The semantic repair is intentionally visually neutral; both captures show the unchanged healthy Activity layout after the landmark fix.

@clawsweeper

clawsweeper Bot commented Aug 22, 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 app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 22, 2026
@steipete
steipete marked this pull request as ready for review August 22, 2026 05:52
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 22, 2026
@clawsweeper

clawsweeper Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 2:00 AM ET / 06:00 UTC.

ClawSweeper review

What this changes

The PR changes the Activity Sessions feed from a nested main landmark to a neutral div and adds a renderer regression test.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. Current main still renders the Activity feed as a nested main inside the app shell’s page-level main; this branch removes that duplicate semantic landmark with a focused regression test. The maintainer label requires human landing handling, and the branch is behind main with an incomplete supplied check rollup.

Priority: P3
Reviewed head: 222e8b8f296ac10c095427359e5931507dc8c0f5
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, owner-boundary-correct patch with focused regression coverage and inspected visual evidence; exact-head validation still needs refresh after base drift.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.
Evidence reviewed 5 items Current-main defect: Current main renders the Sessions feed as <main class="activity-feed__main">, while the branch changes that same wrapper to a neutral div.
Landmark owner and caller: The app shell owns #control-ui-main; Activity renders the Sessions view inside the routed page content, so the feed should not establish another page landmark.
Focused regression coverage: The added jsdom test renders the Sessions view and asserts that the renderer itself emits no main elements, which would fail before this replacement.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127789-U2MqGz/target$ node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts
[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127789-U2MqGz/target

node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts
 ✓  ui  ui/src/pages/activity/session-activity-view.test.ts (6 tests) 255ms

 Test Files  1 passed (1)
      Tests  6 passed (6)
   Start at  06:01:09
   Duration  2.01s (transform 734ms, setup 110ms, import 575ms, tests 255ms, environment 638ms)

[test] passed 1 Vitest shard in 2.49s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127789-U2MqGz/target$ node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts



































Assertions:

  • PASS expect_output: Tests 6 passed

How this fits together

The Control UI app shell owns the page-level main landmark and routes page content into it. The Activity page calls the Sessions renderer, which supplies the feed layout and controls.

flowchart LR
A[Activity route] --> B[Control UI app shell]
B --> C[Page main landmark]
C --> D[Router outlet]
D --> E[Activity page]
E --> F[Sessions feed renderer]
F --> G[Session feed content]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled accessibility repair be refreshed against current main and landed once exact-head validation is confirmed? Refresh and land: Rebase or otherwise refresh the branch, confirm the exact merged result and required checks, then land the focused landmark repair.

Why: The source-level fix is narrow and correct, but protected maintainer handling and the current behind/incomplete validation state require a human landing decision.

Before merge

  • Resolve merge risk (P1) - GitHub reports the branch as behind main and the supplied check rollup is incomplete; refresh exact-head/base validation before landing.
Agent review details

Security

None.

PR surface

Source 0, Tests +15. Total +15 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 15 0 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 17 2 +15

Review metrics

Metric Value Why it matters
Production versus test LOC production +2/-2 (net 0); tests +15/-0 The semantic correction is production-neutral and adds one focused regression without changing layout code or configuration.

Stored data model

Persistent data-model change detected: serialized state: ui/src/pages/activity/session-activity-view.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the app shell as the sole page-landmark owner and land the renderer-only replacement after the branch and exact-head validation are refreshed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the app shell as the sole page-landmark owner and land the renderer-only replacement after the branch and exact-head validation are refreshed.

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

Yes—current main visibly composes the Activity renderer’s main inside the shell-owned #control-ui-main; the branch’s renderer assertion directly captures that violated ownership boundary.

Is this the best way to solve the issue?

Yes—the shell already owns the page landmark, and replacing only the feed wrapper with a neutral container preserves layout while removing the duplicate semantic region.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a narrowly scoped accessibility semantics correction with limited runtime blast radius.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.

Label justifications:

  • P3: This is a narrowly scoped accessibility semantics correction with limited runtime blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR is exempt from the external-contributor proof gate; the supplied desktop and mobile screenshots were inspected and show the intended visually neutral Activity layout.

Evidence

What I checked:

  • Current-main defect: Current main renders the Sessions feed as <main class="activity-feed__main">, while the branch changes that same wrapper to a neutral div. (ui/src/pages/activity/session-activity-view.ts:461, 0933263f76f4)
  • Landmark owner and caller: The app shell owns #control-ui-main; Activity renders the Sessions view inside the routed page content, so the feed should not establish another page landmark. (ui/src/app/app-shell-view.ts:601, 0933263f76f4)
  • Focused regression coverage: The added jsdom test renders the Sessions view and asserts that the renderer itself emits no main elements, which would fail before this replacement. (ui/src/pages/activity/session-activity-view.test.ts:49, 222e8b8f296a)
  • History and likely owners: The current Activity file history includes the original Activity feature work and later Activity refinements; blame attributes the current wrapper line to the most recent whole-file carry-forward commit. (ui/src/pages/activity/session-activity-view.ts:461, eee905934a50)
  • Visual evidence inspected: The supplied 1280×900 and 390×844 captures show a healthy unchanged Activity layout; they support visual neutrality but do not by themselves establish the DOM landmark count.

Likely related people:

  • steipete: Authored the original merged Activity feature and several subsequent Activity refinements in the current file history. (role: Activity feature owner; confidence: high; commits: d9dfc5b3d98c, ab2bd4faa87e, 347a0eaf8cfc; files: ui/src/pages/activity/session-activity-view.ts, ui/src/pages/activity/activity-page.ts)
  • Vito Cappello: The exact current-main wrapper line is blamed to this recent carry-forward commit, which introduced the current file snapshot into the local history. (role: recent area contributor; confidence: medium; commits: eee905934a50; files: ui/src/pages/activity/session-activity-view.ts)

Rank-up moves

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

  • Refresh the branch against current main and confirm the exact-head required-check result before landing.

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.

Copy link
Copy Markdown
Contributor Author

Land-ready verification for exact PR head 222e8b8f296ac10c095427359e5931507dc8c0f5:

  • CI run 32555471787 is green, including openclaw/ci-gate, Control UI, UI E2E, types, lint, guards, and relevant checks.
  • Repo-native scripts/pr prepare-run 127789 passed with validated review artifacts, zero findings, and Testbox/hosted gates green. The prepared and remote PR heads both remained exactly 222e8b8f296ac10c095427359e5931507dc8c0f5.
  • Local exact-head proof: focused Activity suite 6/6; broad Activity/app suites 92 tests; full changed-file gate; source-browser capture 1/1; and fresh autoreview clean at 0.99 confidence.
  • Desktop 1280×900 and mobile 390×844 verification each found exactly one DOM #control-ui-main, one Playwright main role, and one non-ignored CDP accessibility-tree main containing Activity. Inspected layouts remained healthy and visually unchanged.
  • Visuals: desktop, mobile.

ClawSweeper reported no actionable code findings. Its behind/incomplete-rollup note is superseded by the exact-head green CI and successful prepare above. Per repository policy, this branch was not rebased solely because main advanced; prepare verified the remote PR head tree exactly.

@steipete
steipete merged commit c8d6604 into main Aug 22, 2026
213 checks passed
@steipete
steipete deleted the codex/autoqa-activity-nested-main branch August 22, 2026 06:08

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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.

2 participants