You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -107,7 +108,8 @@ massCode uses a **Spaces** system to organize different functional areas:
107
108
108
109
**Space-Aware Sync:**
109
110
-`system:storage-synced` event dispatches refresh based on `getActiveSpaceId()`:
110
-
-`code` / `null` → refresh folders + snippets
111
+
-`code` → refresh folders + snippets
112
+
-`notes` → refresh notes + note folders
111
113
-`math` → `reloadFromDisk()` via `useMathNotebook()`
112
114
-`tools` → no-op (no vault data)
113
115
- Mutable operations must call `markPersistedStorageMutation()` to prevent sync loops.
@@ -119,6 +121,7 @@ massCode uses a **Spaces** system to organize different functional areas:
119
121
-**Usage:** Use `i18n.t('namespace:key.path')` in both templates and scripts.
120
122
-**Default Namespace:** The `ui` namespace is the default. You can use `i18n.t('key.path')` instead of `i18n.t('ui:key.path')`.
121
123
-**Imports:**`import { i18n } from '@/electron'`
124
+
-**After adding/changing locales:** Run `pnpm i18n:copy` to sync locale files.
122
125
123
126
## 6. UI/UX Guidelines
124
127
@@ -133,7 +136,7 @@ massCode uses a **Spaces** system to organize different functional areas:
133
136
-**NEVER** reimplement basic UI elements (buttons, inputs, checkboxes, etc.).
134
137
-**ALWAYS** use existing components from `src/renderer/components/ui/`.
135
138
-**Missing Elements:** If a required UI element does not exist, create it in `src/renderer/components/ui/` first, following established patterns (Tailwind, cva, cn), then use it.
136
-
-**Naming:** They are auto-imported with a `Ui` prefix (e.g., `<UiButton />`, `<UiInput />`, `<UiCheckbox />`).
139
+
-**Naming:** They are auto-imported with a `Ui` prefix (e.g., `<UiInput />`, `<UiActionButton />`, `<UiText />`).
137
140
138
141
## 7. Component Decomposition
139
142
@@ -154,6 +157,12 @@ Keep no logic in `<template>` more complex than a ternary operator.
154
157
-**NEVER** run lint on the whole project during a task.
155
158
- Usage: `pnpm lint <path>` or `pnpm lint:fix <path>`
156
159
160
+
**Testing:**
161
+
162
+
-**ALWAYS** scope test commands to specific files/dirs when working on a feature.
163
+
-**NEVER** run tests on the whole project during a task.
164
+
- Usage: `pnpm test <path>` or `pnpm test:watch <path>`
165
+
157
166
**Other Commands:**
158
167
159
168
-`pnpm dev`: Start dev server
@@ -166,6 +175,7 @@ Keep no logic in `<template>` more complex than a ternary operator.
0 commit comments