Skip to content

161 labeling and wording improvements#162

Merged
InfinityBowman merged 2 commits into
mainfrom
161-labeling-and-wording-improvements
Dec 26, 2025
Merged

161 labeling and wording improvements#162
InfinityBowman merged 2 commits into
mainfrom
161-labeling-and-wording-improvements

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 26, 2025

Note

Shifts the Overview toward team-focused progress and adds lightweight results structure while displaying more counts in navigation.

  • Adds getAllStudiesCount and getCompletedCount to show badge counts for all-studies and completed tabs in ProjectView.jsx
  • Refines OverviewTab.jsx:
    • Renames "Project Progress" to "Team Progress"; removes the "In Progress" stat and reduces the stats grid to 3 columns
    • Computes user progress by assigned reviewers (reviewer1/reviewer2) and checklist completion/awaiting-reconcile; updates progress label wording
    • Introduces a "Results" section with collapsible "Figures" (existing charts) and a new collapsible "Tables" placeholder
    • Minor wording tweaks (e.g., "appraisals" → "studies appraised")

Written by Cursor Bugbot for commit 872ed98. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added numeric badges displaying total and completed study counts on tabs.
    • Introduced per-reviewer progress tracking for team oversight.
  • UI Improvements

    • Reorganized overview with "Team Progress" section.
    • Added collapsible "Tables" section to results panel.
    • Updated section naming and progress terminology for clarity.

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

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

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 successful!
View logs
corates 872ed98 Commit Preview URL Dec 26 2025, 03:59 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 26, 2025

📝 Walkthrough

Walkthrough

Two components updated: ProjectView adds count badge helpers for "All Studies" and "Completed" tabs. OverviewTab refactors progress tracking from per-study to per-user (reviewer-based), updates section labels and layout, removes "In Progress" metric, and adds new "Tables" collapsible section.

Changes

Cohort / File(s) Summary
Tab Counting Enhancements
packages/web/src/components/project-ui/ProjectView.jsx
Added getAllStudiesCount and getCompletedCount helper functions; wired into tab definitions via getCount property for numeric badges on "All Studies" and "Completed" tabs.
Progress Calculation & UI Refactoring
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
Migrated progress tracking from per-study to per-user (reviewer) basis; removed "In Progress" stat card and icon import; updated section headers ("Project Progress" → "Team Progress"); revised progress label text ("appraisals completed" → "studies appraised"); reorganized sections (renamed "Quality Assessment" to "Results" with "Figures" subsection); added new collapsible "Tables" section with placeholder; introduced tablesExpanded state signal.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #155: Modifies OverviewTab and team progress/count metrics; overlaps with same component and reviewer-based progress tracking changes.
  • PR #138: Updates ProjectView tab counting logic and integrates checklist-domain utilities for study count helpers.
  • PR #86: Modifies ProjectView tab and count logic; related to tab wiring and study count implementations.

Poem

🐰 Tab badges now shine with their gleaming counts,
Per-reviewer progress—no longer per-study amounts!
Team Progress takes stage, Tables join the fold,
A cleaner display as the metrics unfold.
Organization hops forward—hop, hop, hooray!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The PR title 'labeling and wording improvements' is overly vague and doesn't specify the concrete changes made. While the changes do include wording updates (e.g., 'Project Progress' to 'Team Progress', 'appraisals' to 'appraised'), the title fails to highlight the main substantive changes: per-user progress tracking, tab count badges, and UI restructuring. Revise the title to be more specific about the key changes, such as 'Implement per-user progress tracking and add study count badges to tabs' or 'Restructure overview tab with team progress metrics and collapsible sections'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 161-labeling-and-wording-improvements

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

@InfinityBowman InfinityBowman merged commit d1284b8 into main Dec 26, 2025
3 of 4 checks passed
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 (1)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (1)

41-49: Consider using createMemo for derived values.

readyToReconcile and completedStudies are derived from reactive state (studies()) and are used in JSX. Per coding guidelines, use createMemo for derived values to ensure they update reactively and avoid redundant recalculations.

Proposed fix
-  const readyToReconcile = () =>
-    studies().filter(s => {
+  const readyToReconcile = createMemo(() =>
+    studies().filter(s => {
       const checklists = s.checklists || [];
       const completedChecklists = checklists.filter(c => c.status === CHECKLIST_STATUS.COMPLETED);
       return completedChecklists.length === 2;
-    }).length;
+    }).length
+  );

-  const completedStudies = () =>
-    studies().filter(s => shouldShowInTab(s, 'completed', null)).length;
+  const completedStudies = createMemo(() =>
+    studies().filter(s => shouldShowInTab(s, 'completed', null)).length
+  );
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 602c728 and 872ed98.

📒 Files selected for processing (2)
  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
🧰 Additional context used
📓 Path-based instructions (14)
**/*

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

Do not use emojis in code, comments, documentation, or commit messages

NEVER use emojis anywhere in code, comments, documentation, plan files, or commit messages. This includes unicode symbols. For UI icons, use solid-icons library or SVGs only.

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/src/**/*.{js,jsx,ts,tsx}

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

