Skip to content

81 todo tab multiple pdf support#83

Merged
InfinityBowman merged 4 commits into
mainfrom
81-todo-tab-multiple-pdf-support
Dec 18, 2025
Merged

81 todo tab multiple pdf support#83
InfinityBowman merged 4 commits into
mainfrom
81-todo-tab-multiple-pdf-support

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 18, 2025

Summary by CodeRabbit

  • New Features

    • Collapsible, priority-sorted PDF lists in study views.
    • Compact todo-row layout with improved PDF display.
    • Automatic checklist status advances from pending → in-progress on first edit.
    • Dashboard UX improvements planning document added.
  • Refactor

    • Component exports standardized to named exports (import usage updated).
  • Style

    • Minor UI spacing/class adjustments.
  • Chores

    • Added editorial guidance lines to local config.

✏️ Tip: You can customize this high-level summary in your review settings.

@InfinityBowman InfinityBowman linked an issue Dec 18, 2025 that may be closed by this pull request
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 18, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
⛔ Deployment terminated
View logs
corates 86869a6 Commit Preview URL Dec 18 2025, 05:26 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Refactors tab exports to named/barrel patterns, adds a new TodoStudyRow with collapsible, sorted PDF lists and download/view handlers, updates StudyCard PDF UI, swaps ReviewerAssignment to Collapsible, extends Editable variant types, auto-transitions checklist status on first edit, and adds a dashboard UX plan and minor guidance edits.

Changes

