Skip to content

feat(workload-card): recently-added projects quick-add + flexible card width#210

Merged
parth0025 merged 1 commit into
stagingfrom
feat/workload-card-recent-projects
Jun 8, 2026
Merged

feat(workload-card): recently-added projects quick-add + flexible card width#210
parth0025 merged 1 commit into
stagingfrom
feat/workload-card-recent-projects

Conversation

@parth0025

Copy link
Copy Markdown
Collaborator

Summary

Two enhancements to the Employee Workload ("Live Work") dashboard card:

  1. Recently Added Projects quick-add β€” In the card's Edit Card settings, a new panel sits directly under the Project dropdown. It lists active projects created in the last ~2 days that are not already on the card, each with the same green left-border "new" marker used in the project sidebar plus a checkbox. Ticking one adds it to the card's project selection (and it drops out of the list). Once saved, it won't be suggested again on reopen.
  2. Flexible card width β€” The card could not be resized narrower than half the page (minW: 6). Lowered to minW: 3, matching every other card, so it can be shrunk.

Details

  • New presentational component RecentlyAddedProjects.vue. The "new" rule mirrors organisms/Item exactly (createdAt after midnight two days ago) and is tolerant of the createdAt shapes used in this codebase (ISO string / ms / { seconds }).
  • Wiring in CardFieldComponent.vue reuses the existing selectedProjects ref and the existing Save path β€” no change to load/save logic, the Project dropdown, or any other card.
  • minW lives in getCardsComponentsSize(), which HomePage.vue re-applies over each card's saved position on load β€” so the existing card picks up the new minimum with no data migration.
  • i18n keys added to en.js (fallbackLocale: en covers the other locales).

Scope / safety

  • Frontend only β€” no backend, schema, or API changes.
  • The new panel is gated to EmployeeWorkloadReportCard; other cards are untouched.
  • vue-cli-service lint passes on all changed files.

How to test

  • Live Work card β†’ gear icon β†’ "Recently Added Projects" appears under Project. Tick one β†’ added to selection; Save β†’ reopen β†’ it's no longer suggested.
  • Drag the card's width in past the old half-page limit.

πŸ€– Generated with Claude Code

Edit Card modal: add a 'Recently Added Projects' panel under the Project dropdown (EmployeeWorkloadReportCard only). It lists active projects created within the app's ~2-day 'new' window β€” mirroring the project sidebar's green left-border rule (organisms/Item) β€” that are not already on the card, each with a checkbox. Ticking one toggles it into the existing selectedProjects array, so Save persists it through the current path. New component RecentlyAddedProjects.vue; no backend/schema changes.

Card resize: lower EmployeeWorkloadReportCard grid minW 6 -> 3 so it can shrink below half-page width, matching the other cards. getCardsComponentsSize() is re-applied over saved positions on dashboard load, so the existing card picks this up with no migration.

i18n: add recently_added_projects / _hint / new_badge keys to en.js (fallbackLocale: en covers other locales).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bedac27-14df-485f-8aa7-6f027ab71cc1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/workload-card-recent-projects

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

@parth0025 parth0025 self-assigned this Jun 8, 2026
@parth0025 parth0025 added the enhancement New feature or request label Jun 8, 2026
@parth0025 parth0025 merged commit e2516a2 into staging Jun 8, 2026
3 checks passed
parth0025 added a commit to joshishiv4/AlianHub that referenced this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant