Skip to content

feat: Add fullscreen expand to plan preview#1793

Open
charlesvien wants to merge 4 commits into04-21-replace_email_cta_with_discord_link_in_readmefrom
04-21-add_fullscreen_expand_to_plan_preview
Open

feat: Add fullscreen expand to plan preview#1793
charlesvien wants to merge 4 commits into04-21-replace_email_cta_with_discord_link_in_readmefrom
04-21-add_fullscreen_expand_to_plan_preview

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 22, 2026

Problem

Plan previews are capped at 50vh, making long plans hard to read in full.

Closes #1743

See below the screen of the inline plan preview (in blue) with the expand button on the top right of the plan and the expanded plan view (the first image).

CleanShot 2026-04-21 at 17.16.22@2x.png

CleanShot 2026-04-21 at 17.16.17@2x.png

Changes

  1. Add expand button (ArrowsOut) to plan preview card
  2. Portal fullscreen view into existing conversation overlay, matching MCP app pattern
  3. Use neutral theme (bg-gray-1) for fullscreen, keep blue accent for inline card
  4. Support Escape key and X button to exit fullscreen
  5. Preserve scroll position across mode toggles

How did you test this?

Manually

Copy link
Copy Markdown
Member Author

charlesvien commented Apr 22, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@charlesvien charlesvien changed the title Add fullscreen expand to plan preview feat: Add fullscreen expand to plan preview Apr 22, 2026
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 6cdea85 to d0a4b67 Compare April 22, 2026 00:37
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from bc525e6 to 20a7ee1 Compare April 22, 2026 00:41
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch 2 times, most recently from d4fec55 to f6b3492 Compare April 22, 2026 00:47
@charlesvien charlesvien marked this pull request as ready for review April 22, 2026 00:47
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/components/permissions/PlanContent.tsx
Line: 19-37

Comment:
**Scroll tracking breaks after mode toggle**

The scroll `useEffect` depends only on `[id]`, so when `isFullscreen` flips and `scrollRef.current` is re-bound to a different DOM node, the effect never re-runs. The listener stays on the stale (now detached) element: scroll events in the new mode go untracked, and `el.scrollTop = position` (position restoration) never fires for the newly mounted element. This directly breaks the PR's stated goal of preserving scroll position across mode toggles.

Add `isFullscreen` to the dependency array so the effect re-attaches to whichever element is currently active:

```suggestion
  useEffect(() => {
    const el = scrollRef.current;
    if (!el) return;

    const position = planScrollPosition.get(id);
    if (position !== undefined) {
      el.scrollTop = position;
    }

    const handleScroll = () => {
      planScrollPosition.set(id, el.scrollTop);
    };

    el.addEventListener("scroll", handleScroll, { passive: true });

    return () => {
      el.removeEventListener("scroll", handleScroll);
    };
  }, [id, isFullscreen]);
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: apps/code/src/renderer/components/permissions/PlanContent.tsx
Line: 72-75

Comment:
**Superfluous opacity transition**

`transition: "opacity 150ms ease"` is set on the fullscreen overlay, but nothing in the code ever changes the element's `opacity`. The transition never fires, making this a no-op style property. Per simplicity rule #4, superfluous parts should be removed.

```suggestion
          <Box
            className="pointer-events-auto absolute inset-0 flex flex-col bg-gray-1"
          >
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Add fullscreen expand to plan preview" | Re-trigger Greptile

Comment thread apps/code/src/renderer/components/permissions/PlanContent.tsx
Comment thread apps/code/src/renderer/components/permissions/PlanContent.tsx Outdated
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 774bd27 to 2c49b8a Compare April 22, 2026 01:37
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch 2 times, most recently from 1c25914 to 1d1d68a Compare April 22, 2026 01:40
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch 2 times, most recently from c41e432 to e7f9eec Compare April 22, 2026 01:47
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 1d1d68a to 960e351 Compare April 22, 2026 01:47
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from e7f9eec to c1caeb1 Compare April 22, 2026 01:54
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 960e351 to 355c40e Compare April 22, 2026 01:54
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch 2 times, most recently from 341d9ba to f8c34d6 Compare April 22, 2026 03:33
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 58add1c to 07d21c3 Compare April 22, 2026 03:33
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from f8c34d6 to e951a1c Compare April 22, 2026 03:55
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch 2 times, most recently from 665aa02 to 4ce9fb9 Compare April 22, 2026 05:11
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from e951a1c to 46afbff Compare April 22, 2026 05:11
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 4ce9fb9 to 9ac73f9 Compare April 22, 2026 05:13
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch 2 times, most recently from 33ec432 to 2cd556e Compare April 22, 2026 05:21
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 9ac73f9 to 88d7b84 Compare April 22, 2026 05:21
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 2cd556e to 482daea Compare April 22, 2026 05:30
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 88d7b84 to 62e41e9 Compare April 22, 2026 05:30
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 482daea to 5805fdc Compare April 22, 2026 05:43
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 62e41e9 to 117493a Compare April 22, 2026 05:43
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 5805fdc to 2c40ec6 Compare April 22, 2026 08:03
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 117493a to d8f6b3f Compare April 22, 2026 08:03
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.

1 participant