Skip to content

fix: avoid unavailable flash when refreshing conversations - #167097

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/fix-conversation-unavailable-refresh-flash
Oct 8, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/fix-conversation-unavailable-refresh-flash

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: refreshing an accessible conversation briefly shows “Conversation unavailable” before the signed-in conversation loads.

User Impact

Reloading a conversation shows a neutral loading state while access is checked. Confirmed denial still shows the unavailable page; connection failures offer reload or login instead of claiming access was denied. Authentication and session permissions are unchanged.

Why This Change Was Made

The public thread document rendered its unavailable result before the existing protected login-handoff probe finished. Keep that result pending until the probe resolves, including during successful navigation into the app. Preserve the readable no-JavaScript fallback and immediately show confirmed revocation in an already-open public reader. No time-based hiding or new authorization logic.

Evidence

  • Seven new regression cases fail against the original renderer. The focused renderer, handoff, refresh, protected-entry HTTP, and app-document suites pass: 70 tests across 6 files.
  • Chromium proof uses the actual generated public document and its CSP with deterministic probe responses. Verified pending → successful handoff, reload with a late old response, confirmed 403 denial, network failure, JavaScript disabled, and public-access revocation. No production Gateway or private conversation was used.
  • Independent autoreview: no actionable P0–P2 findings. Formatting, production and test typechecks, targeted lint, and selected guards pass.
  • Known baseline failure: check:changed stops at the unused export observePlacementAuthority in src/gateway/worker-environments/placement-turn-authority.ts. Its blob is identical on the starting main commit and this candidate; no external production consumers exist on that base. The remaining selected checks were run separately. Full-repository tests and a live login-proxy deployment were not run.
  • Changed test-file measurements with pnpm test <file> --maxWorkers=1: control-ui-public-session-entry.test.ts, 17.34 s wall / 2.94 s Vitest (26 tests); control-ui-public-session-refresh.test.ts, 7.59 s wall / 1.29 s Vitest (4 tests). Wrapper/startup time is included in wall time. Hosted CI run 37779535849 passed on this exact head (attempt 1): 806 seconds from run start to completion; no CI rerun was requested.

Before — the access probe is still pending:

Before: unavailable error while access is still being checked

After — the same pending access probe:

After: neutral loading state until access is resolved

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 8, 2026 09:28
Keep private conversation entry in a pending state until the existing protected access probe resolves. Preserve confirmed denial, no-JavaScript fallback, public revocation, and neutral transport-error recovery without changing authorization.

Co-authored-by: jacobtomlinson <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 8, 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 gateway Gateway runtime size: S labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 8:53 AM ET / 12:53 UTC (Revision 2).

ClawSweeper review

What this changes

The PR shows a neutral loading state while conversation access is checked, then distinguishes confirmed denial from connection failures.

Example: Reload an accessible private conversation

  • Before: The page displays “Conversation unavailable” while the access probe is pending.
  • After: The page displays “Loading conversation” and “Checking access…” until the handoff resolves.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, focused correction with visible browser evidence, limited handoff proof, and one implementation-coupled test assertion.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The supplied repository MEMBER/bot context exempts ordinary contributor proof. Inspected before/after screenshots show the reader’s pending-state improvement, and the body reports Chromium scenarios using the generated document with synthetic probe responses; these do not establish real Gateway authentication or CSP diagnostics. The diff changes no stored format, schema, credential writer, or migration contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Reloading an accessible conversation briefly tells the user it is unavailable before opening it.
Reason: The error is displayed before access has been determined. A neutral pending state corrects that misleading result without changing the established access contract.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR addresses a source-confirmed display bug that remains on current main, with no actionable correctness or security findings. Browser evidence supports the visual improvement but does not establish a real Gateway handoff.

Priority: P2
Reviewed head: e4bad27e1020a8d262d7691ebceca847e49b8dc0

Before merge

None.

Findings

None.

Tests

  • Low-value test src/gateway/control-ui-public-session-refresh.test.ts: replaces a revoked publication with the generic login page and stops polling: Replace or remove the added clearPending call-count assertion: the mocked DOM pins removeAttribute invocation rather than proving the unavailable result becomes visible; retain the useful title and polling assertions.
  • Missing end-to-end proof: A real Gateway reload with a delayed access probe and successful authenticated conversation handoff is not demonstrated. Browser scenarios use deterministic probe responses, and the reported base-failing regressions were not independently executed in this read-only review.
Agent review details

How this fits together