packages/web/src/**/*.{js,jsx,ts,tsx}: For UI icons, use the solid-icons library or SVGs only. Do not use emojis
Ensure browser compatibility for all frontend code (Safari is usually problematic)
Keep files small, focused, and modular. If a file exceeds a high number of lines, consider refactoring by extracting sub-modules into a folder with index.jsx and helper components, moving complex logic into separate utility files or primitives, or splitting large forms into section components
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
Use createMemo for derived values to ensure they update reactively

Use import aliases from jsconfig.json instead of relative paths

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
**/*.{js,jsx,ts,tsx}

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

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

**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features in JavaScript/TypeScript code
Comments should explain why something is being done, not narrate what the code does. Avoid comments that repeat variable names or describe obvious code behavior.

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/src/components/**/*.{js,jsx,ts,tsx}

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

packages/web/src/components/**/*.{js,jsx,ts,tsx}: Use responsive design principles for UI components
Group related components in subdirectories with an index.js barrel export
Use Zag.js for UI components and design system
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 and when debugging
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
Components should be lean and focused. They should 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/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/{web,ui}/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

Group related components in subdirectories with barrel exports

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/{web,landing}/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

packages/{web,landing}/src/**/*.{jsx,tsx}: Use Ark UI components from @corates/ui package, not local component implementations
Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

packages/web/src/**/*.{jsx,tsx}: In SolidJS, do NOT prop-drill application state. Import stores directly where needed instead.
In SolidJS, do NOT destructure props. Access props.field directly or wrap in a function: () => props.field
In SolidJS components, components should receive at most 1-5 props (local config only, not shared state)

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.cursor/rules/corates.mdc)

In SolidJS, use createMemo for derived values

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/src/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

packages/web/src/**/*.{js,ts,jsx,tsx}: Always use handleFetchError from @/lib/error-utils.js for fetch calls in frontend code with options like { showToast: true } for error handling
Use createFormErrorSignals from @/lib/form-errors.js for form validation error handling with field-level and global error management

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)

packages/{web,workers}/src/**/*.{js,ts,jsx,tsx}: Never throw string literals; always throw Error objects or return domain errors from API routes
Use error utility functions like isErrorCode from @corates/shared or @/lib/error-utils.js to check specific error types instead of manual string comparisons

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.cursor/rules/solidjs.mdc)

{packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts}: Never destructure props in SolidJS components - destructuring breaks reactivity. Access props directly (e.g., props.name) or wrap in a function (e.g., const name = () => props.name) to maintain reactivity.
Import stores directly in components rather than prop-drilling store data through component hierarchies.
Use separate read and write patterns for stores: import the store directly for reading data (e.g., projectStore.getProjectList()) and import action stores separately for writing (e.g., projectActionsStore.createProject()).
Use createSignal from solid-js for managing simple reactive values. Prefer derived state with signals or memo over effects when possible.
Use createStore from solid-js/store for managing complex objects and arrays that require granular reactivity, enabling fine-grained updates where only affected parts re-render.
Use createMemo from solid-js for derived values that depend on reactive state, ensuring computed values update only when their dependencies change.
Always clean up effects that create subscriptions or timers using the onCleanup function from solid-js. Use effects sparingly, only when derived values won't work well.
Keep components lean and focused on rendering. Move business logic to stores (for shared state and operations), primitives (for reusable hooks/logic), or utilities (for pure functions).
Use the Show component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.
Use the For component from solid-js for rendering lists. It provides better performance and keying compared to JavaScript's map function in JSX.
When manipulating children in wrapper components, use the children helper from solid-js to ensure proper reactivity and handling of child elements.

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/{web,ui}/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

packages/{web,ui}/**/*.{js,jsx,ts,tsx}: Import UI components from '@corates/ui' package instead of local component files. Do not import Ark UI components from local paths like '@/components/zag/' or 'packages/web/src/components/zag/'
Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/web/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

Use import aliases from 'packages/web/jsconfig.json' instead of relative paths. Aliases include: '@/' (src/), '@components/' (src/components/), '@auth-ui/' (src/components/auth-ui/), '@checklist-ui/' (src/components/checklist-ui/), '@project-ui/' (src/components/project-ui/), '@routes/' (src/routes/), '@primitives/' (src/primitives/), '@api/' (src/api/), '@config/' (src/config/), and '@lib/' (src/lib/)

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
packages/{web,ui}/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

Use Tailwind CSS classes for styling components

Files:

  • packages/web/src/components/project-ui/ProjectView.jsx
  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
🧠 Learnings (5)
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use solid-icons library (e.g., solid-icons/bi, solid-icons/fi) for icon imports

Applied to files:

  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
📚 Learning: 2025-12-24T17:23:17.309Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/ui-components.mdc:0-0
Timestamp: 2025-12-24T17:23:17.309Z
Learning: Applies to packages/{web,ui}/**/*.{js,jsx,ts,tsx} : Always use 'solid-icons' library for icons. Never use emoji characters or text as icon replacements. Import from specific icon sets like 'solid-icons/bi', 'solid-icons/fi', 'solid-icons/ai', etc.

