From 5f563c2a2f1e1e067103f71ef6b8a12d413af191 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 30 Oct 2025 14:10:47 +0800 Subject: [PATCH] chore: remove cursor rules Signed-off-by: Innei --- .cursor/rules/app.mdc | 27 ---- .cursor/rules/base.mdc | 112 --------------- .cursor/rules/color.mdc | 191 ------------------------- .cursor/rules/header-button-design.mdc | 135 ----------------- .cursor/rules/i18n.mdc | 17 --- .cursor/rules/rn.mdc | 12 -- .cursor/rules/web-component.mdc | 14 -- 7 files changed, 508 deletions(-) delete mode 100644 .cursor/rules/app.mdc delete mode 100644 .cursor/rules/base.mdc delete mode 100644 .cursor/rules/color.mdc delete mode 100644 .cursor/rules/header-button-design.mdc delete mode 100644 .cursor/rules/i18n.mdc delete mode 100644 .cursor/rules/rn.mdc delete mode 100644 .cursor/rules/web-component.mdc diff --git a/.cursor/rules/app.mdc b/.cursor/rules/app.mdc deleted file mode 100644 index 34d12dda1..000000000 --- a/.cursor/rules/app.mdc +++ /dev/null @@ -1,27 +0,0 @@ ---- -description: -globs: -alwaysApply: true ---- -You are writing a UI modernized, AI-driven, user-friendly RSS reader. - -This project is a monorepo for web front-end electron and React Native. - -Using Stack: - -## For Web/Electron Render - -- React 19 -- Framer Motion (Lazy motion, you should use `m`) -- Jotai -- Zustand -- Indexeddb -- TailwindCSS 3 - -Before starting, you need to know the current technical stack structure and the construction of the monorepo. Read tailwindcss to understand the design style. - -## For React Native - -- React 19 -- Expo -- Expo Module Core (Some Native modules included) \ No newline at end of file diff --git a/.cursor/rules/base.mdc b/.cursor/rules/base.mdc deleted file mode 100644 index b52c94c51..000000000 --- a/.cursor/rules/base.mdc +++ /dev/null @@ -1,112 +0,0 @@ ---- -description: -globs: -alwaysApply: true ---- -# Role - -Act as a highly experienced software developer and coding assistant. You are proficient in all major programming languages and frameworks. Your user is an independent developer working on personal or freelance projects. Focus on generating high-quality code, optimizing performance, and debugging issues. - ---- - -# Objective - -Efficiently assist the user in writing and improving code, proactively solving technical issues without needing repeated prompting. Focus on the following core tasks: - -- Writing code -- Optimizing code -- Debugging and issue resolution - -Ensure all solutions are clearly explained and easy to understand. - ---- - -## Phase 1: Initial Assessment - -1. When the user requests a task, check for existing documentation (e.g., `README.md`) to understand the project. -2. If no documentation is found, generate a `README.md` with project features, usage instructions, and key configuration parameters. -3. Use all available context (uploaded files, existing code) to ensure technical alignment with the user's needs. - ---- - -## Phase 2: Implementation - -### 1. Clarify Requirements -- Confirm user requirements clearly. Ask questions when uncertain. -- Suggest the simplest effective solutions, avoiding unnecessary complexity. - -### 2. Writing Code -- Review existing code and outline implementation steps. -- Choose the appropriate language and framework. Follow best practices (e.g., SOLID principles). -- Write clean, readable, and commented code. -- Optimize for clarity, maintainability, and performance. -- Include unit tests when applicable. -- Follow standard language-specific style guides (e.g., PEP 8 for Python, Airbnb for JavaScript). - -### 3. Debugging and Issue Resolution -- Diagnose problems methodically to identify root causes. -- Clearly explain the issue and proposed fix. -- Keep the user informed of progress and adapt quickly to changes. - ---- - -## Phase 3: Completion and Summary - -1. Summarize key changes and improvements. -2. Highlight potential risks, edge cases, or performance concerns. -3. Update documentation (e.g., `README.md`) accordingly. - ---- - -# Best Practices - -### Sequential Thinking (Step-Based Problem Solving Framework) - -Use the [Sequential Thinking](https://github.com/smithery-ai/reference-servers/tree/main/src/sequentialthinking) tool to guide step-by-step problem solving, especially for complex, open-ended tasks. - -- Break tasks into **thought steps** using the Sequential Thinking protocol. -- For each step, follow this structure: - 1.**Define the current goal or assumption** (e.g., "Evaluate authentication options", "Refactor state handling"). - 2.**Use a suitable MCP tool** based on context (e.g., `search_docs`, `code_generator`, `error_explainer`). - 3.**Record the result/output** clearly. - 4.**Determine the next thought step** and continue. - -- When uncertainty exists: - - Explore multiple solution paths using "branch thinking". - - Compare trade-offs or competing strategies. - - Allow rollback or edits to previous thought steps. - -- Use metadata such as: - -`thought`: current thought text - -`thoughtNumber`: current step index - -`totalThoughts`: number of expected steps - -- Encourage interactive feedback and continuous iteration throughout the sequence. - -### Context7 (Up-to-Date Documentation Integration) - -Utilize [Context7](https://github.com/upstash/context7) to fetch and integrate the latest, version-specific documentation and code examples directly into your development environment. - --**Purpose**: Ensure that AI-generated code references current APIs and best practices, reducing errors from outdated information. - --**Usage**: - 1.**Invoke Context7**: Add `use context7` to your prompt to trigger Context7's integration. - 2.**Fetch Documentation**: Context7 retrieves relevant, up-to-date documentation snippets for the libraries or frameworks in use. - 3.**Integrate Snippets**: Incorporate the fetched code examples and documentation into your codebase as needed. - --**Integration**: - - Compatible with MCP clients like Cursor, Windsurf, Claude Desktop, and others. - - Configure your MCP client to include Context7 as a server, enabling seamless access to documentation within your development workflow. - --**Benefits**: - - Reduces reliance on outdated training data. - - Minimizes code hallucinations and deprecated API usage. - - Enhances code accuracy and relevance. - ---- - -# Communication - -- Ask questions when clarification is needed. -- Remain concise, technical, and helpful. -- Include inline code comments where necessary. \ No newline at end of file diff --git a/.cursor/rules/color.mdc b/.cursor/rules/color.mdc deleted file mode 100644 index 09ab34a51..000000000 --- a/.cursor/rules/color.mdc +++ /dev/null @@ -1,191 +0,0 @@ ---- -description: -globs: apps/desktop/**/*,packages/internal/components/**/* -alwaysApply: false ---- -# UIKit Colors for Tailwind CSS - -You should use @https://github.com/Innei/apple-uikit-colors/blob/main/packages/uikit-colors/macos.ts TailwindCSS atom classname. - -## System Colors -red -orange -yellow -green -mint -teal -cyan -blue -indigo -purple -pink -brown -gray - -## Fill Colors -fill -fill-secondary -fill-tertiary -fill-quaternary -fill-quinary -fill-vibrant -fill-vibrant-secondary -fill-vibrant-tertiary -fill-vibrant-quaternary -fill-vibrant-quinary - -## Text Colors -text -text-secondary -text-tertiary -text-quaternary -text-quinary -text-vibrant -text-vibrant-secondary -text-vibrant-tertiary -text-vibrant-quaternary -text-vibrant-quinary - -## Material Colors -material-ultra-thick -material-thick -material-medium -material-thin -material-ultra-thin -material-opaque - -## Control Colors -control-enabled -control-disabled - -## Interface Colors -menu -popover -titlebar -sidebar -selection-focused -selection-focused-fill -selection-unfocused -selection-unfocused-fill -header-view -tooltip -under-window-background - - -## Applied Colors -All above tailwind atom will match this colors. - -``` -@media (prefers-color-scheme: light) { - html { - --color-red: 255 69 58; - --color-orange: 255 149 0; - --color-yellow: 255 204 0; - --color-green: 40 205 65; - --color-mint: 0 199 190; - --color-teal: 89 173 196; - --color-cyan: 85 190 240; - --color-blue: 0 122 255; - --color-indigo: 88 86 214; - --color-purple: 175 82 222; - --color-pink: 255 45 85; - --color-brown: 162 132 94; - --color-gray: 142 142 147; - --color-fill: 0 0 0 / 0.1; - --color-fillSecondary: 0 0 0 / 0.08; - --color-fillTertiary: 0 0 0 / 0.05; - --color-fillQuaternary: 0 0 0 / 0.03; - --color-fillQuinary: 0 0 0 / 0.02; - --color-fillVibrant: 217 217 217; - --color-fillVibrantSecondary: 230 230 230; - --color-fillVibrantTertiary: 242 242 242; - --color-fillVibrantQuaternary: 247 247 247; - --color-fillVibrantQuinary: 251 251 251; - --color-text: 0 0 0 / 0.85; - --color-textSecondary: 0 0 0 / 0.5; - --color-textTertiary: 0 0 0 / 0.25; - --color-textQuaternary: 0 0 0 / 0.1; - --color-textQuinary: 0 0 0 / 0.05; - --color-textVibrant: 76 76 76; - --color-textVibrantSecondary: 128 128 128; - --color-textVibrantTertiary: 191 191 191; - --color-textVibrantQuaternary: 230 230 230; - --color-textVibrantQuinary: 242 242 242; - --color-materialUltraThick: 246 246 246 / 0.84; - --color-materialThick: 246 246 246 / 0.72; - --color-materialMedium: 246 246 246 / 0.6; - --color-materialThin: 246 246 246 / 0.48; - --color-materialUltraThin: 246 246 246 / 0.36; - --color-materialOpaque: 246 246 246; - --color-controlEnabled: 251 251 251; - --color-controlDisabled: 243 243 243; - --color-menu: 40 40 40 / 0.58; - --color-popover: 0 0 0 / 0.28; - --color-titlebar: 234 234 234 / 0.8; - --color-sidebar: 234 234 234 / 0.84; - --color-selectionFocused: 10 130 255 / 0.75; - --color-selectionFocusedFill: 10 130 255; - --color-selectionUnfocused: 0 0 0 / 0.1; - --color-selectionUnfocusedFill: 246 246 246 / 0.84; - --color-headerView: 255 255 255 / 0.8; - --color-tooltip: 246 246 246 / 0.6; - --color-underWindowBackground: 246 246 246 / 0.84; - } -} -@media (prefers-color-scheme: dark) { - html { - --color-red: 255 69 58; - --color-orange: 255 159 10; - --color-yellow: 255 214 10; - --color-green: 50 215 75; - --color-mint: 106 196 220; - --color-teal: 106 196 220; - --color-cyan: 90 200 245; - --color-blue: 10 132 255; - --color-indigo: 94 92 230; - --color-purple: 191 90 242; - --color-pink: 255 55 95; - --color-brown: 172 142 104; - --color-gray: 152 152 157; - --color-fill: 255 255 255 / 0.1; - --color-fillSecondary: 255 255 255 / 0.08; - --color-fillTertiary: 255 255 255 / 0.05; - --color-fillQuaternary: 255 255 255 / 0.03; - --color-fillQuinary: 255 255 255 / 0.02; - --color-fillVibrant: 36 36 36; - --color-fillVibrantSecondary: 20 20 20; - --color-fillVibrantTertiary: 13 13 13; - --color-fillVibrantQuaternary: 9 9 9; - --color-fillVibrantQuinary: 7 7 7; - --color-text: 255 255 255 / 0.85; - --color-textSecondary: 255 255 255 / 0.5; - --color-textTertiary: 255 255 255 / 0.25; - --color-textQuaternary: 255 255 255 / 0.1; - --color-textQuinary: 255 255 255 / 0.05; - --color-textVibrant: 229 229 229; - --color-textVibrantSecondary: 124 124 124; - --color-textVibrantTertiary: 65 65 65; - --color-textVibrantQuaternary: 35 35 35; - --color-textVibrantQuinary: 17 17 17; - --color-materialUltraThick: 40 40 40 / 0.84; - --color-materialThick: 40 40 40 / 0.72; - --color-materialMedium: 40 40 40 / 0.6; - --color-materialThin: 40 40 40 / 0.48; - --color-materialUltraThin: 40 40 40 / 0.36; - --color-materialOpaque: 40 40 40; - --color-controlEnabled: 255 255 255 / 0.2; - --color-controlDisabled: 255 255 255 / 0.1; - --color-menu: 246 246 246 / 0.72; - --color-popover: 246 246 246 / 0.6; - --color-titlebar: 60 60 60 / 0.8; - --color-sidebar: 0 0 0 / 0.45; - --color-selectionFocused: 10 130 255 / 0.75; - --color-selectionFocusedFill: 10 130 255; - --color-selectionUnfocused: 255 255 255 / 0.1; - --color-selectionUnfocusedFill: 40 40 40 / 0.65; - --color-headerView: 30 30 30 / 0.8; - --color-tooltip: 0 0 0 / 0.35; - --color-underWindowBackground: 0 0 0 / 0.45; - } -} -``` \ No newline at end of file diff --git a/.cursor/rules/header-button-design.mdc b/.cursor/rules/header-button-design.mdc deleted file mode 100644 index c0ae5dce1..000000000 --- a/.cursor/rules/header-button-design.mdc +++ /dev/null @@ -1,135 +0,0 @@ ---- -description: -globs: -alwaysApply: false ---- -# Header Button Design System - -When creating header buttons for media previews, overlays, or modal interfaces, follow this modern glass morphism design pattern: - -## Design Principles - -### 1. Glass Morphism Style -- Use semi-transparent backgrounds: `bg-black/20` or `bg-white/10` -- Apply backdrop blur: `backdrop-blur-md` -- Add subtle borders: `border border-white/10` for depth -- Include shadow layers: `shadow-lg shadow-black/25` - -### 2. Perfect 1:1 Circular Design -- Always use `size-10` (40px × 40px) for consistent sizing -- Apply `rounded-full` for perfect circular shape -- Ensure proper centering with `flex items-center justify-center` - -### 3. Layered Depth Effects -```tsx -{/* Glass effect overlay */} -
- -{/* Icon container */} -
{children}
- -{/* Subtle inner shadow for depth */} -
-``` - -### 4. Interactive Animation -- Use Framer Motion `m.button` for smooth animations -- Scale on hover: `whileHover={{ scale: 1.1 }}` -- Scale on tap: `whileTap={{ scale: 0.95 }}` -- Spring transitions: `stiffness: 400, damping: 30` - -### 5. Opacity and Visibility -- Start hidden: `opacity-0` -- Show on group hover: `group-hover/left:opacity-100` -- Use `transition-all duration-300 ease-out` for smooth reveals - -## Implementation Pattern - -```tsx -const HeaderButton: FC<{ - description?: string - onClick: () => void - className?: string - children: React.ReactNode -}> = ({ description, onClick, className, children }) => { - return ( - - - { - e.stopPropagation() - onClick() - }} - className={cn( - // Base styles with modern glass morphism - perfect 1:1 circle - "pointer-events-auto relative flex size-10 items-center justify-center rounded-full", - "bg-black/20 text-white backdrop-blur-md", - // Border and shadow for depth - "border border-white/10 shadow-lg shadow-black/25", - // Opacity and transition - "opacity-0 transition-all duration-300 ease-out group-hover/left:opacity-100", - // Text size - "text-lg", - className, - )} - initial={{ scale: 1 }} - whileHover={{ - scale: 1.1, - backgroundColor: "rgba(255, 255, 255, 0.15)", - borderColor: "rgba(255, 255, 255, 0.2)", - }} - whileTap={{ scale: 0.95 }} - transition={{ - type: "spring", - stiffness: 400, - damping: 30, - }} - > - {/* Glass effect overlay */} -
- - {/* Icon container */} -
{children}
- - {/* Subtle inner shadow for depth */} -
- - - {description && ( - - {description} - - )} - - ) -} -``` - -## Special Variants - -### Close Button (Danger State) -```tsx -className="!bg-red-600/30 !border-red-500/20 !opacity-100 hover:!bg-red-600/50" -``` - -### Navigation Buttons (Carousel Controls) -- Use smaller sizes: `size-8` for mobile, `lg:size-10` for desktop -- Position absolutely with proper spacing: `left-2 lg:left-4` -- Maintain same glass morphism principles - -## Usage Guidelines - -1. **Always use with tooltips** for accessibility -2. **Include stopPropagation** on click handlers to prevent modal dismissal -3. **Make description optional** for navigation buttons that don't need tooltips -4. **Use consistent icon sizing**: `text-lg` for standard, `lg:text-xl` for larger variants -5. **Apply proper z-index**: `z-[100]` for overlay buttons -6. **Group hover patterns**: Use `group-hover/left:opacity-100` for contextual visibility - -## Icons -- Always use icons from `@/icons` directory (project standard) -- Common patterns: `i-mgc-close-cute-re`, `i-mgc-external-link-cute-re`, `i-mgc-download-2-cute-re` -- Navigation: `i-mingcute-left-line`, `i-mingcute-right-line` - -This design system ensures consistent, modern, and accessible header buttons across all media preview and overlay interfaces. diff --git a/.cursor/rules/i18n.mdc b/.cursor/rules/i18n.mdc deleted file mode 100644 index 74fec07a1..000000000 --- a/.cursor/rules/i18n.mdc +++ /dev/null @@ -1,17 +0,0 @@ ---- -description: -globs: locales/**/*.json -alwaysApply: false ---- - -i18n Coding Standards. - -1. Read and follow https://www.i18next.com/translation-function/formatting - -2. Use flat keys. Use `.` to separate. Do not use object form nesting. - -3. For languages sensitive to singular and plural, distinguish between them using the `_one` and `_other` forms. - -4. In the build stage, flattened dot-separated keys (such as 'exif.custom.rendered.custom') will be automatically converted to nested object objects, which may cause conflicts. For example, 'exif.custom.rendered.custom' may conflict with 'exif.custom.rendered'. Please avoid using such dot-separated flat keys. - -5. @locales is located at the root directory and needs to handle all existing languages at the same time. diff --git a/.cursor/rules/rn.mdc b/.cursor/rules/rn.mdc deleted file mode 100644 index 6f54ca323..000000000 --- a/.cursor/rules/rn.mdc +++ /dev/null @@ -1,12 +0,0 @@ ---- -description: -globs: apps/mobile/**/* -alwaysApply: false ---- -1. This is an app written in React native. - -2. You need to use @/apps/mobile/icons for icons, do not use other icon libraries. - -3. You need to use NativewindCSS to write styles, not external StyleSheet.create. - -4. You need to use https://github.com/Innei/apple-uikit-colors/tree/main/packages/react-native-uikit-colors for color design. \ No newline at end of file diff --git a/.cursor/rules/web-component.mdc b/.cursor/rules/web-component.mdc deleted file mode 100644 index 4e5e53d40..000000000 --- a/.cursor/rules/web-component.mdc +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: -globs: apps/desktop/layer/renderer/src/**/* -alwaysApply: false ---- -You need to find the available UI components in the project. - -For web applications (apps/dekstop) - -Components are located at `packages/internal/components` and `apps/desktop/layer/renderer/src/components/ui` - -For rn applications (apps/mobile) - -Components are located at `apps/mobile/src/components` \ No newline at end of file