Cohort / File(s) Summary
Guidance Files
\.clauderc, \.cursorrules
Editorial guidance lines added instructing to ignore migrations unless explicitly requested. No behavioral changes.
Documentation
docs/plans/dashboard-ux-improvements.plan.md
New UX improvements plan document (analysis, options, phased roadmap, ASCII mockups, technical considerations).
Type Definitions
packages/ui/src/index.d.ts
Extended EditableProps.variant union to include 'inline' and 'field'.
Project Header & Small Styling
packages/web/src/components/project-ui/ProjectHeader.jsx, .../all-studies-tab/study-card/StudyCardHeader.jsx, .../all-studies-tab/AllStudiesTab.jsx
Minor className changes (added -ml-2, layout spacing adjustments); removed explicit variant='heading' prop from one Editable usage.
Tab Export/Import Restructure
packages/web/src/components/project-ui/overview-tab/index.js, .../completed-tab/index.js, .../reconcile-tab/ReconcileTab.jsx, .../reconcile-tab/index.js, .../todo-tab/index.js, .../ProjectView.jsx
Converted several modules to barrel/named exports, renamed ReadyToReconcileTabReconcileTab, updated imports/usages in ProjectView to use named exports (e.g., IncludedStudiesTabAllStudiesTab).
ReviewerAssignment UI
packages/web/src/components/project-ui/ReviewerAssignment.jsx
Replaced manual show/hide with Collapsible component; updated trigger UI to use a rotating right-chev and user icon.
StudyCard PDF UI
packages/web/src/components/project-ui/StudyCard.jsx
Replaced inline "View PDF" with a collapsible, read-only PDF list; memoized and sorted PDFs by tag priority (primary, protocol, secondary) and uploadedAt; exposes onViewPdf / onDownloadPdf callbacks.
TodoStudyRow (new) & ToDoTab updates
packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx, .../ToDoTab.jsx, .../index.js
Added TodoStudyRow component (compact row with sorted, collapsible PDF list, citation, checklist badges, checklist form toggle); ToDoTab now renders TodoStudyRow instances, removed getAssigneeName usage, added onDownloadPdf prop; barrel export added.
Checklist Logic
packages/web/src/primitives/useProject/checklists.js
On checklist update, if status is 'pending' it is auto-set to 'in-progress' on first edit (before updating updatedAt).
Exports Normalization
packages/web/src/components/project-ui/completed-tab/index.js, .../overview-tab/index.js
Converted/added barrel exports to expose components as named exports.
Misc
.gitignore
Added /docs/plans/* to ignore rules; minor formatting of an existing entry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus review on:
    • PDF sorting and memoization in StudyCard.jsx and TodoStudyRow.jsx (priority ordering and date tie-breakers).
    • Interaction and prop surface between ToDoTab, TodoStudyRow, and existing checklist handlers (ensure props align).
    • Barrel export/name changes and imports in ProjectView.jsx to avoid import mismatches or circulars.
    • Checklist auto-transition in useProject/checklists.js to ensure it doesn't unintentionally change workflows.
    • Accessibility and state behavior of Collapsible integration in ReviewerAssignment and PDF sections.

Possibly related issues

  • TODO tab multiple pdf support #81 — Implements multi-PDF support for the ToDo tab (sorting, collapsible lists, view/download handlers) which matches changes in this PR.

Possibly related PRs

Poem

🐰 I hopped through tabs and moved a name,
Stacked PDFs tidy, sorted by fame,
A row for todos, a chevron that spins,
Checklists awake when the first edit begins,
Notes in the plan — a rabbit applauds the gains!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding multiple PDF support to the todo tab, which is evident from extensive modifications to TodoStudyRow, ToDoTab, and related components throughout the PR.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 664e870 and 86869a6.

📒 Files selected for processing (1)
  • .gitignore (1 hunks)

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

Copy link
Copy Markdown

@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: 1

🧹 Nitpick comments (4)
docs/plans/dashboard-ux-improvements.plan.md (1)

12-12: Add language identifiers to fenced code blocks.

All fenced code blocks in documentation should include a language specifier for proper syntax highlighting and markdown linting compliance. The following blocks are missing identifiers: lines 12, 63, 99, 142, 230, 248, and 268.

For ASCII mockups/diagrams, use ```text or ```plaintext.

🔎 Example fix for line 12:
-```
+```text
 Dashboard.jsx
 ├── ProjectDashboard.jsx (logged in only)

Also applies to: 63-63, 99-99, 142-142, 230-230, 248-248, 268-268

packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (3)

15-26: Consider reducing prop count by using context or store.

This component receives 10 props which exceeds the guideline of at most 1-5 props for local configuration. Several of these props (members, currentUserId, onViewPdf, onDownloadPdf, onOpenChecklist, onAddChecklist) appear to be shared state or handlers that could be accessed via the existing ProjectContext or a store rather than prop-drilling from ToDoTab.

As per coding guidelines, if a component would need more than 5 props, consider moving the shared data into an external store, a primitive, or Solid context.


33-42: Extract duplicate PDF sorting logic to a shared utility.

This PDF sorting logic (by tag priority: primary → protocol → secondary, then by uploadedAt descending) is duplicated across TodoStudyRow, StudyCard, and StudyPdfSection. Consider extracting it to a reusable utility function.

🔎 Suggested utility extraction:

Create a shared utility in packages/web/src/utils/pdf-utils.js:

export const PDF_TAG_ORDER = { primary: 0, protocol: 1, secondary: 2 };

export function sortPdfsByTagAndDate(pdfs) {
  return [...pdfs].sort((a, b) => {
    const tagA = PDF_TAG_ORDER[a.tag] ?? 2;
    const tagB = PDF_TAG_ORDER[b.tag] ?? 2;
    if (tagA !== tagB) return tagA - tagB;
    return (b.uploadedAt || 0) - (a.uploadedAt || 0);
  });
}

Then use it in components:

+import { sortPdfsByTagAndDate } from '@/utils/pdf-utils.js';

 const sortedPdfs = createMemo(() => {
   const pdfs = study().pdfs || [];
-  return [...pdfs].sort((a, b) => {
-    const tagOrder = { primary: 0, protocol: 1, secondary: 2 };
-    const tagA = tagOrder[a.tag] ?? 2;
-    const tagB = tagOrder[b.tag] ?? 2;
-    if (tagA !== tagB) return tagA - tagB;
-    return (b.uploadedAt || 0) - (a.uploadedAt || 0);
-  });
+  return sortPdfsByTagAndDate(pdfs);
 });

141-145: Consider using a status label map for cleaner code.

The nested ternary for status labels can be simplified with a lookup object, improving readability:

🔎 Suggested refactor:
+const STATUS_LABELS = {
+  'in-progress': 'In Progress',
+  'completed': 'Completed',
+  'pending': 'Pending',
+};

 <span ...>
-  {checklist().status === 'in-progress' ?
-    'In Progress'
-  : checklist().status === 'completed' ?
-    'Completed'
-  : 'Pending'}
+  {STATUS_LABELS[checklist().status] || 'Pending'}
 </span>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72cb03f and 664e870.

📒 Files selected for processing (18)
  • .clauderc (1 hunks)
  • .cursorrules (1 hunks)
  • docs/plans/dashboard-ux-improvements.plan.md (1 hunks)
  • packages/ui/src/index.d.ts (1 hunks)
  • packages/web/src/components/project-ui/ProjectHeader.jsx (1 hunks)
  • packages/web/src/components/project-ui/ProjectView.jsx (2 hunks)
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx (3 hunks)
  • packages/web/src/components/project-ui/StudyCard.jsx (3 hunks)
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (2 hunks)
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx (1 hunks)
  • packages/web/src/components/project-ui/completed-tab/index.js (1 hunks)
  • packages/web/src/components/project-ui/overview-tab/index.js (1 hunks)
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (1 hunks)
  • packages/web/src/components/project-ui/reconcile-tab/index.js (1 hunks)
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (3 hunks)
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (1 hunks)
  • packages/web/src/components/project-ui/todo-tab/index.js (1 hunks)
  • packages/web/src/primitives/useProject/checklists.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,jsx,ts,tsx}: Do not use emojis in code, comments, or documentation
For UI icons, use the solid-icons library or SVGs only. Do not use emojis
Follow standard JavaScript/SolidJS/Cloudflare best practices
Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Prefer using config files rather than hardcoding values
Use Zod for schema and input validation

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Use Zod for schema and input validation

Files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/ui/src/index.d.ts
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
packages/web/src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

packages/web/src/**/*.{js,jsx,ts,tsx}: Use responsive design principles for UI components
Keep files small, focused, and modular. If a file exceeds a high number of lines, extract sub-modules into a folder with index.jsx and helper components, or move complex logic into separate utility files or primitives
Each file should handle one coherent responsibility
Group related components in subdirectories with an index.js barrel export
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
Import stores directly where needed instead of passing values through multiple components
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 (when scoped to a feature)
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 (e.g., () => props.name) to ensure they are always up-to-date
Use createMemo for derived values based on props or state to ensure reactive updates
Use Solid's createStore for complex state or state objects for better performance and reactivity
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Components should be lean and focused. Do not implement business logic; move that into stores, utilities, or primitives
Never have a component act as a 'God component' coordinating multiple large concerns

