Skip to content

test(ui): stabilize mobile sharing refresh barrier - #180498

Merged
steipete merged 1 commit into
mainfrom
fix/sharing-mobile-refresh-barrier
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/sharing-mobile-refresh-barrier

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Problem

The mobile sharing test used the second permission-evidence request as the visibility mutation's refresh barrier. Header hydration can issue that request independently, so the test sometimes allowed the mutation refresh to finish before checking that sharing remained busy.

Change

Install the evidence mock before enabling sharing access, hydrate through the same selected-session owner as the header, and wait for that initial read to finish. Hold every evidence read after the visibility write is released until the same-key successor arrives. Keep the existing busy, applied-callback, successor, and retired-read assertions, plus an explicit delayed header synchronization while the write is pending.

Production code and rendered UI are unchanged. No bundle/build or screenshot proof is needed for this test-only fixture repair.

Proof

Check Result
Changed test file, pinned Bun, one worker 6/6 pass; 4.26 s wall time, 691 ms target test
pnpm tsgo:ui Pass
Focused lint / format / git diff --check Pass; removed the redundant default type argument on the new refresh-start barrier
Independent review Pass; no actionable P0–P2 findings
First old-fixture diagnostic, delayed header sync Passed; not claimed as reproduction
Forced old-fixture diagnostic The real forced-load owner path consumed the ordinal barrier; the mutation completed before the barrier's release and the busy assertion failed (expected false to be true), 3.68 s wall time
Production / test LOC Production unchanged; changed file 349 → 361 lines (+12), +29/−17 diff
Broad UI / Gateway proof Requested through ci:full

The forced diagnostic was temporary and is not committed. It awaited the mutation's completion to establish that the old barrier no longer held the operation, then released the competing read for cleanup. The final test retains normal header hydration and a semantic post-write barrier; no repeats or broad local suites were run.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T09:56:51.202161Z fc54165 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 10:01
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces an ordinal request barrier with phase-based synchronization in the mobile session-sharing test.

Example: Header hydration overlaps a visibility change from draft to shared.

  • Before: Header hydration can consume the second evidence request, leaving the mutation refresh unblocked.
  • After: Initial hydration finishes first, and every evidence read after write release remains held until successor replacement.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct fixture repair supported by mounted integration coverage and passing UI unit checks; evidence remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only repair changes the mounted fixture rather than shipped behavior; the supplied validation exercises the pane and mobile adapter with fixture transport.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Unrelated header hydration can make the mobile-sharing regression fail even when sharing behavior is correct.
Reason: The maintainer-directed repair makes existing lifecycle coverage reliable while preserving the production contract.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-directed test repair that preserves useful coverage, with no actionable correctness findings.

Priority: P3
Reviewed head: fc541652a6818058fcffb3fbcc8918f5a2eda377

Before merge

None.

Findings

None.

Agent review details

How this fits together

The mounted test drives the real mobile sharing adapter and pane owner against a fixture Gateway client, then checks busy controls, successor readiness, and suppression of retired navigation.

flowchart LR
  A[Mobile access click] --> B[Sharing adapter]
  B --> C[Pane mutation owner]
  C --> D[Fixture Gateway client]
  D --> E[Held evidence refresh]
  E --> F[Busy and successor assertions]
Loading

Technical review

Best possible solution:

Keep the existing mounted regression with phase-based refresh control and its original busy-state and retirement assertions.

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

Source confirms that header hydration and mutation refresh share the evidence-read path; the PR reports a forced old-fixture failure and six passing repaired cases, which were not rerun during this read-only review.

Is this the best way to solve the issue?

Yes: the invariant is that unrelated hydration cannot release the mutation barrier, and the patch enforces it inside the existing fixture without production seams or weaker assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 65120312b5cf.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 88baa37 adds ui/src/pages/chat/components/chat-session-sharing-mobile.test.tsx:75 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 88baa37e9cc6; files: ui/src/pages/chat/components/chat-session-sharing-mobile.test.tsx)
  • Vyctor H. Brzezowski: Raw commit fb7cd93 adds ui/src/pages/chat/components/chat-session-sharing-mobile.test.tsx:48 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fb7cd9305667; files: ui/src/pages/chat/components/chat-session-sharing-mobile.test.tsx)

PR surface

Tests +12. Total +12 across 1 file. Added test files: 0.

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

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests +29/-17 The additional fixture code replaces request-order assumptions with explicit hydration and refresh barriers.

Labels

Label changes:

  • add P3: This repairs test reliability without changing shipped behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This repairs test reliability without changing shipped behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 6:08 AM ET / 10:08 UTC.

@steipete
steipete merged commit cfba9b9 into main Oct 22, 2026
101 of 103 checks passed
@steipete
steipete deleted the fix/sharing-mobile-refresh-barrier branch October 22, 2026 10:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

roboclaw-bot added a commit that referenced this pull request Oct 22, 2026
Backport Peter Steinberger's canonical fixture repair from cfba9b9 (#180498), retaining all three diagnostic assertion labels.

Use selected-session hydration and hold all post-write evidence reads instead of relying on the second request. Production owners are unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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