Applied to files:

  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
📚 Learning: 2025-12-24T17:23:10.082Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/solidjs.mdc:0-0
Timestamp: 2025-12-24T17:23:10.082Z
Learning: Applies to {packages/web/**,packages/landing/**}/**/*.{jsx,tsx,js,ts} : Use the `Show` component from solid-js for conditional rendering instead of JavaScript ternary operators or logical AND operators.

Applied to files:

  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
📚 Learning: 2025-12-24T17:22:48.927Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursor/rules/corates.mdc:0-0
Timestamp: 2025-12-24T17:22:48.927Z
Learning: Applies to packages/{web,landing}/src/**/*.{jsx,tsx} : Use Ark UI components from corates/ui package, not local component implementations

Applied to files:

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

Applied to files:

  • packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx
🧬 Code graph analysis (2)
packages/web/src/components/project-ui/ProjectView.jsx (4)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (1)
  • studies (35-35)
packages/web/src/components/project-ui/all-studies-tab/AssignReviewersModal.jsx (1)
  • studies (29-29)
packages/web/src/components/project-ui/all-studies-tab/AllStudiesTab.jsx (1)
  • studies (62-62)
packages/web/src/lib/checklist-domain.js (1)
  • getChecklistCount (154-157)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (3)
packages/web/src/primitives/useProject/sync.js (1)
  • study (59-88)
packages/web/src/lib/checklist-domain.js (7)
  • checklists (30-30)
  • checklists (46-46)
  • checklists (57-57)
  • checklists (77-77)
  • checklists (94-94)
  • checklists (107-107)
  • checklists (228-228)
packages/web/src/constants/checklist-status.js (2)
  • CHECKLIST_STATUS (8-13)
  • CHECKLIST_STATUS (8-13)
⏰ 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). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Workers Builds: corates
🔇 Additional comments (6)
packages/web/src/components/project-ui/overview-tab/OverviewTab.jsx (4)

59-104: LGTM - Progress calculation refactored to per-user tracking.

The logic correctly tracks each reviewer's progress by counting assigned studies and checking for completed checklists. The use of createMemo ensures efficient updates.


162-207: LGTM - Stats section streamlined.

The stats grid is appropriately reduced from 4 to 3 columns with the "In Progress" metric removed, and the header renamed to "Team Progress" reflects the new per-user focus.


284-299: LGTM - Label terminology updated.

The progress label now correctly reads "studies appraised" which aligns with the per-user tracking model.


318-364: LGTM - Results section restructured with new Tables panel.

The new "Results" section cleanly organizes Figures and Tables into separate collapsible panels with consistent styling. The placeholder message is appropriate for the initial implementation.

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

207-209: LGTM!

The implementation correctly delegates to getChecklistCount, which handles null/undefined validation internally. The pattern is consistent with getReconcileCount.


218-218: LGTM!

The integration of count badges into the tab definitions is consistent with the existing pattern used for "To Do" and "Reconcile" tabs. Once the null check is added to getAllStudiesCount, this will work correctly.

Also applies to: 236-236

Comment on lines +203 to +205
const getAllStudiesCount = () => {
return studies().length;
};
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 | 🔴 Critical

Add null/undefined check to prevent runtime error.

The function directly accesses .length on studies() without validation. If projectStore.getStudies() returns null or undefined (e.g., before the project loads), this will throw a runtime error. The defensive pattern from AssignReviewersModal (|| []) and the validation in getChecklistCount suggest this protection is needed.

Proposed fix with null check
 const getAllStudiesCount = () => {
-  return studies().length;
+  const studiesList = studies();
+  return studiesList?.length ?? 0;
 };
🤖 Prompt for AI Agents
In packages/web/src/components/project-ui/ProjectView.jsx around lines 203 to
205, getAllStudiesCount calls studies().length without guarding against
studies() being null/undefined; change the function to treat studies() as an
array by using a fallback (e.g., const s = studies() || []; return s.length;) so
it returns 0 instead of throwing when studies() is null/undefined.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 26

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

c.status === CHECKLIST_STATUS.AWAITING_RECONCILE,
);

if (hasCompleted) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Progress double-counts when same user is both reviewers

The new userProgressMap logic builds assignedUserIds by pushing both study.reviewer1 and study.reviewer2 into an array without deduplication. If these values are identical (same user assigned as both reviewers), that user's progress.total and potentially progress.completed will be incremented twice for the same study, resulting in incorrect progress percentages displayed in the UI. While the UI attempts to prevent assigning the same reviewer twice, the code lacks defensive handling for this edge case in legacy data or API bypass scenarios.

Fix in Cursor Fix in Web

@InfinityBowman InfinityBowman deleted the 161-labeling-and-wording-improvements branch December 29, 2025 18:25
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.

Labeling and wording improvements

1 participant