Skip to content

Conversation

@Kitenite
Copy link
Contributor

@Kitenite Kitenite commented Oct 13, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Important

Remove default mobile frame creation and update desktop frame position in fork.ts, project.ts, and frame.ts.

  • Behavior:
    • Remove creation of default mobile frames in createDefaultFramesForDefaultBranch() in fork.ts and project.ts.
    • Update default desktop frame position in frame.ts to x: '150', y: '40'.
  • Misc:
    • Remove mobileFrame creation in fork.ts and project.ts.

This description was created by Ellipsis for 0201dd1. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • New Features
    • New projects and forks now start with a single desktop frame by default, removing the previously auto-created mobile frame for a cleaner workspace.
    • The initial desktop frame position has been adjusted to improve on-canvas visibility and alignment when a project is created or forked.
    • Creation flow remains otherwise unchanged, providing a simpler, more consistent starting point across both project creation and forking.

@vercel
Copy link

vercel bot commented Oct 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web Ready Ready Preview Comment Oct 13, 2025 8:26am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Oct 13, 2025 8:26am

@supabase
Copy link

supabase bot commented Oct 13, 2025

This pull request has been ignored for the connected project wowaemfasoptxrdjhilu because there are no changes detected in apps/backend/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link

coderabbitai bot commented Oct 13, 2025

Walkthrough

Removes 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

Cohort / File(s) Summary
Project creation flow
apps/web/client/src/server/api/routers/project/project.ts
Deleted logic that constructed and inserted a default MOBILE frame during project creation; DESKTOP frame path unchanged.
Project fork flow
apps/web/client/src/server/api/routers/project/fork.ts
Removed creation/return of default MOBILE frame when forking without source frames; now only creates/returns DESKTOP frame for default branch.
Default frame constants
packages/db/src/defaults/frame.ts
Updated DefaultDesktopFrame coordinates: x 5 → 150, y 0 → 40; other fields unchanged.

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
Loading
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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A single frame upon the floor,
No mobile twin to crowd the door.
I hop and nudge the x and y—
150, 40, placed just right.
Forks now sprout with lighter load,
One sturdy screen to start the road. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description template sections are present but none of them have been populated with actual details such as a clear description, related issues, type of change, testing steps, or additional notes, leaving the PR context incomplete. Please populate each section of the description template with a concise summary of the changes, link related issues, indicate the type of change, describe testing steps, and include any relevant notes or screenshots to complete the PR description.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely describes the primary change of removing the default mobile frame, matching the developer’s intent and providing sufficient context for reviewers without unnecessary detail.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/default-mobile-view-1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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 unused DefaultMobileFrame and DefaultFrameType.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

📥 Commits

Reviewing files that changed from the base of the PR and between e55350f and 0201dd1.

📒 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 instead

Use 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.ts
  • packages/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.ts
  • packages/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.

@Kitenite Kitenite merged commit acb8ed6 into main Oct 13, 2025
5 of 7 checks passed
@Kitenite Kitenite deleted the fix/default-mobile-view-1 branch October 13, 2025 08:30
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.

2 participants