Skip to content

fix(file-preview): let rendered Markdown fill the resized window - #730

Merged
Ark0N merged 1 commit into
Ark0N:masterfrom
opticon454:fix/file-preview-md-fill
Oct 28, 2026
Merged

Ark0N merged 1 commit into
Ark0N:masterfrom
opticon454:fix/file-preview-md-fill

Conversation

@opticon454

Copy link
Copy Markdown
Contributor

Rendered Markdown in the File Viewer stops growing at a fixed 960px column even when the user resizes or expands the window. Remove that cap so the document reflows to the available width. Default desktop and phone widths retain their existing layout.

Adds a regression check for the preview and shared prose rules, plus a patch changeset. No API changes.

Validation:

  • Full CI unit/integration suite: 12,571 passed, 12 skipped, across 631 passing files and one skipped file.
  • xterm-zerolag-input: 261 passed across 10 files.
  • Markdown anchor browser suite: 5 passed.
  • Chromium layout checks: default desktop, resized, expanded, tablet and phone; confirmed the parent commit reproduces the 960px restriction.
  • Lockfile, typecheck, lint, frontend syntax, browser exclusions, formatting, public assets, CLI catalogue and installer syntax checks passed, including the Bash 3.2 installer checks.
  • Pre-push static checks passed.

The remaining browser, mobile and performance suites were not run. This PR does not deploy or release the change.

Implementation commit: 34f7766.

The corner grip and Expand size the window correctly, but the document
kept a fixed 960px reading column from before the resize feature
existed, so text stopped reflowing once the window grew past it.
Pinned by new rule 13 in file-preview-window.test.ts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Ark0N

Ark0N commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Thank you, @opticon454. This removes the fixed 960px reading column from the File Viewer's rendered Markdown, so the document reflows to fill the window once it is dragged larger or expanded, which pairs well with the resize grip you added.

I checked it in Chromium against the parent commit: the default-size and phone layouts are identical, an expanded window now fills edge to edge, and the new test fails on the old stylesheet as it should.

One small leftover:

  • src/web/public/styles.css:12554: ASCII-diagram code blocks still carry their own cap. .rv-text .rv-diagram-wrap (styles.css:14948) uses max-width: var(--rv-content-max, 720px) with auto margins, and that variable is only set inside the Response Viewer, so in the File Viewer a diagram stays 720px wide and centered. In a 1920px expanded window it sits at x=600 while the prose and the other code blocks start at x=59. Adding --rv-content-max: none; to the .file-preview-body > .file-preview-md rule lets it follow the rest of the document. Note that this also widens diagrams at the default window size (720px to about 858px, the same width as the other code blocks), so it changes the default view slightly. If you add it, a third assertion in the new test keeps it pinned.

I can add that line at merge time, so there is nothing you need to push for this to go in.

@Ark0N
Ark0N merged commit 34f7766 into Ark0N:master Oct 28, 2026
2 checks passed
Ark0N pushed a commit that referenced this pull request Oct 28, 2026
Set --rv-content-max: none on the File Viewer's rendered document, so
ASCII-diagram blocks (capped by that variable with a 720px fallback the
Response Viewer sets) follow the window like the rest of the document,
and pin it with a third assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ark0N pushed a commit that referenced this pull request Oct 28, 2026
Ark0N pushed a commit that referenced this pull request Oct 28, 2026
Consolidate this release's notes into one changeset (Thanks, the tab
strip, the fixes, the fixes applied while landing) and drop #730's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@opticon454
opticon454 deleted the fix/file-preview-md-fill branch October 28, 2026 13:19
@Ark0N

Ark0N commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Merged in 1.47.0 (https://github.com/Ark0N/Codeman/releases/tag/codeman%401.47.0). Thank you, it pairs well with the resize grip. At merge I added --rv-content-max: none; to the document rule with a third assertion in your test (c708312), so ASCII diagrams follow the window like the rest of the document. Your changeset is folded into the release's single one.

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.

2 participants