You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(planner): web planner "Planlægning (beta)" screens and Playwright shard t (#5489) - #1792
Kanban card #5489, "Timeplaner på web". Managers plan their staff on the web instead of in the Google Sheet. The backend (planner API, time_planning_planner permission, menu entry) is already on stable (#1790). This PR adds the Angular screens (task 1766) and their Playwright shard t (task 1769).
What
A new lazy-loaded route, /plugins/time-planning-pn/planner, guarded by time_planning_planner. Existing files only gain the route, the claim constant and i18n keys; no existing component, dialog or service changes.
Grid: workers × 7/14 days with a department filter. Cells show plan, absence (amber fill), a manual-change dot and a lock icon. Each worker gets ISO-week hours against the norm. Each day gets a headcount, with an amber hatch where vacation requests are pending.
Bulk edit: select cells by click, shift-click or drag, then enter a short form (7-15/0,5, Fri, Ryd, an absence type). Choose between "kun disse dage" and "alle [ugedag] fra [dato]". Locked days are reported.
Pattern editor: a 1–8 week rotation, with anchor Monday, valid-from date, copy from a colleague, and a prefill from the template. On save you choose whether to keep or overwrite manually changed days.
Absence over a period: locked dates are listed if the request is refused.
Vacation-requests panel: the existing inbox and approve/reject dialogs, plus "Vis i planen" and a headcount-0 warning.
One-off Google Sheet import wizard (preview → review → apply), and the "Brug Google Sheet igen" toggle.
Shard t covers:
the menu entry following the permission (a real group toggle)
multi-cell edit
a 6-week rotation
copy from a colleague
absence over a period
the import wizard
t is added to the matrix in both workflows. Its post-migration.sql only applies to shard t. The patch step now also waits for the AssignedSiteManagingTags table before applying a patch; b1m–l1m only gain that extra wait. Shards a–s are otherwise untouched; they are the proof that existing views did not move.
Verified
ng build and the plugin unit specs pass (609 + new planner specs), and so does the button-convention check, all in a throwaway host.
Shard t passes 8/8, three times on reset databases, on a local stack built like CI.
Screens were screenshotted in light and dark mode and compared with the design canvas. Table rows are uniform (checked with getComputedStyle).
Known and set aside (follow-up cards)
Canvas extras not built yet:
absence per-day preview
grid help panel, avatars, "n / N" headcount, a global "Ugemønstre" button
requests card details
import confidence column
hours preview while typing, the "37 t" preset, Helligdage and "Gælder også for" rows, month view
After switching "Brug Google Sheet igen" back on, the import wizard is empty until the next service start. This is by design in SheetWorkersInScopeAsync, but it is confusing.
A new lazy-loaded planner route at /plugins/time-planning-pn/planner,
guarded by time_planning_planner, over the merged planner API:
- grid: workers x 7/14 days, department filter, plan/absence/manual/lock
marks, ISO-week hours against the norm, headcount per day with pending
vacation hatched
- multi-cell select (click, shift-click, drag) and a short-form editor:
"kun disse dage" or "alle <ugedag> fra <dato>"; locked days reported
- pattern editor: 1-8 week rotation, anchor Monday, valid-from, copy from a
colleague, prefill from the template, keep-or-overwrite manual days
- absence over a period, vacation-requests panel (existing inbox and
approve/reject dialogs), one-off Google Sheet import wizard and the
"Brug Google Sheet igen" toggle
Existing files only gain the route, the claim constant and i18n keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shard t (task 1769) covers the planner beta end to end: the menu entry
follows the time_planning_planner permission, multi-cell grid edits, a
6-week rotation pattern, copy from a colleague, absence over a period and
the Google Sheet import wizard. A shard-only post-migration patch makes
admin a manager of the test workers. The patch step now also waits for the
AssignedSiteManagingTags table it writes to.
Fixes found running it on a real host:
- the grid crashed and showed no workers: the host's DateInterceptor hands
Date objects where the planner expected strings
- the requests drawer clipped the panel's left 120px
- text typed right after changing the rotation length was saved as empty
- import ticked workers with no plan as "same week every week"; they now
show "Ingen plan (timelønnet)", unticked
- the step label ran into the import title
- pending vacation now has an amber hatch, distinct from locked days, and
absence days the canvas's amber fill; selection keeps the hatch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Client validation accepts a server-rejected shift format, while Cancel remains enabled during absence and pattern saves, allowing completed writes to leave the displayed plan stale.
Adds the Angular “Planlægning (beta)” interface on top of the planner API introduced in #1790, letting managers plan staff on the web rather than in Google Sheets.
Changes:
Adds permission-guarded planner routing, shared utilities, and screens for patterns, absence, vacation requests, and imports.
Adds planner interface strings, shared styling, and editor guard tests.
Adds Playwright shard t with manager fixtures and includes it in both CI workflows.
…t form
Copilot review on #1792:
- Cancel/Back in the absence, pattern and import dialogs are disabled while
a request is in flight, so a completed write can't look like a cancel and
skip the grid reload
- the client short-form check now applies PlanTextParser's value rules
(minutes 00-59, single decimal only 0/3/5, nothing past 24:00, start !=
end), so it no longer calls valid what the server refuses (e.g. 7.7-15)
CI: ubuntu-latest became 26.04, where Playwright cannot install chromium;
pin the Playwright job to ubuntu-24.04.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
HTTP requests that complete without emitting can leave both planner dialogs permanently busy and undismissable; empty-completion handling and regression coverage are needed, with grid refreshes when write outcomes are unknown.
Copilot review on #1792: the host's http-error interceptor answers a 401,
a 403 whose refresh failed, and exhausted retries with EMPTY, so a request
can complete without next or error. With Cancel disabled while busy and
disableClose on, that trapped the user in the dialog.
A small onNoReply operator (per-subscription flag) now handles it:
- writes whose outcome is unknown (absence, pattern save/delete, import
apply, bulk cell edit) release busy, warn "plannerOutcomeUnknown" and
close as changed / reload the grid
- reads release busy; the initial pattern and import loads close as on a
refusal; the grid and requests-panel loads stop their spinners
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changing the valid-from date while the manual-days lookup is pending makes persist() save a different range from the one checked, potentially skipping the confirmation for earlier manually changed days. Disable both date inputs while busy so the validated dates remain stable through the lookup and save; the anchor input at line 67 has the same issue.
This still returns 'Blank' for message id 6, although the list above explicitly excludes Blank because it is not an absence. The grid uses this helper's truthiness to apply the amber absence fill and to show an absence badge instead of the planned hours, so a Blank message is displayed as an absence with the untranslated label 'Blank'. Please return null for Blank too.
Copilot review on #1792: the anchor and valid-from dates (and the form and
rotation toggles) stayed editable during the manual-days lookup, so the
save could cover a different range than the one checked, or save a
pattern after switching to "Ingen fast plan". They are now disabled while
busy; the day texts stay editable, since what is typed is what is saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot review on #1792: the panel's load() did not cancel an older inbox
read, so a slow reply could land last and bring back requests decided in
the meantime, with a stale pending count. It now cancels the previous read,
as the container's own count refresh already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because date validation, edits during pending requests, and inbox error handling introduce risks of rejected submissions, lost edits, and misleading empty states.
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
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.
Why
Kanban card #5489, "Timeplaner på web". Managers plan their staff on the web instead of in the Google Sheet. The backend (planner API,
time_planning_plannerpermission, menu entry) is already onstable(#1790). This PR adds the Angular screens (task 1766) and their Playwright shardt(task 1769).What
A new lazy-loaded route,
/plugins/time-planning-pn/planner, guarded bytime_planning_planner. Existing files only gain the route, the claim constant and i18n keys; no existing component, dialog or service changes.7-15/0,5, Fri, Ryd, an absence type). Choose between "kun disse dage" and "alle [ugedag] fra [dato]". Locked days are reported.Shard
tcovers:tis added to the matrix in both workflows. Itspost-migration.sqlonly applies to shard t. The patch step now also waits for theAssignedSiteManagingTagstable before applying a patch; b1m–l1m only gain that extra wait. Shards a–s are otherwise untouched; they are the proof that existing views did not move.Verified
ng buildand the plugin unit specs pass (609 + new planner specs), and so does the button-convention check, all in a throwaway host.getComputedStyle).Known and set aside (follow-up cards)
SheetWorkersInScopeAsync, but it is confusing.🤖 Generated with Claude Code