Draft
refactor: modular type extraction, design tokens, API layer, mobile layout fix#2
Conversation
… fix mobile layout - Extract all TypeScript types from mock-data.ts into dedicated lib/types.ts - Create unified design tokens in styles/design-tokens.css (radius, font, spacing) - Create API service layer interfaces in services/api.ts for future backend integration - Fix mobile layout: reduce excessive padding/margins in MainLayout, NavbarLayout, FileAreaLayout, and Toolbar to maximize content area on narrow screens - Replace hardcoded hex colors in NavbarLayout with theme CSS variables - Unify font configuration: consolidate Noto Sans SC + Geist + Inter into single font-sans variable via design tokens Co-authored-by: iPycc <110518724+iPycc@users.noreply.github.com> Agent-Logs-Url: https://github.com/iPycc/Cloudrave-Frontend/sessions/c39af1b8-5c66-441f-bb28-0e2d077bbeeb
Copilot
AI
changed the title
[WIP] Refactor front-end project for better modularization
refactor: modular type extraction, design tokens, API layer, mobile layout fix
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project structure was monolithic with types/data/state mixed together, hardcoded style values scattered across components, and mobile layout overly cramped due to compounding padding/margins.
Type extraction
mock-data.tsintosrc/lib/types.ts, organized by domain (auth, buckets, files, shares)mock-data.tsre-exports for backward compatibility — zero import changes needed elsewhereDesign tokens (
src/styles/design-tokens.css)--radius-*,--font-sans, and responsive--spacing-*variablesAPI service layer (
src/services/api.ts)AuthApi,UserApi,BucketApi,FileApi,ShareApi,OfflineTaskApiMobile layout
MainLayout: replacedpx-2 pb-3 gap-2with CSS variable-based spacingFileAreaLayout:p-5→p-2.5 md:p-5Toolbar:px-2→px-1.5 md:px-2NavbarLayout:px-4 p-3→px-2 py-2 md:px-4 md:py-3Style consistency
NavbarLayout(#666666,#2b2b2b, etc.) with theme variables (text-muted-foreground,hover:bg-card)Noto Sans SC+Geist Variable+Interconsolidated into single--font-sansvariableMobile layout (375px)
Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.