Repository navigation
feat(ui): add social preview links for private sessions - #139250
Conversation
Serve generic Open Graph cards without reading session state. Preserve direct links and authentication, reuse the session URL grammar, and document public preview routing for login proxies.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 1:52 PM ET / 17:52 UTC. ClawSweeper reviewWhat this changesAdds a session-menu action that copies public preview links, generic social-card pages and build-generated artwork, with deployment guidance for login proxies. Merge readiness✅ Ready for maintainer review Keep open: this adds a distinct capability absent from inspected main. No blocking correctness findings were identified, and the maintainer label independently excludes automated closure. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI turns session-menu selections into Gateway URLs. The Gateway serves generic preview metadata and artwork, then directs visitors to the existing authenticated session view. flowchart LR
A[Session menu] --> B[Build preview URL]
B --> C[Gateway preview route]
D[Link crawler or visitor] --> C
C --> E[Generic page and static card]
E --> F[Open session link]
F --> G[Existing authentication]
G --> H[Session or dashboard]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +156, Tests +146, Docs +42. Total +344 across 19 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep previews generic and state-free, reuse canonical session URLs, and leave proxy exposure explicitly operator-controlled. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds a preview capability; it does not report a broken existing contract. Is this the best way to solve the issue? Yes: a separate state-free document addresses crawler access without exposing authenticated session content; adding metadata only inside the app would leave the login-proxy problem unresolved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3e4becea5e2c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Landing checks for 8f4a434014e5:
The public boundary remains generic and state-free: it never looks up a session, and its destination retains normal authentication. Production/build +156 lines implement that new capability; tests +146 and docs +42. No new configuration, dependency, or storage contract. Follow-up if the A2UI event failure recurs: capture its click/bridge lifecycle and inner-widget error before choosing a repair. Its owner files are unchanged by this PR. Proxy exposure remains an operator deployment step; this merge does not enable the public path on any running instance. Proceeding through native prepare/merge. |
|
Merged via squash.
|
* commit '911d7d5b0c107f7274f2415ca9655dcc6105f0e8': (867 commits) fix(skills): deliver pending Workshop approval controls (#139248) fix(gateway): deliver loopback ask_user prompts to the originating channel (#138831) docs: keep root agent instructions focused on repository policy (#139258) fix(matrix): exclude archived state roots from scans and selection (#112329) perf(agents): prepare exact tool names once per catalog batch (#139267) fix: preserve Swarm progress and simplify owner plumbing (#139269) fix(tailscale): release claims after gateway process-group exit (#139261) refactor(cli): simplify lazy command registration (#139108) test(ui): retain synthetic widget failure evidence (#139229) fix(buzz): keep implicit replies at thread root (#138879) test(diagnostics): await graceful Gateway shutdown before cleanup (#139247) fix(ci): unblock releases with different tooling package managers (#139259) feat(ui): add social preview links for private sessions (#139250) fix(codex): retain failed conversations for guarded continuation (#139246) chore(ui): refresh control ui locales (#139200) fix(ci): run browser checks for real-gateway inputs (#139256) fix(llama-cpp): reconcile managed router state before requests (#136363) chore(i18n): refresh native locales (#139237) refactor(worker): unify inference payload handling (#139245) refactor(terminal): replay wrapped prefixes in one pass (#139240) ...
What Problem This Solves
Private session and dashboard URLs cannot produce useful social previews when link crawlers are redirected to a login page. Simply adding metadata inside the authenticated app would not make it reachable.
Why This Change Was Made
Adds a separate public preview document under the Control UI's
/share/namespace. It serves generic OpenClaw Open Graph metadata and a 1200 × 630 PNG, then links to the normal authenticated session or dashboard. Preview requests never look up session state, including whether the target exists. The card is generated at build time from existing OpenClaw artwork with the existing image library; there are no new dependencies, configuration keys, database changes, or runtime image-rendering jobs.User Impact
Copy → Preview link is available in the sidebar, session list, and chat-header menus. It reuses the Gateway's public address, preserves deployment base paths, exact session keys, and catalog routing, and excludes connection credentials. Copy → Session link retains its existing direct-link behavior.
The preview contains no session title, messages, widget contents, or screenshot. The URL still contains its routing identifiers. Opening the session still requires normal Gateway access.
Operators using Cloudflare Access or another login proxy must expose only the preview namespace and card image, while keeping the app, WebSocket, bootstrap, and API routes protected. The existing
gateway.publicOriginsupplies the public HTTPS origin behind TLS termination. Setup and verification are documented indocs/web/urls.md; this PR does not modify deployment access policies.Evidence
/share/chat/main/preview-example; a separate JavaScript-disabled context rendered the preview and retained/chat/main/preview-exampleas its destination.pnpm build ciArtifactspassed, including runtime/plugin builds, SDK declaration/export checks, and the UI build. Independent P0–P2 review is clean. The full changed-file gate passed, including core/test/UI type checks, lint, and repository guards.The initial full build was invalidated by source changes during compilation; it is not counted as a successful build. The final CI-artifact build passed on frozen sources. The first changed-file run found two implicit Promise-executor returns in the HTTP test; those were corrected, and the complete gate passed on rerun.
Production/build delta: +156 lines; tests: +146 lines; docs: +42 lines. The growth adds the public document/card and menu action; the Gateway now reuses the shared HTML escaping helper instead of maintaining its own copy.
Focused commands:
Live Discord/Slack/X unfurl rendering remains a deployment check: it requires the public preview path to be enabled at the proxy. Local verification exercises the HTTP responses consumed by crawlers and the browser copy/open flow.