Skip to content

Extended beta feedback: personnel column renames, search filters#247

Merged
rmartinsen-ucd merged 3 commits into
mainfrom
rpm/extended-beta-feedback-2
Apr 27, 2026
Merged

Extended beta feedback: personnel column renames, search filters#247
rmartinsen-ucd merged 3 commits into
mainfrom
rpm/extended-beta-feedback-2

Conversation

@rmartinsen-ucd
Copy link
Copy Markdown
Collaborator

@rmartinsen-ucd rmartinsen-ucd commented Apr 27, 2026

Summary

Three items from issue #224 (extended beta feedback). Hourly rate work is deferred to a separate issue.

  • Personnel distribution subtable column renames (fcd4fb94) — Salary → Monthly Salary, CBR → Monthly CBR (with monthlyCbr tooltip), Funding Effective → Funding Eff. Date, Funding End → Funding End Date.
  • Hide "All Reports" search entry for users with no reports (391bc020) — server gates the catalog entry on the same condition that decides whether /reports has visible items (currently CanViewAccruals). Tests added mirroring existing accruals coverage.
  • Project number search in project tables (6d49fff9) — InternalProjectsTable and SponsoredProjectsTable now match the global filter against project number as well as name. The cell already rendered both, but TanStack only filters accessor values; the displayName accessor now concatenates name + number. Sidebar and command palette already searched by project number.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Search functionality now includes project numbers for filtering results.
    • Report visibility now controlled by user authorization levels.
  • Improvements

    • Updated table column headers with clearer terminology ("Date" for funding periods, "Monthly" for salary and cost metrics).
    • Project tables now display project numbers alongside project names.

rmartinsen-ucd and others added 3 commits April 24, 2026 10:53
Rename subtable headers for consistency with the outer table and clarity:
Salary → Monthly Salary, CBR → Monthly CBR, Funding Effective →
Funding Eff. Date, Funding End → Funding End Date.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reason: clicking "All Reports" landed users without AccrualViewer on the
empty-state /reports page. Gate the catalog entry on the same condition
that decides whether /reports has any visible items.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reason: project number was rendered inside the displayName cell but not
exposed to TanStack's global filter, which only walks accessor values.
Concatenate name and number in the displayName accessor so the column
search matches on either field while sort still primarily orders by name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

📝 Walkthrough

Walkthrough

Project table columns are updated to use accessor functions concatenating displayName and projectNumber for proper search filtering. PersonnelTable column headers now include "Date" and "Monthly" wording, with CBR tooltips referencing monthlyDefinitions. The "All Reports" catalog entry is gated behind CanViewAccruals authorization on the server. Tests validate these behaviors.

Changes

Cohort / File(s) Summary
Project Table Accessors
web/client/src/components/project/InternalProjectsTable.tsx, web/client/src/components/project/SponsoredProjectsTable.tsx
Project column accessors changed to concatenate displayName and projectNumber for global filtering alignment, with cell renderers reading values from info.row.original.
Personnel Table Headers & Tooltips
web/client/src/components/project/PersonnelTable.tsx
DistributionSubtable column headers updated to include "Date" and "Monthly" wording; CBR tooltip switched to tooltipDefinitions.monthlyCbr with "Monthly CBR" label.
Project Table Tests
web/client/src/test/components/project/ProjectsTable.test.tsx, web/client/src/test/components/project/SponsoredProjectsTable.test.tsx
New unit tests added to verify search filtering by projectNumber in both internal and sponsored project tables.
Personnel Table Tests
web/client/src/test/components/PersonnelTable.test.tsx
CBR header tooltip test updated to handle multiple "Monthly CBR" instances and assert against tooltipDefinitions.monthlyCbr.
Report Authorization
web/server/Controllers/SearchController.cs, web/tests/server.tests/Controllers/SearchControllerTests.cs
"All Reports" catalog entry gated behind CanViewAccruals authorization; new tests verify visibility rules for users with and without AccrualViewer role.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • srkirkland

Poem

🐰 Tables now filter by number and name combined,
Personnel headers get clarity refined,
Authorization gates who sees reports today,
Tests verify each filtering way,
The data hops forward in a better display!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: personnel column renames and search filter improvements. It directly reflects the two primary themes visible across the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rpm/extended-beta-feedback-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@rmartinsen-ucd
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@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.

🧹 Nitpick comments (1)
web/client/src/components/project/InternalProjectsTable.tsx (1)

124-127: Clarify the inline rationale.

This comment is copied from the sponsored table, but InternalProjectsTable only renders the project number in the cell; the display name is used in the title and accessor. Updating the wording will keep the explanation accurate.

Suggested wording
-      // Accessor concatenates name + number so the global filter matches on
-      // either — the cell visibly renders both, but TanStack only filters
-      // accessor values, not rendered output.
+      // Accessor concatenates name + number so the global filter matches on
+      // either — the cell shows the project number, and TanStack only filters
+      // accessor values, not rendered output.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/client/src/components/project/InternalProjectsTable.tsx` around lines 124
- 127, Update the inline comment above the columnHelper.accessor in
InternalProjectsTable to accurately reflect that the cell only visibly renders
the project number while the display name is included in the accessor and as the
cell title; replace the copied wording about rendering both name + number with a
concise explanation that the accessor concatenates displayName and projectNumber
so the global filter matches either value, but the visible cell content is just
the projectNumber (displayName is used in the title/tooltip).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@web/client/src/components/project/InternalProjectsTable.tsx`:
- Around line 124-127: Update the inline comment above the columnHelper.accessor
in InternalProjectsTable to accurately reflect that the cell only visibly
renders the project number while the display name is included in the accessor
and as the cell title; replace the copied wording about rendering both name +
number with a concise explanation that the accessor concatenates displayName and
projectNumber so the global filter matches either value, but the visible cell
content is just the projectNumber (displayName is used in the title/tooltip).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0ce5844-4b5c-4390-b83d-d16ca2057eb3

📥 Commits

Reviewing files that changed from the base of the PR and between 5f8ecd7 and 6d49fff.

📒 Files selected for processing (8)
  • web/client/src/components/project/InternalProjectsTable.tsx
  • web/client/src/components/project/PersonnelTable.tsx
  • web/client/src/components/project/SponsoredProjectsTable.tsx
  • web/client/src/test/components/PersonnelTable.test.tsx
  • web/client/src/test/components/project/ProjectsTable.test.tsx
  • web/client/src/test/components/project/SponsoredProjectsTable.test.tsx
  • web/server/Controllers/SearchController.cs
  • web/tests/server.tests/Controllers/SearchControllerTests.cs

@rmartinsen-ucd rmartinsen-ucd merged commit 8b9e7c7 into main Apr 27, 2026
5 checks passed
@rmartinsen-ucd rmartinsen-ucd deleted the rpm/extended-beta-feedback-2 branch April 27, 2026 19:20
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.

2 participants