68 improve study metadata naming#69
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
corates | dfebd1d | Commit Preview URL | Dec 16 2025, 06:27 PM |
|
Caution Review failedThe pull request is closed. WalkthroughThis PR adds editorial docs and tooling guidance, introduces an audit-logs plan with example logger API, adds an Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Browser (UI)
participant Server as App Server (route/middleware)
participant Auth as Auth Hook (Better-Auth)
participant DB as Database (auditLogs table / ORM)
Client->>Server: Perform action (admin change / auth event / route)
Server->>Auth: Run auth hook
Auth-->>Server: Auth result + user info
Server->>Server: createAuditLogger(db, executionCtx, request)
Server->>Server: logger.log / logger.logAdmin / logger.logAuth invoked
Server->>Server: Serialize changes & metadata (JSON)
Server->>Server: schedule async persistence (waitUntil)
alt persistence success
Server->>DB: INSERT audit log row
DB-->>Server: OK
else persistence failure
DB-->>Server: Error
Server->>Server: console.error / fallback logging
end
Server-->>Client: Response (200/201 or error)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Possibly related issues
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (15)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/web/src/primitives/useProjectStudyHandlers.js (1)
313-327: Consider fallback for studies without originalTitle.In
handleApplyNamingToAll, whenstudy.originalTitleisnullorundefined, thegenerateStudyNamefunction receivesundefinedas the title (line 315). WhilegenerateStudyNamehas fallback logic to 'Untitled Study', you may want to explicitly fall back tostudy.nameto preserve the current display name for studies that haven't been migrated yet:const newName = generateStudyName( { - title: study.originalTitle, + title: study.originalTitle || study.name, firstAuthor: study.firstAuthor, publicationYear: study.publicationYear, authors: study.authors, }, namingConvention, );This would ensure that the bulk rename operation doesn't inadvertently change names of studies that lack an
originalTitleto "Untitled Study".Also applies to: 334-346
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.clauderc(5 hunks).cursorrules(5 hunks).github/copilot-instructions.md(1 hunks)docs/plans/audit-logs-plan.md(19 hunks)packages/web/src/components/project-ui/EditStudyModal.jsx(5 hunks)packages/web/src/primitives/useProject/studies.js(2 hunks)packages/web/src/primitives/useProject/sync.js(1 hunks)packages/web/src/primitives/useProjectStudyHandlers.js(7 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Files:
packages/web/src/primitives/useProject/studies.jspackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/primitives/useProject/sync.jspackages/web/src/primitives/useProjectStudyHandlers.js
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/**/*.{jsx,tsx,js,ts}: When you need to compute a value based on props or state in SolidJS, usecreateMemoto ensure it updates reactively
For complex state or state objects in SolidJS, use Solid'screateStorefor better performance and reactivity
Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
packages/web/src/**/*.{jsx,tsx,js,ts}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Use Solid'screateStorefor complex state or state objects to ensure better performance and reactivity
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Files:
packages/web/src/primitives/useProject/studies.jspackages/web/src/components/project-ui/EditStudyModal.jsxpackages/web/src/primitives/useProject/sync.jspackages/web/src/primitives/useProjectStudyHandlers.js
packages/web/src/components/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
For UI icons, use the
solid-iconslibrary or SVGs only. Do not use emojis
Files:
packages/web/src/components/project-ui/EditStudyModal.jsx
packages/web/src/components/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/components/**/*.{jsx,tsx}: Use responsive design principles for UI components
When implementing UI components, use zag.js frompackages/web/src/components/zag/*and reuse existing components
Do NOT prop-drill application state in SolidJS components - shared or cross-feature state must live in external stores underpackages/web/src/stores/or relative to the component file
Components should receive at most 1-5 props, and only for local configuration, not shared state - if a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
In SolidJS components, do not destructure props as it breaks reactivity - instead access props directly from the props object, or wrap them in a function to ensure they are always up-to-date
Components should be lean and focused - do not implement business logic in components; move that into stores, utilities, or primitives
Files:
packages/web/src/components/project-ui/EditStudyModal.jsx
packages/web/src/components/**
📄 CodeRabbit inference engine (.cursorrules)
Group related components in subdirectories with an
index.jsbarrel export
Files:
packages/web/src/components/project-ui/EditStudyModal.jsx
packages/{web,landing}/src/**/*.{jsx,tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use responsive design principles for UI components
Files:
packages/web/src/components/project-ui/EditStudyModal.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{jsx,tsx}: Use Zag.js for UI components and design system
Reference existing Zag.js components inpackages/web/src/components/zag/*and consult the README.md and documentation before adding new components or debugging
Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
Do not destructure props in SolidJS components as it breaks reactivity. Instead access props directly from the props object or wrap them in a function to ensure they are always up-to-date
UsecreateMemofor derived values based on props or state to ensure reactive updates
Components should be lean and focused and should not implement business logic. Move business logic into stores, utilities, or primitives
Files:
packages/web/src/components/project-ui/EditStudyModal.jsx
🧠 Learnings (26)
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Keep files small, focused, and modular - if a file exceeds a high number of lines, refactor by extracting sub-modules into folders, moving complex logic into separate utility files, or splitting large forms into section components
Applied to files:
.github/copilot-instructions.md.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder, moving complex logic into separate utility files or primitives, and splitting large forms into section components
Applied to files:
.github/copilot-instructions.md.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx,css} : Use responsive design principles for UI components
Applied to files:
.github/copilot-instructions.md.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Use responsive design principles for UI components
Applied to files:
.github/copilot-instructions.md.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Reference existing Zag.js components in `packages/web/src/components/zag/*` and consult the README.md and documentation before adding new components or debugging
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Follow standard JavaScript/SolidJS/Cloudflare best practices
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx,js,ts} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Do NOT prop-drill application state in SolidJS components - shared or cross-feature state must live in external stores under `packages/web/src/stores/` or relative to the component file
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : When implementing UI components, use zag.js from `packages/web/src/components/zag/*` and reuse existing components
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Use Zag.js for UI components and design system
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/** : Group related components in subdirectories with an `index.js` barrel export
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Group related components in subdirectories with an `index.js` barrel export
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Each file should handle one coherent responsibility
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : For complex state or state objects in SolidJS, use Solid's `createStore` for better performance and reactivity
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Use Solid's `createStore` for complex state or state objects to ensure better performance and reactivity
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Components should be lean and focused - do not implement business logic in components; move that into stores, utilities, or primitives
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Components should be lean and focused and should not implement business logic. Move business logic into stores, utilities, or primitives
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Components should receive at most 1-5 props, and only for local configuration, not shared state - if a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : In SolidJS components, do not destructure props as it breaks reactivity - instead access props directly from the props object, or wrap them in a function to ensure they are always up-to-date
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Do not destructure props in SolidJS components as it breaks reactivity. Instead access props directly from the props object or wrap them in a function to ensure they are always up-to-date
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Applied to files:
.clauderc.cursorrules
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/workers/migrations/**/*.sql : All database migrations should go in a single file: `packages/workers/migrations/0001_init.sql` - do NOT create separate migration files
Applied to files:
docs/plans/audit-logs-plan.md
🧬 Code graph analysis (2)
packages/web/src/primitives/useProject/sync.js (1)
packages/web/src/lib/studyNaming.js (1)
studyData(123-123)
packages/web/src/primitives/useProjectStudyHandlers.js (1)
packages/web/src/lib/studyNaming.js (1)
generateStudyName(122-162)
🪛 LanguageTool
docs/plans/audit-logs-plan.md
[uncategorized] ~521-~521: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... logging to user deletion ### Phase 3: High Priority Events 10. [ ] Add audit logging to 2F...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~527-~527: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...g to user profile updates ### Phase 4: Medium Priority Events 13. [ ] Add audit logging to pr...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: corates
🔇 Additional comments (10)
.github/copilot-instructions.md (1)
20-20: LGTM!This guideline addition aligns well with the PR's organizational structure.
.clauderc (1)
5-10: LGTM!The documentation updates provide clear guidance on project structure, libraries, and best practices. These changes are consistent with the updates in
.github/copilot-instructions.md.Also applies to: 31-37, 44-44, 67-67, 76-76
docs/plans/audit-logs-plan.md (1)
1-551: LGTM!This is a comprehensive and well-structured implementation plan for audit logging. The plan includes clear phases, database schema, code examples, and security considerations.
packages/web/src/primitives/useProject/sync.js (1)
64-64: LGTM!The
originalTitlefield addition follows the established pattern for other metadata fields and correctly defaults tonullwhen not present..cursorrules (1)
5-10: LGTM!These documentation updates are consistent with the changes in
.claudercand.github/copilot-instructions.md, ensuring uniform guidance across all configuration files.Also applies to: 31-37, 44-44, 67-67, 76-76
packages/web/src/primitives/useProject/studies.js (1)
41-41: LGTM!The
originalTitlefield handling in bothcreateStudyandupdateStudyfollows the established pattern for other optional metadata fields.Also applies to: 82-82
packages/web/src/components/project-ui/EditStudyModal.jsx (2)
21-21: LGTM! Smart lazy migration pattern.The
originalTitlesignal initialization with fallback tostudy.nameprovides a smooth migration path for existing studies. This ensures the UI remains functional while gradually adopting the new field.Also applies to: 52-53
85-85: LGTM! Clear UI structure and correct update handling.The changes properly distinguish between:
- Display Name: User-facing study identifier
- Article Title: Original title for citation/naming purposes
The update payload correctly sends
undefinedinstead of empty strings, preventing unintended overwrites.Also applies to: 108-120, 138-151
packages/web/src/primitives/useProjectStudyHandlers.js (2)
43-43: LGTM! Consistent originalTitle handling in study addition.The
originalTitlepreservation and propagation logic correctly:
- Captures the original title before naming transformations
- Updates it when better metadata is extracted from PDFs
- Uses it as the basis for generating display names
- Includes it in safe updates with proper undefined filtering
Also applies to: 46-46, 106-106, 132-132, 145-145
248-248: LGTM! Consistent originalTitle handling in reference import.The reference import path correctly preserves the original title before applying naming conventions.
Also applies to: 254-254
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/web/src/components/project-ui/AddMemberModal.jsx (1)
9-292: Consider extracting business logic to stores/utilities.While the current implementation works correctly, the component contains substantial business logic (API calls, search functionality, member addition) that could be extracted per coding guidelines. This would improve maintainability and testability.
Consider refactoring:
- API calls →
stores/projectMembersStore.jsorutilities/memberApi.js- Search logic →
primitives/useSearchUsers.js- Component focuses solely on rendering and UI interactions
This is a pre-existing pattern and not urgent, but would align the component with project guidelines for lean, focused components.
packages/web/src/components/zag/Editable.jsx (1)
61-82: Consider adding controlled mode synchronization.The component correctly avoids prop destructuring and uses reactive getters. However, the Zag machine context is initialized once (lines 61-82), so external updates to the
valueprop won't sync back to the internal state.For fully controlled behavior (e.g., programmatic resets, external validation), consider adding:
const api = createMemo(() => editable.connect(service, normalizeProps)); + // Sync external value changes in controlled mode + createEffect(() => { + if (value() !== undefined && value() !== api().value) { + api().setValue?.(value()); + } + });The current "uncontrolled with notifications" mode works for many use cases, but this addition would support scenarios where the parent needs to update the value programmatically.
As per coding guidelines, components should maintain reactivity for props and avoid breaking SolidJS patterns—the current implementation correctly avoids prop destructuring, but could improve controlled-mode reactivity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
packages/web/package.json(1 hunks)packages/web/src/components/project-ui/AddMemberModal.jsx(2 hunks)packages/web/src/components/project-ui/ProjectCard.jsx(1 hunks)packages/web/src/components/project-ui/ProjectHeader.jsx(3 hunks)packages/web/src/components/project-ui/ProjectView.jsx(1 hunks)packages/web/src/components/zag/Editable.jsx(1 hunks)packages/web/src/components/zag/README.md(1 hunks)packages/web/src/primitives/useProject/index.js(1 hunks)packages/web/src/primitives/useProject/studies.js(3 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Files:
packages/web/src/primitives/useProject/index.jspackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/primitives/useProject/studies.jspackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/**/*.{jsx,tsx,js,ts}: When you need to compute a value based on props or state in SolidJS, usecreateMemoto ensure it updates reactively
For complex state or state objects in SolidJS, use Solid'screateStorefor better performance and reactivity
Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
packages/web/src/**/*.{jsx,tsx,js,ts}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Use Solid'screateStorefor complex state or state objects to ensure better performance and reactivity
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Files:
packages/web/src/primitives/useProject/index.jspackages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/primitives/useProject/studies.jspackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/web/src/components/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
For UI icons, use the
solid-iconslibrary or SVGs only. Do not use emojis
Files:
packages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/web/src/components/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/components/**/*.{jsx,tsx}: Use responsive design principles for UI components
When implementing UI components, use zag.js frompackages/web/src/components/zag/*and reuse existing components
Do NOT prop-drill application state in SolidJS components - shared or cross-feature state must live in external stores underpackages/web/src/stores/or relative to the component file
Components should receive at most 1-5 props, and only for local configuration, not shared state - if a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
In SolidJS components, do not destructure props as it breaks reactivity - instead access props directly from the props object, or wrap them in a function to ensure they are always up-to-date
Components should be lean and focused - do not implement business logic in components; move that into stores, utilities, or primitives
Files:
packages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/web/src/components/**
📄 CodeRabbit inference engine (.cursorrules)
Group related components in subdirectories with an
index.jsbarrel export
Files:
packages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/zag/Editable.jsxpackages/web/src/components/zag/README.mdpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/{web,landing}/src/**/*.{jsx,tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use responsive design principles for UI components
Files:
packages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{jsx,tsx}: Use Zag.js for UI components and design system
Reference existing Zag.js components inpackages/web/src/components/zag/*and consult the README.md and documentation before adding new components or debugging
Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
Do not destructure props in SolidJS components as it breaks reactivity. Instead access props directly from the props object or wrap them in a function to ensure they are always up-to-date
UsecreateMemofor derived values based on props or state to ensure reactive updates
Components should be lean and focused and should not implement business logic. Move business logic into stores, utilities, or primitives
Files:
packages/web/src/components/project-ui/AddMemberModal.jsxpackages/web/src/components/zag/Editable.jsxpackages/web/src/components/project-ui/ProjectView.jsxpackages/web/src/components/project-ui/ProjectCard.jsxpackages/web/src/components/project-ui/ProjectHeader.jsx
🧠 Learnings (7)
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Reference existing Zag.js components in `packages/web/src/components/zag/*` and consult the README.md and documentation before adding new components or debugging
Applied to files:
packages/web/src/components/zag/Editable.jsxpackages/web/src/components/zag/README.mdpackages/web/package.json
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : When implementing UI components, use zag.js from `packages/web/src/components/zag/*` and reuse existing components
Applied to files:
packages/web/src/components/zag/Editable.jsxpackages/web/src/components/zag/README.mdpackages/web/package.json
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Use Zag.js for UI components and design system
Applied to files:
packages/web/src/components/zag/Editable.jsxpackages/web/src/components/zag/README.mdpackages/web/package.json
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
Applied to files:
packages/web/src/components/zag/README.md
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Applied to files:
packages/web/src/components/zag/README.md
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Use responsive design principles for UI components
Applied to files:
packages/web/src/components/zag/README.md
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx,css} : Use responsive design principles for UI components
Applied to files:
packages/web/src/components/zag/README.md
🧬 Code graph analysis (3)
packages/web/src/components/project-ui/AddMemberModal.jsx (1)
packages/web/src/components/zag/Select.jsx (1)
Select(22-152)
packages/web/src/primitives/useProject/studies.js (2)
packages/web/src/primitives/useProject/index.js (1)
getYDoc(48-48)packages/web/src/stores/projectStore.js (1)
projectStore(469-469)
packages/web/src/components/project-ui/ProjectView.jsx (3)
packages/web/src/primitives/useProjectStudyHandlers.js (1)
projectActions(28-28)packages/web/src/primitives/useProjectChecklistHandlers.js (1)
projectActions(16-16)packages/web/src/primitives/useProjectPdfHandlers.js (1)
projectActions(21-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: corates
🔇 Additional comments (13)
packages/web/src/components/project-ui/AddMemberModal.jsx (2)
4-4: LGTM! Clean import using alias.The import correctly uses the
@componentsalias for improved readability, following project conventions.
250-262: Excellent integration of the Zag.js Select component!The Select component is correctly wired with proper props:
- Items follow the expected
{label, value}structure with clear, descriptive labels- Signal getter/setter are correctly used without destructuring (maintaining SolidJS reactivity)
inDialog={true}appropriately prevents portal rendering to avoid focus-trap conflicts in the modal contextThis change improves accessibility and consistency with the design system.
packages/web/package.json (1)
22-22: LGTM! Dependency addition is consistent.The new
@zag-js/editabledependency follows the established version pattern (^1.31.1) used by other Zag.js packages in this project.packages/web/src/primitives/useProject/index.js (1)
178-178: LGTM! Clean API extension.The new
updateDescriptionoperation follows the established delegation pattern and integrates seamlessly with the existing operation set.packages/web/src/components/project-ui/ProjectView.jsx (1)
237-237: LGTM! Proper component wiring.The
onUpdateDescriptionprop follows the same pattern asonRename, maintaining consistency in the component hierarchy.packages/web/src/primitives/useProject/studies.js (2)
41-41: LGTM! Consistent metadata field handling.The
originalTitlefield follows the established pattern for optional metadata fields and integrates cleanly with the study creation and update flows.Also applies to: 82-82
184-237: LGTM! Well-structured description update implementation.The
updateDescriptionfunction properly:
- Handles empty descriptions by sending
nullto clear them- Updates both Y.Doc and local store for consistency
- Includes comprehensive error handling
- Mirrors the established pattern from
renameProjectpackages/web/src/components/zag/README.md (1)
9-9: LGTM! Comprehensive component documentation.The Editable component entry provides clear prop documentation and helpful usage guidance, particularly the distinction between single-line and multi-line editing scenarios.
packages/web/src/components/project-ui/ProjectCard.jsx (1)
38-76: LGTM! Improved card layout structure.The new vertical layout with dedicated sections (header, metadata, actions) provides better visual hierarchy and consistent spacing. The description fallback text ("No description") improves UX by eliminating empty space.
packages/web/src/components/zag/Editable.jsx (1)
86-160: LGTM! Clean Zag.js integration and accessibility.The render logic properly:
- Uses Zag's prop spreads for accessibility
- Conditionally shows input/preview based on editing state
- Includes optional controls with visibility transitions
- Maintains proper disabled/readonly states
Based on learnings, the component correctly references Zag.js patterns from existing components.
packages/web/src/components/project-ui/ProjectHeader.jsx (3)
13-31: LGTM! Proper per-field state management.The separate editing states for name and description avoid coupling and enable independent validation/error handling. The effect on lines 29-31 correctly syncs the local state with prop changes without causing infinite loops.
As per coding guidelines, props are accessed directly (not destructured) to maintain reactivity.
64-88: LGTM! Consistent handler pattern.The description handlers follow the same error handling and state management pattern as the name handlers, maintaining consistency and predictability.
156-214: LGTM! Well-structured description editing UI.The description editing section properly:
- Uses textarea for multi-line input
- Shows fallback text when empty
- Reveals edit button on hover (good UX)
- Displays per-field errors
- Maintains proper disabled states during saves
…/InfinityBowman/corates into 68-improve-study-metadata-naming
…naming 68 improve study metadata naming
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.