Files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
**/*.{jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

For UI icons, use the solid-icons library or SVGs only. Do not use emojis

Files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/ui/src/index.d.ts
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Group related components in subdirectories with an index.js barrel export

Files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Create reusable logic in primitives (hooks) that can be shared across components

Files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/primitives/useProject/checklists.js
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
packages/web/src/components/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

packages/web/src/components/**/*.{jsx,tsx}: Use responsive design principles for UI components
Use Zag.js for UI components and design system
Reuse existing Zag components from packages/web/src/components/zag/* and check the README.md list before adding new components
Components should receive at most 1–5 props for local configuration only, not shared state
Components should be lean and focused on rendering, not implement business logic. Move business logic into stores, utilities, or primitives
Never have a component act as a God component coordinating multiple large concerns

Files:

  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
packages/web/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

packages/web/src/**/*.{jsx,tsx}: Do NOT prop-drill application state in SolidJS. Use external stores under packages/web/src/stores/ or component-relative stores instead
Do not destructure props in SolidJS components; access props directly or wrap them in a function to maintain reactivity
Use createMemo for derived values and createStore for complex state in SolidJS

Files:

  • packages/web/src/components/project-ui/ProjectHeader.jsx
  • packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/components/project-ui/StudyCard.jsx
  • packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx
  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
