Skip to content

fix: fit inline previews and widen the chat column - #440

Merged
devSejung merged 3 commits into
mainfrom
fix/platformclaw-document-preview-sizing
Nov 2, 2026
Merged

devSejung merged 3 commits into
mainfrom
fix/platformclaw-document-preview-sizing

Conversation

@devSejung

@devSejung devSejung commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Closes #439. Follow-up to #438 (inline PDF/slide previews and agent change requests).

What Problem This Solves

Fixes an issue where users previewing landscape slides saw unused space below the page because inline previews had a fixed viewport height. The default 48rem conversation column was also too narrow for document work, and agents could finish a revision without attaching its updated preview.

Why This Change Was Made

Inline pages now use the available width and their own aspect ratio to determine height. Contents scrolls within that page height; explicitly expanded previews retain their bounded viewport and zoom controls. The default conversation maximum is 60rem, with the composer and related rows aligned; narrower split panes still shrink to their available width, and explicit browser-local width preferences remain intact.

Right-clicking a document opens the localized pencil/Request changes action. Choosing it uses the existing text/region selection, anchored input, current-owner validation, and normal chat outbox. Escape, outside click, resize, scroll, page changes, and source retirement dismiss the menu. Opening or canceling the menu preserves an existing draft. Normal clicks still require explicit request mode.

The existing full-webchat prompt owner now asks for the current attachment after creating or revising image/HTML/PDF/PPT/PPTX deliverables, including overwriting the same path. Attachments remain snapshots; a fresh attachment auto-opens through the existing card lifecycle. This guidance follows the existing delivery contract and session prompt policy for both Basic and VM execution.

User Impact

Wider desktop chat, proportionate inline previews without unused bottom space, and direct change requests from the selected location. Both Korean and English labels reuse existing localized copy, including the outgoing request context. Original downloads and owned Basic/VM snapshots remain available.

Evidence

  • Ubuntu Docker Desktop Linux, Node 24.18.0/pnpm 11.15.1; clean Linux checkout at main 1bf9596753d32ceb535b3fcf18ff4b41122ac0e9 plus this candidate patch. Separate Linux dependencies; no Windows junction installation or operator state changes.
  • Focused prompt/viewer/selection-request/outbox tests: 165 passed. Settings persistence: 43 passed. Appearance default assertion: 1 passed in real Chromium (54 unrelated cases not selected).
  • Real production bundle, employee asset CSP, rootless-Docker Basic execution and actual SSH VM execution: both end-to-end scenarios passed. Image/PDF/PPT snapshots survive source deletion and reload; foreign-owner denial remains enforced. Document width/aspect/height and Contents checked on desktop/mobile; native FHD split controls prove the 60rem maximum shrinks within its split-pane boundaries. Right-click title selection reaches the ordinary reply/session-bound chat request exactly once with its bounded crop and English context.
  • pnpm ui:build passed, including 828 precompressed sidecars and existing performance limits: startup 333055 B gzip (<326 KiB), PDF worker 351.6 KiB (<approved 360 KiB). No budget changes.
  • Fresh independent autoreview: scoped-clean P0–P2. Production +167 net lines for the transient menu and intrinsic-size lifecycle; tests +297 net lines. The canonical keyless i18n baseline update only removes the old hardcoded 48rem placeholder entry (-7 metadata lines); no generated translations changed.
  • Screenshots shown in the task are actual browser captures. Hosted E2E uses these same helpers and the existing html-attachment-browser-proof-<sha>-<shard> artifact upload, including FHD PDF/PPT and split screenshots. CI status is linked below.

Validation limits: Gateway history/send uses the existing controlled mock transport; document rendering, production asset CSP, Basic Docker file access, VM SSH file access, conversion, snapshot ownership, and browser interaction use their production owners. Prompt tests prove guidance assembly; they do not guarantee that every model follows an instruction. No new config, protocol, dependency, schema, or release surface.

Common checks passed: OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 node scripts/platformclaw-check.mjs --changed --base HEAD (core/core-test/UI tsgo, full core/UI/package lint, SDK/dependency/patch/dead-export/i18n/schema/store/media/sidecar/auth guards, runtime cycles=0). Additional UI test tsgo and focused CSS/Lit stylelint passed. All 19 final PR source files match between Windows and Linux. Code commit: a56d330.

CI regression coverage: default width expectations now prove the approved 960px maximum and exact available-width shrinking, including fresh-session and composer siblings. The transient menu uses the canonical Web Awesome dropdown/item primitives. Pointer proof scrolls and hit-tests the actual painted glyph in canvas-relative coordinates. Native menu autofocus and Enter activation are proven in Chromium; Node Lit takes Web Awesome's SSR branch, so that browser-only focus assertion belongs in E2E rather than jsdom. Action, selection, crop, and normal outbox assertions remain unchanged.

Repair validation on reviewed head19f plus the seven-file patch: 72 responsive cases passed; 14 request/shared-control-ownership cases passed; the two formerly failing composer/new-session E2E cases passed; four final PDF/PPT keyboard/selection/crop/outbox E2E cases passed across Basic and VM target paths, including real rootless Docker and SSH VM execution for presentation files. Full changed-surface checks, core-test/UI/UI-test tsgo, scoped lint/stylelint/format, i18n and fresh independent P0–P2 autoreview passed. All seven source hashes match between Windows and Linux. Production delta of this repair is -10 lines; tests +25. No allowlist, timeout, retry, skip, dependency, or performance-budget change.

CI repair head e439648 passed the full hosted run: https://github.com/devSejung/platformclaw/actions/runs/41475297610.
Final layout follow-up: center pagination against the entire preview width using equal outer grid tracks. At preview widths up to 640px, actions occupy the next row; this uses container width so narrow split panes work independently of viewport size. Actual real Gateway UI measured 0px centering error for PPT and <0.01px for PDF at 934px, and 0px for all four viewers in 473px split panes, with actions inside their footer. Linux oxfmt, stylelint and production ui:build passed. Single CSS file, production +4 net lines; no additional test code or broad test rerun for this reversible layout adjustment. Live Gateway uses task-owned state, owned snapshots, real rootless conversion, and current production UI; AI provider credentials are intentionally absent, so live UI inspection proves selection/controls rather than model execution.

Hosted CI at current head a56d330: https://github.com/devSejung/platformclaw/actions/runs/41480213177 (running; not yet a passing result). Ready PR remains unmerged.

@devSejung
devSejung marked this pull request as ready for review November 2, 2026 14:51
@devSejung
devSejung merged commit c7c2528 into main Nov 2, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Inline document previews leave blank space and need direct revision requests

1 participant