Skip to content

Show "Maximize pane" in Rendered Markdown overflow menu#11258

Open
wzc520pyfm wants to merge 1 commit into
warpdotdev:masterfrom
wzc520pyfm:wzc520pyfm/add-max-pane-for-rendered-md-pane
Open

Show "Maximize pane" in Rendered Markdown overflow menu#11258
wzc520pyfm wants to merge 1 commit into
warpdotdev:masterfrom
wzc520pyfm:wzc520pyfm/add-max-pane-for-rendered-md-pane

Conversation

@wzc520pyfm
Copy link
Copy Markdown
Contributor

@wzc520pyfm wzc520pyfm commented May 19, 2026

Description

Fixes #11256. Close #11256.

In the Markdown pane, the overflow (three-dot) menu shows "Maximize pane" in Raw mode but is missing the same entry in Rendered mode. The two modes are backed by different views (CodeView for Raw, FileNotebookView for Rendered) and only CodeView wired the toggle into its overflow menu. This PR adds the same toggle to FileNotebookView so the entry is present consistently regardless of mode.

Root cause

  • app/src/code/view.rs::CodeView::overflow_menu_items always inserts MenuItemFields::toggle_pane_action(is_maximized).
  • app/src/notebooks/file/mod.rs::FileNotebookView::pane_header_overflow_menu_items never added the corresponding entry.

Fix

In FileNotebookView:

  • Add a ToggleMaximized variant to FileNotebookAction and handle it by emitting PaneEvent::ToggleMaximized and refreshing the overflow menu (so the label flips between "Maximize pane" / "Minimize pane" after the action runs, matching CodeView).
  • Always insert MenuItemFields::toggle_pane_action(is_maximized) at the top of the overflow menu, computing is_maximized from the pane's focus_handle exactly the way CodeView does. Local-file actions follow after a separator.

Linked Issue

Fixes #11256.

  • The linked issue is labeled `ready-to-spec` or `ready-to-implement`. (Bug report with clear reproduction steps; happy to wait for triage if needed.)
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Automated

Added a regression test `notebooks::file::tests::test_rendered_markdown_overflow_menu_includes_maximize_pane` in `app/src/notebooks/file/mod_tests.rs` that opens a local Markdown file in `FileNotebookView` (the Rendered-mode view) and asserts that the labels returned by `pane_header_overflow_menu_items` include `"Maximize pane"`.

```
cargo nextest run -p warp notebooks::file::tests
Starting 7 tests across 1 binary (4460 tests skipped)
PASS [ 0.021s] (1/7) warp notebooks::file::tests::test_markdown_file_detection
PASS [ 0.031s] (2/7) warp notebooks::file::tests::test_load_static
PASS [ 0.062s] (3/7) warp notebooks::file::tests::test_file_notebook_mermaid_blocks_default_to_rendered
PASS [ 0.079s] (4/7) warp notebooks::file::tests::test_file_notebook_mermaid_context_menu_does_not_show_copy_image
PASS [ 0.079s] (5/7) warp notebooks::file::tests::test_load_before_session
PASS [ 0.079s] (6/7) warp notebooks::file::tests::test_load_local
PASS [ 0.079s] (7/7) warp notebooks::file::tests::test_rendered_markdown_overflow_menu_includes_maximize_pane
Summary [ 0.081s] 7 tests run: 7 passed, 4460 skipped
```

Also re-ran `notebooks::context_menu::tests` to confirm the existing right-click maximize/minimize wiring is untouched (3/3 pass).

Local presubmit-equivalent checks all green:

  • `cargo fmt -p warp --check`
  • `cargo clippy -p warp --tests -- -D warnings`
  • `cargo check -p warp --tests`

Manual

  • I have manually tested my changes locally with `./script/run`

Steps to verify manually:

  1. Open any `.md` file in a Markdown pane.
  2. Switch to Raw → three-dot menu shows Maximize pane.
  3. Switch to Rendered → three-dot menu now also shows Maximize pane (previously missing).
  4. Click it → pane maximizes; reopen the menu → entry flips to Minimize pane; click it → pane restores.

Screenshots / Videos

image image

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Made with Cursor

…1256)

The Markdown pane is implemented by two different views: `CodeView`
backs the Raw mode, and `FileNotebookView` backs the Rendered mode.
`CodeView::overflow_menu_items` exposes `MenuItemFields::toggle_pane_action`
so the three-dot menu always offers a "Maximize pane" / "Minimize pane"
entry, but `FileNotebookView::pane_header_overflow_menu_items` never
wired the same entry. The result was an inconsistent overflow menu that
let users maximize the pane in Raw mode but not in Rendered mode.

Mirror the CodeView pattern in FileNotebookView:
- add a `ToggleMaximized` action that emits `PaneEvent::ToggleMaximized`
  and refreshes the overflow menu so the label flips between "Maximize
  pane" and "Minimize pane",
- always insert the toggle at the top of the overflow menu using
  `MenuItemFields::toggle_pane_action(is_maximized)` with the local
  file actions following after a separator.

Add a regression test that opens a local Markdown file in the rendered
view and asserts the overflow menu includes "Maximize pane".

Co-authored-by: Cursor <cursoragent@cursor.com>
@cla-bot cla-bot Bot added the cla-signed label May 19, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 19, 2026

@wzc520pyfm

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

Readiness check:

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 19, 2026
oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 19, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

@wzc520pyfm

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: #11256

  • Required readiness label: ready-to-implement

Readiness check:

  • #11256: missing ready-to-implement; readiness labels present: none

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@wzc520pyfm wzc520pyfm marked this pull request as draft May 20, 2026 06:39
@wzc520pyfm wzc520pyfm marked this pull request as ready for review May 20, 2026 06:40
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 20, 2026

@wzc520pyfm

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @kevinyang372.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed their stale review May 20, 2026 06:43

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds the pane maximize/minimize overflow-menu action to FileNotebookView so Rendered Markdown panes match Raw Markdown behavior, and includes a regression test for the rendered Markdown overflow menu.

Concerns

  • No blocking correctness, spec-alignment, or security concerns found in the changed lines.
  • The PR description includes visual evidence for this user-facing menu change.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from kevinyang372 May 20, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maximize pane missing in Markdown pane overflow menu when in Rendered mode

1 participant