Skip to content

Keep notebook Markdown within the visible pane - #375

Merged
jlewi merged 6 commits into
mainfrom
fix/notebook-horizontal-rendering
Sep 10, 2026
Merged

Keep notebook Markdown within the visible pane#375
jlewi merged 6 commits into
mainfrom
fix/notebook-horizontal-rendering

Conversation

@jlewi

@jlewi jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Problem and behavior

A wide table, fenced command, or output could expand Radix's fit-content wrapper and make every Markdown paragraph wrap beyond the visible notebook pane. The reported notebook had a 890px viewport but a 5923px column.

Constrain the notebook's generated content wrapper to the available viewport. Prose, inline identifiers, and plain-text outputs wrap; wide tables and fenced code scroll in their own keyboard-focusable regions. Other ScrollAreas retain their existing behavior. Code blocks have one scrollbar and one layer of padding. Automatic cell focus restoration preserves the focused nested scroller, so keyboard scrolling also works when activating an inactive cell.

Design and regression coverage

  • Document the width/overflow contract in docs-dev/cujs/horizontal-rendering.md and comments beside the CSS override.
  • Add a synthetic browser CUJ covering small/wide tables, long inline text, fenced code, stored output, and sibling cells at 1280px and 900px browser widths.
  • Update the old unit assertion that required whole-notebook horizontal scrolling.
  • Design notebook with four embedded before/after screenshots.

Validation

  • Local browser geometry and visual checks passed at 862px, 482px, and 522px notebook widths (Explorer/Comments open); column and scroll width match the viewport.
  • The reported Markdown also fits its 1214px local viewport. Keyboard scrolling works for wide blocks and long output remains intact.
  • runme run build test passed on the final PR head; focused Actions/MarkdownCell suites passed all 96 tests (plus 7 console tests in the required command).
  • New CUJ driver compiles; its layout assertions were exercised in the in-app browser. The complete CI recording/artifact workflow also checks keyboard scrolling and captures wide-block/output/sibling screenshots.

The browser CUJ exposed a focus-restoration bug; two new regression tests fail before the fix and pass afterward. The rendering scenario passes all 24 CI assertions.

Two full CI runs encountered the same Jupyter video-finalization failure after its functional checks passed: FFmpeg 6 could not determine the streamed JPEG dimensions. A CI-only compatibility wrapper restores normal buffering/probing for agent-browser 0.21.2's MJPEG input. Video and scenario assertions remain enabled. Local real-JPEG encoding passed with whole-frame, 32-byte, and 4096-byte pipe writes; the complete Ubuntu CI workflow passes on the final commit.

Final validation: all 108 browser assertions passed across 10 scenarios, including all 24 horizontal-rendering assertions and 19 Jupyter assertions. Verified the Jupyter artifact is a valid 28-second VP8 video and visually inspected the final narrow rendering screenshot. Both GitHub workflows pass. The final Codex review of 559a1f0 found no additional major issues; all review threads are resolved.

Signed-off-by: Jeremy lewi <jeremy@lewi.us>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T22:05:12.722731Z 559a1f0 Manual request
ℹ️ 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.

@jlewi-openai

Copy link
Copy Markdown

@codex review

Signed-off-by: Jeremy lewi <jeremy@lewi.us>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c10794d994

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/src/components/Actions/ActionOutputItems.tsx
Comment thread app/test/browser/test-scenario-horizontal-rendering.ts Outdated
Comment thread app/test/browser/test-scenario-horizontal-rendering.ts Outdated
Signed-off-by: Jeremy lewi <jeremy@lewi.us>
@jlewi

jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Both valid findings are addressed in 13397b8. The DCO thread includes GitHub commit-list evidence that every PR commit is signed off. Please review the latest revision.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13397b899f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/test/browser/test-scenario-horizontal-rendering.ts
Signed-off-by: Jeremy lewi <jeremy@lewi.us>
@jlewi

jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

The configured-browser finding is fixed in eecf6b4. All earlier review threads have been addressed. Please check this final test-harness delta.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: eecf6b4580

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Signed-off-by: Jeremy lewi <jeremy@lewi.us>
@jlewi

jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

CI caught a real interaction bug after all ten desktop geometry assertions passed: activating an inactive Markdown cell stole focus from the nested code scroller before the arrow key. The recording shows the rendered cell wrapper focused instead of the code block.

Commit 8d66f24 preserves an already-focused descendant during automatic focus restoration. Two new activation regression tests (code and table) failed before this fix and pass afterward. All 96 focused tests pass. Please review this focus-restoration change; the previous review findings remain addressed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 8d66f24cfc

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jlewi

jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

The latest CI run passes all 24 horizontal-rendering assertions, including keyboard scrolling at both 1280px and 900px. I inspected the narrow-width code/output screenshots: the focused code scroller remains inside the pane, long output wraps, and the sibling Markdown cell stays bounded.

All other functional scenarios passed. The remaining two failures were Jupyter recording finalization: ffmpeg received no usable MJPEG stream and produced no movie. The Jupyter kernel setup, shared state, output, and stop assertions all passed. The browser workflow is being rerun without changing the reviewed code or weakening assertions.

Signed-off-by: Jeremy lewi <jeremy@lewi.us>
@jlewi

jlewi commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the final delta in 559a1f0, especially the CI-only FFmpeg compatibility shim. The full suite twice passed all 24 horizontal-rendering assertions and every Jupyter functional assertion, but Jupyter video finalization failed with FFmpeg unable to determine MJPEG dimensions. Agent-browser 0.21.2 passes -avioflags direct -fpsprobesize 0 -probesize 32 -analyzeduration 0. The shim restores normal buffering/probing only for its streamed MJPEG command, preserves other arguments and exit status, and leaves every video/scenario assertion enabled. Local real-JPEG encoding with full-frame, 32-byte, and 4096-byte writes passes through the shim; CI will verify Ubuntu FFmpeg 6.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 559a1f078d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jlewi
jlewi merged commit b4a3ff9 into main Sep 10, 2026
3 checks passed
@jlewi
jlewi deleted the fix/notebook-horizontal-rendering branch September 10, 2026 22:09
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