Skip to content

feat: Add fullscreen expand to plan preview#1793

Merged
charlesvien merged 4 commits intomainfrom
04-21-add_fullscreen_expand_to_plan_preview
Apr 23, 2026
Merged

feat: Add fullscreen expand to plan preview#1793
charlesvien merged 4 commits intomainfrom
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

@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-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
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 2c40ec6 to 3cef1dc Compare April 22, 2026 15:19
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from caa2d1f to 54cf08c Compare April 22, 2026 15:23
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 3cef1dc to 5000b46 Compare April 22, 2026 15:23
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 54cf08c to 84c86ac Compare April 22, 2026 15:24
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 5000b46 to 1425b23 Compare April 22, 2026 15:24
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from 84c86ac to 00930cf Compare April 22, 2026 22:33
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch 2 times, most recently from a00a5d1 to e3a4882 Compare April 22, 2026 22:33
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch 2 times, most recently from 7068bcf to e72353a Compare April 23, 2026 00:33
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from e3a4882 to b08c6ec Compare April 23, 2026 00:33
@charlesvien charlesvien force-pushed the 04-21-replace_email_cta_with_discord_link_in_readme branch from e72353a to 02e7190 Compare April 23, 2026 01:27
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from b08c6ec to 578c274 Compare April 23, 2026 01:27
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from 578c274 to dc01db2 Compare April 23, 2026 01:31
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 23, 2026

Merge activity

  • Apr 23, 1:40 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 23, 1:41 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 23, 1:48 AM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-21-replace_email_cta_with_discord_link_in_readme to graphite-base/1793 April 23, 2026 01:40
@charlesvien charlesvien changed the base branch from graphite-base/1793 to main April 23, 2026 01:40
@charlesvien charlesvien force-pushed the 04-21-add_fullscreen_expand_to_plan_preview branch from dc01db2 to 5a6cff4 Compare April 23, 2026 01:41
@charlesvien charlesvien merged commit 8831d8c into main Apr 23, 2026
16 checks passed
@charlesvien charlesvien deleted the 04-21-add_fullscreen_expand_to_plan_preview branch April 23, 2026 01:48
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.

Allow expanding plan preview to full screen

2 participants