Uh oh!
There was an error while loading. Please reload this page.
fix(modals): center modals in visible content area accounting for sidebar and panel - #3934
Conversation
PR SummaryLow Risk Overview Workspace layout CSS vars are made safer across routes: Modal motion is adjusted by removing the horizontal slide animation from Reviewed by Cursor Bugbot for commit bb1745a. Configure here. |
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes modal centering across the app so that Command K and all Key changes:
Confidence Score: 5/5Safe to merge — all changes are a coherent, well-reasoned fix with no regressions identified. All prior review concerns were thoughtfully addressed (CSS sentinel rationale, blocking script coverage, formula documentation, panel-always-rendered comment). No new P0 or P1 issues found. The centering formulas are mathematically correct, the blocking-script edge cases are now fully covered, and the usePathname approach is idiomatic for Next.js. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Page Load] --> B{pathname includes /workspace/?}
B -- No --> C[CSS default: --sidebar-width = 0px]
B -- Yes --> D{localStorage sidebar-state exists?}
D -- No --> E[Set --sidebar-width = 248px default]
D -- Yes --> F{isCollapsed?}
F -- Yes --> G[Set --sidebar-width = 51px]
F -- No --> H{width in valid range?}
H -- Yes --> I[Set --sidebar-width = stored width]
H -- width > max --> J[Set --sidebar-width = maxSidebarWidth]
H -- width out of range --> K[Set --sidebar-width = 248px default]
D -- parse error --> L[Set --sidebar-width = 248px default]
C --> M[Modal centering]
G --> M
I --> M
J --> M
K --> M
E --> M
L --> M
M --> N{pathname includes /w/?}
N -- Yes --> O[left: calc 50% + sidebar - panel / 2]
N -- No --> P[left: calc sidebar/2 + 50%]
P -- sidebar=0px --> Q[= 50% viewport center]
Reviews (2): Last reviewed commit: "fix(modals): address pr feedback — comme..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Apr 4, 2026
waleedlatif1
commented
Apr 4, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bb1745a. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…ebar and panel (#3934) * fix(modals): center modals in visible content area accounting for sidebar and panel * fix(modals): address pr feedback — comment clarity and document panel assumption
Summary
Type of Change
Testing
Tested manually
Checklist