-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: remove default mobile frame #3003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
WalkthroughRemoves creation of default MOBILE frames in project creation and fork flows, leaving only a DESKTOP frame. Adjusts default desktop frame coordinates (x: 150, y: 40). No exported APIs changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant API as Project API
participant DB as Database
rect rgba(200,220,255,0.25)
Note over API: Project Creation (new flow)
U->>API: createProject()
API->>DB: insert DESKTOP default frame (x=150,y=40)
API->>DB: insert conversations, metadata, etc.
DB-->>API: OK
API-->>U: project created (DESKTOP only)
end
Note over API,DB: MOBILE default frame step removed
sequenceDiagram
autonumber
participant U as User
participant API as Fork API
participant DB as Database
rect rgba(220,255,220,0.25)
Note over API: Project Fork (no source frames)
U->>API: forkProject()
API->>DB: insert DESKTOP default frame (x=150,y=40)
DB-->>API: OK
API-->>U: fork complete (DESKTOP only)
end
Note over API,DB: MOBILE default frame creation omitted
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/db/src/defaults/frame.ts (1)
16-21: Remove unusedDefaultMobileFrameandDefaultFrameType.MOBILE.Neither symbol is referenced anywhere outside of
frame.ts; remove both to eliminate dead code.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/web/client/src/server/api/routers/project/fork.ts(1 hunks)apps/web/client/src/server/api/routers/project/project.ts(0 hunks)packages/db/src/defaults/frame.ts(1 hunks)
💤 Files with no reviewable changes (1)
- apps/web/client/src/server/api/routers/project/project.ts
🧰 Additional context used
📓 Path-based instructions (4)
apps/web/client/src/server/api/routers/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
apps/web/client/src/server/api/routers/**/*.ts: Place tRPC routers under apps/web/client/src/server/api/routers/**
Use publicProcedure/protectedProcedure from apps/web/client/src/server/api/trpc.ts and validate inputs with Zod
Return plain objects/arrays; rely on SuperJSON for serialization in tRPC procedures
apps/web/client/src/server/api/routers/**/*.ts: Place tRPC routers under src/server/api/routers/**
Use publicProcedure/protectedProcedure from src/server/api/trpc.ts and validate inputs with Zod
Return plain objects/arrays; rely on SuperJSON for serialization
Files:
apps/web/client/src/server/api/routers/project/fork.ts
apps/web/client/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
apps/web/client/src/**/*.{ts,tsx}: Use path aliases @/* and ~/* for imports that map to apps/web/client/src/*
Avoid hardcoded user-facing text; use next-intl messages/hooks insteadUse path aliases @/* and ~/* for imports mapping to src/*
Files:
apps/web/client/src/server/api/routers/project/fork.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not use the any type unless necessary
Files:
apps/web/client/src/server/api/routers/project/fork.tspackages/db/src/defaults/frame.ts
{apps,packages}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Avoid using the any type unless absolutely necessary
Files:
apps/web/client/src/server/api/routers/project/fork.tspackages/db/src/defaults/frame.ts
🔇 Additional comments (2)
apps/web/client/src/server/api/routers/project/fork.ts (1)
150-157: LGTM! Mobile frame removal is clean.The function now correctly returns only the desktop frame, removing the mobile frame from the default set. The logic is sound and aligns with the PR objective.
packages/db/src/defaults/frame.ts (1)
10-11: LGTM! Desktop frame repositioned.The adjusted coordinates (150, 40) provide better default positioning compared to the previous (5, 0), likely improving the initial canvas layout.
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Remove default mobile frame creation and update desktop frame position in
fork.ts,project.ts, andframe.ts.createDefaultFramesForDefaultBranch()infork.tsandproject.ts.frame.tstox: '150', y: '40'.mobileFramecreation infork.tsandproject.ts.This description was created by
for 0201dd1. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit