Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
7.4 KiB
7.4 KiB
Scratchpad — Timesheet Entry Change Feedback
- Plan slug:
timesheet-entry-change-feedback - Created:
2026-03-14
What This Is
Keep a lightweight, continuously-updated log of discoveries and decisions made while implementing this plan.
Prefer short bullets. Append new entries as you learn things, and also update earlier notes when a decision changes or an open question is resolved.
Decisions
- (2026-03-14) Per-entry approval feedback should use a dedicated record/model rather than overloading
time_sheet_commentsortime_entries.notes, because the UI needs latest prominent feedback, expandable history, and handled/unhandled state. - (2026-03-14) The employee-facing editor should show the most recent feedback prominently and expose the full conversation/history in an expandable section.
- (2026-03-14) Entry feedback auto-marks as handled when the employee edits and saves the entry during the
CHANGES_REQUESTEDflow. - (2026-03-14) List/grid indicators are passive status markers only; they should not introduce a second interaction model.
- (2026-03-14) PRD scope approved by user before feature/test breakdown.
- (2026-03-14) The feedback source of truth should live on each loaded
ITimeEntryaschange_requests,latest_change_request, andchange_request_state, so the editor, list view, and grid view can all render from one server-loaded shape instead of parallel client caches. - (2026-03-14) The grid view should treat any unresolved entry feedback in a cell as higher priority than handled feedback when deciding whether to show
Xorcheck, because the cell aggregates multiple entries into one passive marker.
Discoveries / Constraints
- (2026-03-14)
TimeSheetApproval.tsxcurrently supports per-entry approval status updates but only timesheet-level comments; there is no entry-specific feedback field in the approval drawer. - (2026-03-14)
TimeSheet.tsxalready rendersTimeSheetCommentsfor sheet-level discussion when the timesheet isCHANGES_REQUESTED, so entry-level feedback must be modeled separately to avoid mixing concerns. - (2026-03-14)
TimeSheetListView.tsxandTimeSheetTable.tsxcurrently have no concept of entry-level feedback state beyondapproval_status. - (2026-03-14)
TimeEntryDialog.tsxresets saved entries back toDRAFTon edit/save, so handled-state transitions must be coordinated carefully with the approval feedback model. - (2026-03-14) The scheduling package’s default typecheck is currently blocked by a pre-existing unrelated error in
packages/scheduling/src/components/time-management/time-entry/time-sheet/WorkItemDrawer.tsx(ScheduleUpdateData.notesvs optionalnotes); targeted feedback tests pass independently of that issue. - (2026-03-14) The approval drawer already imported direct server actions, so keeping entry-level request-changes logic in the drawer component fit the existing architecture better than threading a second callback shape through
ManagerApprovalDashboard.
Completed Work
-
(2026-03-14) Completed
F001-F005:- Added
server/migrations/20260314120000_create_time_entry_change_requests.cjsfor the dedicated feedback store, with tenant/time-sheet/time-entry indexes and Citus distribution. - Added
ITimeEntryChangeRequest,change_requests,latest_change_request, andchange_request_statetopackages/types/src/interfaces/timeEntry.interfaces.ts. - Added
packages/scheduling/src/actions/timeEntryChangeRequestActions.tsplus shared selectors inpackages/scheduling/src/lib/timeEntryChangeRequests.ts. - Updated
updateTimeEntryApprovalStatusto accept an optionalchangeRequestComment, require approval permission, persist entry-level feedback separately, and preserve multiple review cycles.
- Added
-
(2026-03-14) Completed
F006-F016:- Added
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeEntryChangeRequestFeedback.tsxfor the inline banner/history and reusable status indicator. - Wired the editor (
TimeEntryEditForm.tsx,TimeEntryReadOnly.tsx) to show prominent latest feedback plus expandable history. - Wired
fetchTimeEntriesForTimeSheetto hydrate per-entry feedback for employee views andsaveTimeEntryto auto-handle only the edited entry duringCHANGES_REQUESTED. - Added list/grid passive markers in
TimeSheetListView.tsxandTimeSheetTable.tsx, keeping existing row/cell interactions unchanged.
- Added
-
(2026-03-14) Completed
F017-F020:- Kept timesheet-level comments in their existing
TimeSheetCommentsflow and left entry feedback on a separate data path. - Restricted feedback creation to approval-authorized users and feedback reads to existing timesheet access paths.
- Kept no-feedback employee surfaces quiet by rendering no banner/icon/marker when
change_requestsis empty.
- Kept timesheet-level comments in their existing
-
(2026-03-14) Completed
T001-T034with focused Vitest coverage:packages/scheduling/tests/timeSheetApproval.test.tspackages/scheduling/tests/timeEntryChangeRequests.test.tspackages/scheduling/tests/timeEntryChangeRequestFeedback.test.tspackages/scheduling/tests/timeSheetListView.feedback.test.tspackages/scheduling/tests/timeSheetTable.feedback.test.tspackages/scheduling/tests/timeEntryCrud.changeRequests.test.tspackages/scheduling/tests/timeEntryChangeRequestActions.test.tspackages/scheduling/tests/timeSheetComments.feedback.contract.test.ts
Commands / Runbooks
- (2026-03-14) Inspect approval drawer:
packages/scheduling/src/components/time-management/approvals/TimeSheetApproval.tsx - (2026-03-14) Inspect employee timesheet shell:
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeSheet.tsx - (2026-03-14) Inspect list view:
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeSheetListView.tsx - (2026-03-14) Inspect grid view:
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeSheetTable.tsx - (2026-03-14) Inspect entry editor:
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeEntryDialog.tsx - (2026-03-14) Targeted feedback suite:
npm -w packages/scheduling exec vitest run tests/timeSheetApproval.test.ts tests/timeEntryChangeRequests.test.ts tests/timeEntryChangeRequestFeedback.test.ts tests/timeSheetListView.feedback.test.ts tests/timeSheetTable.feedback.test.ts tests/timeEntryCrud.changeRequests.test.ts tests/timeEntryChangeRequestActions.test.ts tests/timeSheetComments.feedback.contract.test.ts - (2026-03-14) Scheduling package typecheck (fails due unrelated pre-existing issue):
npm -w packages/scheduling run typecheck
Links / References
- Plan folder:
ee/docs/plans/2026-03-14-timesheet-entry-change-feedback/ - Current approval dashboard entry point:
packages/scheduling/src/components/time-management/approvals/ManagerApprovalDashboard.tsx - Types:
packages/types/src/interfaces/timeEntry.interfaces.ts - Scheduling actions:
packages/scheduling/src/actions/timeSheetActions.ts,packages/scheduling/src/actions/timeEntryCrudActions.ts - (2026-03-14) New feedback action helpers:
packages/scheduling/src/actions/timeEntryChangeRequestActions.ts - (2026-03-14) New shared feedback selectors:
packages/scheduling/src/lib/timeEntryChangeRequests.ts - (2026-03-14) New UI feedback component:
packages/scheduling/src/components/time-management/time-entry/time-sheet/TimeEntryChangeRequestFeedback.tsx
Open Questions
- None currently blocking the plan.