Skip to content

Collaboration Routines: Expense review tab and document upload button - #3803

Merged
ryanweiler92 merged 1 commit into
devfrom
collaboration-expense-routine
Oct 26, 2026
Merged

ryanweiler92 merged 1 commit into
devfrom
collaboration-expense-routine

Conversation

@ryanweiler92

@ryanweiler92 ryanweiler92 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the Expense review routine to the Routines page and gives the routine documents dock a visible Upload documents button. Pairs with the Semoss PR that adds the WorkGetExpenseRoutine, WorkSaveExpenseRoutine and WorkRunExpenseRoutine reactors; the tab needs that server build.

What changed

Expense review tab (packages/collaboration/src/features/routines)

  • expense-routine-schema.ts: settings are enabled and timezone only (the routine runs when a request arrives, not on a schedule); the routine record adds id: "expense-review", documentsId (fixed guideline folder id) and subjects (the trigger prefixes), plus the shared status and flow shapes.
  • expense-routine-api.ts: saveExpenseRoutine -> WorkSaveExpenseRoutine(settings=...).
  • expense-routine-form.tsx: autosaving on/off switch with the trigger wording built from subjects, a short "How a review works" list, and a right column of tabs: Latest review (RoutineResult) and Guideline documents (RoutineDocuments rooted at documentsId). Availability and flow sections as the other routines.
  • routines-workspace.tsx: new "Expense review" tab, loaded lazily on first open like the agendas tab.
  • routine-copy.ts: EXPENSE_RESULT_COPY. routine-schema.ts: RoutineId includes "expense-review".
  • routine-card-header.tsx: optional enabledLabel prop so this routine's badge reads "On" instead of "Scheduled".

Upload button in the documents dock

  • routine-documents-dock.tsx: the explorer's own New control is a panel-tab chrome control, and the dock's compact shell (the card column is under 768px) draws tabs without controls, so there was no visible way to upload. The dock now renders an "Upload documents" button in the shell's top toolbar (borderSlots.top.before with mobileTopBorder="toolbar"), shown in both the compact and the maximized layout. It reads the explorer API from the panel store and opens the upload form directly (openNewFile(undefined, "upload")) at the routine's folder. Custom routines get the same button.

Testing

  • vitest: routines suite passes (140 before the dock change; routine-documents.test.tsx now 3 tests, with a stub explorer that publishes an API and a test that the button opens the upload form).
  • biome check clean on the touched files.
  • tsc --noEmit for packages/collaboration: only the 13 pre-existing errors (connector/dashboard fixtures), none in routines.
  • Preview harness: tab renders, the result shows the new section order, the Guideline documents tab shows the folder explorer with the Upload documents button, clicking it opens "Create File or Directory" on the upload form at /collaboration/routines/<id>/, and the maximized layout shows the button in the top rail. Not checked against a running Monolith (actual upload to user assets).

Notes for reviewers

  • No Run now button for this routine: there is nothing pending to run on without a triggering email.
  • Preview fixtures for the new tab live in .preview.local/main.tsx (local harness, not part of this change set if that folder is ignored).
  • The RoutineDocuments copy still says "Files your routine can read on every run", which fits guideline documents too.

@ryanweiler92
ryanweiler92 requested a review from a team as a code owner October 26, 2026 20:57
@snyk-io

snyk-io Bot commented Oct 26, 2026

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ryanweiler92 ryanweiler92 changed the title feat: collaboration: add expense routine and custom preferences for s… Collaboration Routines: Expense review tab and document upload button Oct 26, 2026
@ryanweiler92
ryanweiler92 merged commit 8c71d25 into dev Oct 26, 2026
8 checks passed
@ryanweiler92
ryanweiler92 deleted the collaboration-expense-routine branch October 26, 2026 20:58
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.

1 participant