docs/plans/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place plans in the docs/plans/ directory

Files:

  • docs/plans/dashboard-ux-improvements.plan.md
🧠 Learnings (22)
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export

Applied to files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/completed-tab/index.js
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/components/**/*.{js,jsx,ts,tsx} : Group related components in subdirectories with an index.js barrel export

Applied to files:

  • packages/web/src/components/project-ui/reconcile-tab/index.js
  • packages/web/src/components/project-ui/overview-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/completed-tab/index.js
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: This project is split into multiple packages under the packages/ directory: landing/marketing site, main app (web), and backend services (workers). Each package may have its own dependencies and configurations

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: This project uses Cloudflare Workers only for backend services and frontend deployments. Cloudflare Pages is not used

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Do not use emojis in code, comments, documentation, or commit messages

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Do not use emojis in code, comments, or documentation

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/workers/migrations/*.sql : All migrations should go in a single file: packages/workers/migrations/0001_init.sql. Do NOT create separate migration files. Edit the existing 0001_init.sql file directly when adding new tables or schema changes

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/workers/migrations/** : All database migrations should go in a single file: packages/workers/migrations/0001_init.sql. Do NOT create separate migration files

Applied to files:

  • .cursorrules
  • .clauderc
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Reuse existing Zag components from packages/web/src/components/zag/* and check the README.md list before adding new components

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Keep files small, focused, and modular. If a file exceeds a high number of lines, extract sub-modules into a folder with index.jsx and helper components, or move complex logic into separate utility files or primitives

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/index.js
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Import stores directly where needed instead of passing values through multiple components

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/index.js
  • packages/web/src/components/project-ui/completed-tab/index.js
  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Each file should handle one coherent responsibility

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/index.js
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context (when scoped to a feature)

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Do not destructure props in SolidJS components; access props directly or wrap them in a function to maintain reactivity

Applied to files:

  • packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use responsive design principles for UI components

Applied to files:

  • packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx
  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx} : Use createMemo for derived values and createStore for complex state in SolidJS

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/**/*.{js,jsx,ts,tsx} : Use Solid's createStore for complex state or state objects for better performance and reactivity

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to **/*.{jsx,tsx,js,ts} : For UI icons, use the `solid-icons` library or SVGs only. Do not use emojis

Applied to files:

  • packages/web/src/components/project-ui/ReviewerAssignment.jsx
📚 Learning: 2025-12-18T05:00:29.870Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-18T05:00:29.870Z
Learning: Applies to packages/web/src/components/**/*.{jsx,tsx} : Use Zag.js for UI components and design system

Applied to files:

  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-16T18:27:52.769Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.769Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use aliases for imports when appropriate to improve readability

Applied to files:

  • packages/web/src/components/project-ui/ProjectView.jsx
