Repository navigation
feat(plans): show the inline schedule preview in Edit and lay it out beside the form - #1178
Conversation
Edit showed no preview once the separate preview dialog goes away, so openPlanForm now always mounts the panel. Tests cover weekly, custom and monthly plans (the panel is empty before the Edit opens), the weekly 20% prefill that maps to immediate (#1156), absent coverage, no save calls and a clean reopen. Part of #1153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Edit preview is hypothetical and ignores executed purchases, so a plan already in progress would look like it starts over. A restartsFromToday panel option, passed only by the Edit call, swaps the notice to say so. Part of #1153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… modal The form was the 280px column with the preview above it on phones, so the live effect was off-screen. The layout now uses grid areas without a DOM swap: form (360-440px) then a sticky preview on desktop, one column with the form first at 860px and below, and tighter modal padding at 480px so Cancel is no longer clipped at 320px. The e2e spec now asserts the Edit preview and notice plus column order, overflow and footer position at four widths. Part of #1153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 6 billable files and costs up to $1.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 3 minutes for your next included review. View limit details
Comment |
The reopen test passed even with the dispose calls removed. Two leak tests now spy on the form: closing Edit must leave no panel or modal listener and an unmounted panel, and Edit then Create without closing must leave exactly one set of listeners. Dropping the top-of-open dispose, the onClose dispose or the panel's removeEventListener calls each fail them. The weekly 20% test is marked to be inverted when #1156 is fixed. Part of #1153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the layout commit found three problems. The sticky preview had no height cap, so on a 768px window its lower part was clipped and unreachable; it now caps at the viewport minus the modal chrome and scrolls itself. The panel sat before the form in the DOM while showing after it, reversing tab and screen-reader order; it now follows the form. The preview was about 300px wide just above the 860px stack point, so the single column now starts at 960px. The e2e spec adds 1280x768 and 1024x900 and asserts the panel fits and its last line is reachable, the DOM and tab order, and uses the real viewport height for the footer check. Part of #1153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge gate at
|
Summary
Part of #1153 (PR2 of 3). The read-only inline schedule preview from #1177 now also shows when editing a plan, and the plan modal is laid out so both fit.
17035f4ffeat(plans):openPlanFormmounts the inline preview for Edit as well as Create. New jest tests use a real modal fixture with fake timers. Before the change Edit rendered 0 steps; after it renders 4 (weekly 25%), 3 (custom 33%) and 10 (monthly 10%). A weekly 20% plan shows 1 step, which documents the pre-existing prefill bug fix(plans): Edit pre-selects Immediate for weekly/monthly ramps with non-preset percents #1156.d3966f92feat(plans): Edit gets its own notice via arestartsFromTodaypanel option: "This preview restarts from today for a plan already in progress; executed purchases are not shown."bacf0a2ffeat(plans): layout, usinggrid-template-areaswith no DOM change.minmax(360px, 440px)) and the preview sits beside it, sticky.Layout checked in Playwright (Create and Edit, 900 px viewport height)
The spec asserts the form width (at least 360 px), the preview's position and
position: stickyabove 860 px, stacking at 860 px and below, no page overflow, and the Cancel button inside the viewport.Size
Counted as added + deleted from
git diff --numstat origin/main...HEAD, tests and e2e included. 3 commits: +66/-5, +17/-6, +26/-4.Verification
Evidence is posted as PR comments.
🤖 Generated with Claude Code