The Gateway serves a lightweight conversation reader before handing authorized browsers into the Control UI. Its access probe determines whether to navigate into the app or display the unavailable page.

flowchart TD
 A[Conversation reload] --> B[Gateway conversation reader]
 B --> C[Loading state]
 C --> D[Protected access probe]
 D -->|Successful handoff| E[Control UI conversation]
 D -->|Confirmed denial| F[Unavailable page]
 D -->|Connection failure| G[Reload or login guidance]
Loading

Technical review

Best possible solution:

Keep pending, denied, and connection-failure presentation in the existing reader while retaining the protected handoff and public-revocation owners.

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

Yes, source establishes the trigger: an unavailable reader document displays its error before the asynchronous protected probe completes. The supplied before screenshot corroborates that display; no current-main runtime was executed during this read-only review.

Is this the best way to solve the issue?

Yes, the patch narrowly corrects presentation in the existing renderer and preserves navigation, authentication, public-reader isolation, and revocation behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 89c01cd979ef.

Provenance checked

  • src/gateway/control-ui-public-session-render.ts: protected handoff keeps the original intent (fix(control-ui): restore operator chat deep links #166783: Restore operator conversation reloads through the existing authentication gate while preserving anonymous isolation and navigation-only credential hints.)
  • src/gateway/control-ui-public-session-render.ts and docs/web/urls.md: canonical reader and unavailable presentation keeps the original intent (feat: open public threads at their regular links #166049: Serve canonical public conversations read-only, give private or revoked targets a generic login prompt, and refresh visible public readers with revocation checks.)

Testing

Proof path: in-process harness. Added test files: 2.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a1ca0cd adds src/gateway/control-ui-public-session-render.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a1ca0cd615f4; files: src/gateway/control-ui-public-session-render.ts)
  • RoboClaw: Raw commit 8787ee0 adds src/gateway/control-ui-public-session-render.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8787ee08687e; files: src/gateway/control-ui-public-session-render.ts)

PR surface

Source +19, Tests +87, Docs +3. Total +109 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 24 5 +19
Tests 2 96 9 +87
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 124 15 +109

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The misleading error flash affects conversation reloads, while the existing successful handoff remains functional.
  • 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Replace the added revocation mock call-count assertion with an observable DOM result, or remove that assertion.
  • Demonstrate a real Gateway conversation reload with a delayed access probe and successful authenticated handoff.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T09:35:54.206Z sha e4bad27 :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 8, 2026 12:48
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 8, 2026 12:59
@roboclaw-bot
roboclaw-bot merged commit 47cbd73 into main Oct 8, 2026
190 of 192 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/fix-conversation-unavailable-refresh-flash branch October 8, 2026 13:03
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…167097)

Keep the public conversation document in a neutral loading state until its existing protected access probe resolves. Preserve successful authenticated handoff, confirmed denial, no-JavaScript fallback, and immediate public-access revocation without changing authorization or adding a hide timer.

Co-authored-by: jacobtomlinson <[email protected]>
steipete added a commit that referenced this pull request Oct 16, 2026
…e probe (#173820)

Signed-out visitors opening a Team conversation link (for example from a
RoboClaw post) saw "Could not check access" instead of a Log in prompt.
Team sits behind Cloudflare Access, which answers the page's
session-entry probe with a cross-origin login redirect. The probe used
redirect:"error", so that redirect rejected like a network failure.

Probe with redirect:"manual" and treat the opaque redirect like 401/403:
show the unavailable state with the Log in button, which routes through
Access and back to the conversation. Readers of public transcripts are
never redirected, and the 204 operator handoff is unchanged.

Regression from #167097 (47cbd73), which turned probe rejections into a
blocking "Could not check access" state, on top of the redirect:"error"
probe added in #166049 (8787ee0).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…e probe (openclaw#173820)

Signed-out visitors opening a Team conversation link (for example from a
RoboClaw post) saw "Could not check access" instead of a Log in prompt.
Team sits behind Cloudflare Access, which answers the page's
session-entry probe with a cross-origin login redirect. The probe used
redirect:"error", so that redirect rejected like a network failure.

Probe with redirect:"manual" and treat the opaque redirect like 401/403:
show the unavailable state with the Log in button, which routes through
Access and back to the conversation. Readers of public transcripts are
never redirected, and the 204 operator handoff is unchanged.

Regression from openclaw#167097 (9761331), which turned probe rejections into a
blocking "Could not check access" state, on top of the redirect:"error"
probe added in openclaw#166049 (e974acf).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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