📚 Learning: 2025-12-16T18:27:52.770Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T18:27:52.770Z
Learning: Applies to packages/web/src/components/zag/**/*.{js,jsx,ts,tsx} : Zag component exist in packages/web/src/components/zag/* and should be reused. Check the README.md in that folder for a list of existing components before adding new components or debugging

Applied to files:

  • packages/web/src/components/project-ui/ProjectView.jsx
🧬 Code graph analysis (4)
packages/web/src/primitives/useProject/checklists.js (1)
packages/web/src/components/billing/SubscriptionCard.jsx (1)
  • currentStatus (33-33)
packages/web/src/components/project-ui/StudyCard.jsx (3)
packages/web/src/components/project-ui/all-studies-tab/study-card/StudyPdfSection.jsx (1)
  • sortedPdfs (33-41)
packages/ui/src/index.d.ts (1)
  • Collapsible (25-25)
packages/web/src/components/checklist-ui/pdf/PdfListItem.jsx (1)
  • PdfListItem (18-198)
packages/web/src/components/project-ui/ReviewerAssignment.jsx (2)
packages/ui/src/index.d.ts (1)
  • Collapsible (25-25)
packages/ui/src/zag/Collapsible.jsx (2)
  • Collapsible (15-70)
  • api (32-32)
packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (1)
packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (2)
  • study (29-29)
  • TodoStudyRow (15-202)
🪛 markdownlint-cli2 (0.18.1)
docs/plans/dashboard-ux-improvements.plan.md

12-12: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


63-63: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


99-99: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


142-142: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


230-230: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


248-248: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


268-268: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ 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 (21)
.cursorrules (1)

11-11: LGTM!

Editorial addition clarifying project status and migration scope is helpful for onboarding guidance.

.clauderc (1)

11-11: LGTM!

Consistent editorial guidance across configuration files.

docs/plans/dashboard-ux-improvements.plan.md (2)

252-252: Remove emojis from documentation per coding guidelines.

The ASCII mockups contain emojis (🔍, 👤, 🗑) that violate the documented guideline: "Do not use emojis in code, comments, documentation, or commit messages" (.cursorrules line 15). Replace with text descriptions instead.

[suggest_minor_issue]

🔎 Example fixes:

Line 252:

-│ [🔍 Search...]              [Sort: Recent ▾]│
+│ [Search...]                 [Sort: Recent ▾]│

Line 274:

-│ 👤👤 2 members                              │
+│ 2 members                                   │

Line 276:

-│ [Open Project]                    [🗑]      │
+│ [Open Project]                [Delete]      │

Also applies to: 274-274, 276-276


1-317: Excellent planning document structure.

The dashboard UX improvements plan is well-organized with clear sections, multiple design options at different effort levels, phased implementation roadmap, and technical considerations. Good alignment with the PR's refactoring goals for tab components and UI enhancements. Once the minor formatting issues above are resolved, this will serve as strong guidance for implementation.

packages/web/src/components/project-ui/ProjectHeader.jsx (1)

90-90: LGTM - Consistent styling adjustment.

The -ml-2 negative margin aligns with the same styling update applied to StudyCardHeader, maintaining visual consistency across editable header components.

packages/web/src/components/project-ui/all-studies-tab/study-card/StudyCardHeader.jsx (1)

127-127: LGTM - Consistent styling adjustment.

The -ml-2 negative margin matches the styling update in ProjectHeader, ensuring uniform visual alignment across editable components.

packages/ui/src/index.d.ts (1)

8-8: Variants 'inline' and 'field' are fully implemented in the Editable component.

The variant type definition at index.d.ts:8 is correctly matched by the implementation in packages/ui/src/zag/Editable.jsx. Both variants are defined in the variants object (lines 20-24 for 'inline' and lines 32-36 for 'field') with complete styling rules for area, input, and preview elements. The variant prop is properly extracted and applied via variantStyles() at lines 152-161.

packages/web/src/primitives/useProject/checklists.js (1)

447-451: LGTM! Sensible auto-transition behavior.

The automatic status transition from 'pending' to 'in-progress' on first edit provides a smooth user experience and enforces expected state progression. The implementation is safe and well-placed.

packages/web/src/components/project-ui/todo-tab/ToDoTab.jsx (1)

1-90: LGTM! Clean refactor to specialized component.

The switch from StudyCard to TodoStudyRow provides a more focused UI for the todo tab with collapsible PDF sections. The spacing adjustment (space-y-6 → space-y-2) creates a more compact layout appropriate for this view. Props are correctly passed to match TodoStudyRow's interface.

packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (1)

152-152: LGTM! Minor layout adjustments.

The CSS tweaks refine spacing without affecting functionality.

Also applies to: 171-171

packages/web/src/components/project-ui/reconcile-tab/index.js (1)

1-2: LGTM! Proper barrel export.

This aligns with the project's pattern of using index.js barrel exports for modular tab components.

Based on coding guidelines that recommend grouping related components in subdirectories with index.js barrel exports.

packages/web/src/components/project-ui/overview-tab/index.js (1)

1-2: LGTM! Consistent barrel export.

Follows the same pattern as other tab modules, enabling clean named imports.

Based on coding guidelines that recommend grouping related components in subdirectories with index.js barrel exports.

packages/web/src/components/project-ui/reconcile-tab/ReconcileTab.jsx (1)

7-11: LGTM! Consistent naming.

The rename from ReadyToReconcileTab to ReconcileTab aligns with the barrel export pattern and provides a cleaner, more concise component name.

packages/web/src/components/project-ui/todo-tab/index.js (1)

1-3: LGTM! Comprehensive barrel export.

Properly exports both TodoStudyRow and ToDoTab, enabling clean named imports for the todo tab module.

Based on coding guidelines that recommend grouping related components in subdirectories with index.js barrel exports.

packages/web/src/components/project-ui/ReviewerAssignment.jsx (1)

8-8: LGTM! Excellent refactor to use existing Collapsible component.

The migration from manual expansion logic to the Zag Collapsible component improves consistency across the codebase. The chevron rotation pattern (BiRegularChevronRight with rotate-90) aligns with usage in TodoStudyRow, creating a unified collapsible UI pattern.

Based on coding guidelines to reuse existing Zag components from packages/web/src/components/zag/*.

Also applies to: 13-13, 429-449, 592-592

packages/web/src/components/project-ui/completed-tab/index.js (1)

1-3: LGTM!

The named export pattern is consistent with the other exports in this barrel file and aligns with the PR's goal of standardizing imports across tab modules. Based on learnings, this follows the guideline to group related components in subdirectories with an index.js barrel export.

packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx (2)

88-92: Verify Collapsible trigger click handling.

The custom onClick={handleHeaderClick} may override the click handler provided by api.getTriggerProps(). If getTriggerProps() returns its own onClick, you should merge them rather than replace. Consider calling the original handler inside handleHeaderClick:

🔎 Suggested fix if props include onClick:
 <div
   {...api.getTriggerProps()}
-  onClick={handleHeaderClick}
+  onClick={e => {
+    handleHeaderClick(e);
+    // If the trigger props include an onClick, it should be called
+    api.getTriggerProps().onClick?.(e);
+  }}
   class={`flex items-center gap-3 px-4 py-3 select-none ${hasPdfs() ? 'cursor-pointer' : ''}`}
 >

Alternatively, verify that the Collapsible component from @corates/ui relies solely on onOpenChange for state management rather than internal click handlers in getTriggerProps().


188-199: LGTM!

The ChecklistForm is correctly placed outside the Collapsible component, ensuring it remains visible when toggled regardless of the PDF section's state.

packages/web/src/components/project-ui/StudyCard.jsx (1)

34-62: LGTM!

The new imports, state signal, and memoized sortedPdfs are correctly implemented. The createMemo usage for sortedPdfs follows SolidJS best practices for derived values.

Note: The sorting logic duplication was flagged in the TodoStudyRow review - consider extracting to a shared utility.

packages/web/src/components/project-ui/ProjectView.jsx (2)

30-34: LGTM!

The import changes align with the new modular barrel export pattern. Named imports from subdirectory barrels (./overview-tab, ./all-studies-tab, etc.) improve code organization and follow the project's coding guidelines for grouping related components. Based on learnings, this follows best practices for using aliases and barrel exports.


255-273: LGTM!

Tab component rendering is correctly updated to use the new named imports. The component usage is consistent with the import declarations.

Comment on lines +101 to +125
<Collapsible
open={pdfSectionOpen()}
onOpenChange={setPdfSectionOpen}
trigger={() => (
<div class='flex items-center gap-2 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors'>
<BiRegularChevronRight
class={`w-4 h-4 text-gray-400 transition-transform duration-200 ${pdfSectionOpen() ? 'rotate-90' : ''}`}
/>
<span class='text-sm font-medium text-gray-700'>PDFs ({pdfCount()})</span>
</div>
)}
>
<div class='px-4 pb-4 space-y-2'>
<For each={sortedPdfs()}>
{pdf => (
<PdfListItem
pdf={pdf}
onView={() => props.onViewPdf?.(pdf)}
onDownload={() => props.onDownloadPdf?.(pdf)}
readOnly={true}
/>
)}
</For>
</div>
</Collapsible>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -type f \( -name "*.jsx" -o -name "*.tsx" \) | head -20 | xargs grep -l "Collapsible" | head -5

Repository: InfinityBowman/corates

Length of output: 48


🏁 Script executed:

ls -la packages/web/src/components/project-ui/ 2>/dev/null || ls -la packages/web/src/components/ 2>/dev/null || find . -name "StudyCard*" -o -name "Collapsible*" 2>/dev/null | head -20

Repository: InfinityBowman/corates

Length of output: 1606


🏁 Script executed:

cat -n packages/web/src/components/project-ui/StudyCard.jsx | sed -n '95,130p'

Repository: InfinityBowman/corates

Length of output: 1571


🏁 Script executed:

find . -name "Collapsible*" -type f 2>/dev/null

Repository: InfinityBowman/corates

Length of output: 103


🏁 Script executed:

cat -n packages/ui/src/zag/Collapsible.jsx

Repository: InfinityBowman/corates

Length of output: 2688


🏁 Script executed:

find . -name "*todo*" -o -name "*study*" | grep -i row | head -10

Repository: InfinityBowman/corates

Length of output: 48


🏁 Script executed:

find . -type f \( -name "*.jsx" -o -name "*.tsx" \) -exec grep -l "TodoStudyRow\|trigger.*api" {} \; | head -10

Repository: InfinityBowman/corates

Length of output: 410


🏁 Script executed:

cat -n packages/web/src/components/project-ui/todo-tab/TodoStudyRow.jsx

Repository: InfinityBowman/corates

Length of output: 9082


Use api.getTriggerProps() to ensure accessibility attributes are included.

The Collapsible component expects trigger={api => JSX} to receive the API object. TodoStudyRow correctly uses api.getTriggerProps() which provides aria-expanded, role="button", aria-controls, and the onClick handler. Update StudyCard to follow the same pattern:

trigger={api => (
  <div
    {...api.getTriggerProps()}
    class='flex items-center gap-2 px-4 py-3 hover:bg-gray-50 transition-colors'
  >
    {/* content */}
  </div>
)}

This ensures proper keyboard navigation and screen reader support.

🤖 Prompt for AI Agents
In packages/web/src/components/project-ui/StudyCard.jsx around lines 101 to 125,
the Collapsible trigger is currently a static JSX function and is missing
accessibility props; change the trigger to the API form (trigger={api => (...)})
and spread api.getTriggerProps() onto the root trigger element (the clickable
div) so it receives role, aria-expanded, aria-controls and the correct
onClick/keyboard handlers; keep the existing class names (including
cursor-pointer/hover styles) and the chevron rotation logic but reference
pdfSectionOpen() as before — just ensure the root div uses
{...api.getTriggerProps()} for proper keyboard and screen reader support.

@InfinityBowman InfinityBowman merged commit d68cdf2 into main Dec 18, 2025
1 of 3 checks passed
@InfinityBowman InfinityBowman deleted the 81-todo-tab-multiple-pdf-support branch December 18, 2025 17:05
@github-actions github-actions Bot restored the 81-todo-tab-multiple-pdf-support branch December 18, 2025 17:05
@InfinityBowman InfinityBowman deleted the 81-todo-tab-multiple-pdf-support branch December 19, 2025 20:29
This was referenced Dec 27, 2025
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.

TODO tab multiple pdf support

2 participants