Repository navigation
Repeat end date: one hook for the allocation and time-off forms - #2097
Merged
Kevinjohn merged 81 commits intoNov 16, 2026
Merged
Conversation
Closes #1973. The docs build, navigation check, lightbox runtime and screenshot publication check now live together in scripts/docs/. Repository-root lookups gain one level, and the docs workflow path filters, pnpm commands, ESLint ignores, VitePress config and lightbox test point at the new paths. Command names and the generated site are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #2035. The allocation and time-off forms each kept a copy of the repeat and repeat-until state, and they disagreed about a repeat switched on before the start date was valid: time off marked the end date as suggested and filled it once a valid start date arrived, while allocations left it empty. Owner decision: both forms follow the time-off behaviour. Switching repeat on always marks the end date as suggested, and it is filled from the form's default once a valid start date exists. useRepeatUntil now holds the repeat choice, the repeat-until date and the suggestion flag, and takes the default-date function as a parameter. The allocation form passes defaultRepeatUntilDate and the time-off form passes defaultTimeOffRepeatUntilDate. A new allocation modal test covers repeat switched on before a valid start; the existing time-off form test covers the same case for time off. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-until-hook Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1974. The port registry, lane claims, launcher, demo and full-stack runners and the port guard now live together in scripts/dev/. Imports from Vite, VitePress, Playwright, the backend test runner, end-to-end support and the remaining scripts follow the new paths, as do the port guard's file list and messages, the docs workflow path filter, package scripts and the user story source links. Repository-root lookups gain one level. Command names and behaviour are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #2026. Backend: - executePlanningIntent takes one ExecutePlanningIntentOptions object instead of six positional parameters. Its body is unchanged, so the write-access refusal, the company check, the writes and the caller's revision and audit steps in mutatePlanning keep their order. - PlanningCapabilities drops canAnonymise, which was computed for every operation and never read, and takes its role type from the shared Role instead of re-listing the four roles. PlanningAuthority extends it, so authority.ts no longer repeats the capability fields. Frontend: - sendPlanningCommand no longer accepts an `original` argument; the planning session never read it, and typedPlanningActions stops passing it. - createTypedPlanningActions takes a getter typed to the two store fields it reads (data and sendPlanningCommand) rather than the whole StoreState. - SchedulerGrid calls useSchedulerGridVirtualization with the four values it needs instead of a wrapper that took three whole hook results, and its modal boundary and footer take the modal state and the visible closures instead of the whole interactions and virtualization results. useMembersOrchestration's return stays as it is: its one consumer, MembersSection, uses nearly every key and already hands each child a Pick of it. SchedulerGridRow's props are all read by the row or the header and lane it renders. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1975. The bundle budget, SPA route checks, Paraglide parity check, static route list and the Adonis public sync now live together in scripts/build/. The sync script and parity check resolve the repository root one level higher; the budget and route checks keep reading dist/ from the working directory. Package scripts, workflow build steps, frontend imports, ESLint allowances and the tests that read or copy these files follow the new paths. Command names and behaviour are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1976. The Playwright run mode, worker runtime and guardian, preset and browser runners, the production rehearsal server and their tests now live together in scripts/e2e/; browser scenarios stay in e2e/. Playwright config, the end-to-end type-check project, frontend and backend tests, ESLint allowances, the port guard's file list and package scripts follow the new paths. The changed-file selector's end-to-end input pattern now matches scripts/e2e/playwright*, and the preset path test copies its files into the same folder layout. Command names and behaviour are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #2027. Each move keeps behaviour; only where code lives changes. - packages/shared dateMath: the time-zone resolver moves to lib/calendarToday.ts and the working-week policy to lib/workingWeek.ts. resolveCalendarToday returns a typed result and reports an invalid zone to its caller with the local-date fallback instead of calling console.warn. The frontend's readCalendarToday keeps the same fallback and the bounded console breadcrumb; the backend example-data service logs the zone instead. - useLifecycleActions: resource anonymisation and its reload gate move to data/resourceAnonymisation.ts; the hook keeps archive and restore and the shared queue. - useAppShellController: account entry, page effects, notices and global shortcuts move to components/app-shell/; the controller composes them in the same order. - useTeamDirectory: the member action lock moves to useTeamActionLock. - e2e_reset_control: the HTTP listener retirement and its timeout helper move to start/e2e_retirable_listener.ts. lib/dateDisplay.ts stays combined: its formatters and the date-style mirror are one job, date presentation, and passing the style through every caller would change the API of about fifteen call sites rather than split the file. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntil-hook Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntracts Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-files Resolves the conflicts with #2027's splits: the document title in app-shell/pageEffects.ts reads the #2025 route table, globalShortcuts.ts imports isShownByPlanningState from planningNotices.ts after #2018, and ClosureForm keeps #2027's calendar reader without the ref #2022 removed. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1977. The changed-file selector, gate runner and command list, pre-push hook, Node 26 check and workflow outcome report now live together in scripts/ci/, and the gate command fixture moves to scripts/ci/fixtures/. The Git hook, package scripts, workflow run steps (including the tooling and static scope selection in gate.yml and static-analysis.yml) and CONTRIBUTING.md follow the new paths, and repository-root lookups gain one level. The selector now matches script files in any scripts/ subfolder and finds the test files that import a script by their relative path, so a change to a moved script still selects its tests. Its fixtures name the moved paths. Command names are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Part of #2031. Step 3.1. The 33 AuthProvider tests move unchanged into six files beside AuthProvider.tsx, each keeping its describe title: - AuthProvider.test.tsx: when tenant data opens, closes and refreshes, and the limited screens that hold it back; - AuthProvider.bootCheck.test.tsx: the /api/auth/me request and the fail-closed error boundary; - AuthProvider.signInWall.test.tsx: 401 outcomes, invite routes and the setup notice; - AuthProvider.masqueradeBootstrap.test.tsx: booting into an active member view; - AuthProvider.sessionRecheck.test.tsx: refreshAuth and the planning 401 re-check; - AuthProvider.companySetup.test.tsx: first company setup. me, freshProvider and deferred move to AuthProvider.testSupport.ts and SessionProbe to src/test/SessionProbe.tsx, since lint allows a .tsx module to export components only. Each file keeps its own masqueradeApi mock and afterEach, because vi.mock is hoisted per file. The ordered tests and hooks of the old file, with describe path and whitespace-free body, match the new files with no differences. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Part of #2031. The single AuthProvider test file imported signOut statically, so the store and auth modules were transformed while the file was collected. After the split only AuthProvider.test.tsx kept that import, and the first test of every other file paid the cold transform inside its 5 s timeout: AuthProvider.signInWall.test.tsx timed out at 5.0 s when run alone, and the leftover render failed its second test. The support module now imports signOut for its side effect, which brings those first tests back to about 1 s. No test changes. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Part of #2031. Step 3.2. The 38 tests move unchanged into six files beside planningCacheController.ts, each keeping its describe title. Every test drives the controller, so none moves beside planningCacheTypes.ts, planningErrors.ts, planningNotices.ts or planningReadiness.ts: - planningCacheController.test.ts: drafts, the gesture revision and the write lock until every operation is refreshed; - planningCacheController.clientContext.test.ts: context proof, late reads and completions after a context change; - planningCacheController.accessChanges.test.ts: 403 refusals, access projection changes and read-only reads; - planningCacheController.uncertainWrites.test.ts: empty receipts, 408, unknown commitment and duplicate-id lookup; - planningCacheController.reconciliation.test.ts: lookup proof meeting canonical reads, reconciliation races and commitment-only completion; - planningCacheController.history.test.ts: the history limit, Undo and Redo, and lookup and activity history boundaries. The harness, fixtures, deferred and uncertainHarness move to planningCacheController.testSupport.ts; each file keeps the afterEach that clears the masquerade context token. The ordered tests and hooks of the old file, with describe path and whitespace-free body, match the new files with no differences. The architecture reference lists the new files. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1978. Release packaging, deployment, the packaged-server and dialog smoke tests, the loopback proxy and the release validation gate now live together in scripts/release/; the container runtime preparation, published image check and Compose smoke test sit under scripts/release/docker/. render-client-nginx was already removed by #1964, so it is not moved. Package scripts, the gate, docker, validation and release provenance workflow paths and run steps, the Dockerfile's runtime preparation step and the tests that read these files follow the new paths. Repository-root lookups gain one or two levels. Release provenance rebuilds archives from the release tag's own tree, so its guard now accepts the packaged-server smoke test at either the new or the old path; tags cut before this move still rebuild. Command names and publication triggers are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Part of #2031. Step 3.3. The 33 tests move unchanged into five files beside masqueradeController.ts, each keeping its describe title. They drive MasqueradeController through injected dependencies, so none moves beside masqueradeControllerInstance.ts: - masqueradeController.test.ts: starting a member view, its flush and suspension, and transitions while a start is pending; - masqueradeController.end.test.ts: ending, failed and ambiguous End responses and DELETE outcomes from another tab; - masqueradeController.coldBootstrap.test.ts: adopting a validated member view before planning data is loaded; - masqueradeController.serverStatus.test.ts: adopting server status and shared-session reconciliation; - masqueradeController.generationFencing.test.ts: stale starts, retries and restorations that must not publish. The fixture state, inactiveStatus, deferred and harness move to masqueradeController.testSupport.ts; each file keeps the beforeEach that resets the store. The ordered tests and hooks of the old file, with describe path and whitespace-free body, match the new files with no differences. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #2031. Step 3.4. #2021 split the account client into request modules, so the 23 tests move unchanged next to the code they drive, keeping their describe titles: - accountCommands.test.ts: command secrets, the in-memory fallback and stored-command cleanup across identities; - commandRequest.test.ts: command headers and JSON encoding, and reuse of a command across unknown, 408 and conflict outcomes; - commandOutcome.test.ts: payload binding and the unknown-outcome classification; - sessionRequests.test.ts: status and company-list reads and the audit warning; - memberRequests.test.ts: member-resource commands, the route table and the ownership route; - admissionRequests.test.ts: the admission list query. The route-table test also calls the invitation, masquerade and signup request modules; it sits with memberRequests, the first it calls. command, transferOwner and expectCommand move to accountCommands.testSupport.ts. Each file keeps its own requestTimeout mock, because vi.mock is hoisted per file. The ordered tests and hooks of the old file, with describe path and whitespace-free body, match the new files with no differences. With steps 1 to 3 no single-use registerX wrapper remains, and each of the seven large test files is split by behaviour beside its module. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1979. The DCO, Dependabot, Gitleaks and UI primitive checks, the shadcn registry wrapper, the major dependency report and the Sonner CSP test now live together in scripts/maintenance/, with the DCO ratifications beside their check and the Sonner import probe in fixtures/. Package scripts, the gate workflow's sign-off step, the Gitleaks configuration comment and the selector test fixtures follow the new paths; repository-root lookups and the UI check's parse of the registry working directory gain one level. Command names and behaviour are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1980. The pnpm spawn helper, its declarations and its test now live in scripts/shared/. Every importer follows the new path: the preset and browser runners, the selector, gate runner and pre-push hook, the Paraglide parity check, the maintenance and end-to-end scripts, the frontend test and the end-to-end global setup. The preset path test copies the helper into the same folder layout. Command names and behaviour are unchanged. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntil-hook Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntracts Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-files Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…t-1-auth-provider-tests Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…e/2031-step-3-part-2-planning-cache-tests Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ue/2031-step-3-part-3-masquerade-controller-tests Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…nto issue/2031-step-3-part-4-account-request-tests Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…sue/1973-scripts-docs Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntenance Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-shared Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ing-docs Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
The open-source page still told contributors to rebuild the committed site before opening a pull request. docs/ is no longer committed, so the page now asks for a passing docs:build and sources only, and a documentation policy test keeps contributor guidance from asking for a committed site again. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
The default frontend suite excludes the lightbox test because it reads the built site. check:changed still passed a changed copy of it to vitest as a frontend test file: --static then failed with no test files found, and the full check ran vitest related, which matched nothing and passed without running it. A change to that test now selects the docs build and docs:test steps instead. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Part of #1975. The .dockerignore rule **/build also matched the new scripts/build/ folder, so the image's pnpm run build would not find the build tooling it runs. Re-include that folder; other build output stays excluded. Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntenance Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-shared Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ing-docs Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Stop committing the generated documentation site
Move the shared pnpm process helper into scripts/shared/
Move repository maintenance checks into scripts/maintenance/
Move release packaging and smoke tests into scripts/release/
Move CI selection, gates and reporting into scripts/ci/
Move browser-test infrastructure into scripts/e2e/
Move application build tooling into scripts/build/
Move local development and port management into scripts/dev/
Move documentation tooling into scripts/docs/
…unt-request-tests Tests: split the account request tests by module
…uerade-controller-tests Tests: split the masquerade controller tests by concern
…ning-cache-tests Tests: split the planning cache controller tests by concern
…-provider-tests Tests: split the AuthProvider tests by concern
Split smaller files that hold a second unrelated job
Narrow contracts that are wider than their consumers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The allocation and time-off forms each kept their own repeat-until state, and disagreed about when the end date counts as a suggestion.
apps/frontend/src/hooks/useRepeatUntil.tsholds the repeat choice, the end date and whether it is a suggestion, and takes the default-date function as a parameter.useAllocationScheduleState.tspassesdefaultRepeatUntilDateanduseTimeOffRepeat.tspassesdefaultTimeOffRepeatUntilDate; the allocation form'suseRepeatScheduleis removed.AllocationModal.repeat.test.tsx:117) fails against the old allocation behaviour (expected2028-03-31, received empty); the time-off case was already covered byTimeOffForm.repeat.test.tsx:135. Moving the old allocation rule into the shared hook turns both red.Decisions made without the owner
Closes #2035
Gate evidence
pnpm run check:changed <predecessor branch>: passed.check:push(format, type-check, lint): passed.issue/2027-single-job-files, which contains this branch:gate:allpassed (backend 572 tests; frontend 3823 tests) ande2epassed (309 tests). The later scripts-move tip59ee4999b, which also contains the follow-up merges, passedgate:allande2e(309).Merge order
#2063 → #2064 → #2065 → #2066 → #2067 → #2068 → #2069 → #2070 → #2071 → #2072 → #2073 → #2074 → #2075 → #2076 → #2077 → #2078 → #2079 → #2080 → #2081 → #2082 → #2083 → #2084 → #2085 → #2086 → #2087 → #2088 → #2089 → #2090 → #2091 → #2092 → #2093 → #2094 → #2095 → #2096 → #2097
Merge predecessor for this PR: #2096.
One linear stack; each PR targets the previous PR's branch, so no pair of open PRs conflicts.