Skip to content

feat(planning): redesign version-history modal as activity-log timeline#1649

Merged
renemadsen merged 4 commits into
stablefrom
feat/version-history-activity-log
Jul 14, 2026
Merged

feat(planning): redesign version-history modal as activity-log timeline#1649
renemadsen merged 4 commits into
stablefrom
feat/version-history-activity-log

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Summary

  • Reformat the Historie modal into a day-grouped Aktivitetslog timeline (time · human-readable change · actor) per the Design Manual mockup, keeping the large dialog size (90vw/1400px/80vh) and the GPS/snapshot side panel.
  • Fix pause retrieval in version history: CompareVersions now diffs the individually recorded pause sub-slots (Pause10–19/100–102 shift 1, Pause20–29/200–202 shift 2, StartedAt/StoppedAt) and Pause1–5OverrideMinutes. Previously a save touching only these columns produced zero visible rows in the modal.
  • Human-readable value formatting:
    • planned shift start/end/break + pause overrides: minutes → HH:mm (420 → 07:00)
    • legacy Start/Stop/Pause 1–5 Id tick fields: (id−1)×5 minutes → HH:mm, 0 = unset (—)
    • punch datetimes → HH:mm (tolerates Danish-culture . time separators)
    • floats rounded to 2 decimals; unset→unset noise rows suppressed
  • 62 new i18n keys in all 26 locales (incl. friendly labels for pause sub-slots, e.g. "Pause 2 (vagt 1) startede kl.").

Tests

  • Two new backend unit tests in PlanRegistrationVersionHistoryTests covering sub-slot pause and override-minutes diffs.
  • New Playwright e2e spec b/dashboard-version-history.spec.ts: edits planned shift times twice, opens the Aktivitetslog, and asserts the timeline shows 07:00 → 08:00 / 15:00 → 16:00 / 01:00 → 00:30 with no raw minute integers leaking.

Verification

Verified end-to-end against local real data (record with 10 individually recorded pauses): all pauses render as timeline rows with HH:mm values; GPS/snapshot side panel intact; all 26 locale files parse; plugin solution builds clean.

🤖 Generated with Claude Code

Reformat the Historie modal into a day-grouped Aktivitetslog timeline
(time, human-readable change, actor) per the Design Manual mockup,
keeping the large dialog size and the GPS/snapshot side panel.

Backend: CompareVersions now diffs the individually recorded pause
sub-slots (Pause10-19/100-102 for shift 1, Pause20-29/200-202 for
shift 2, StartedAt/StoppedAt) and Pause1-5OverrideMinutes, so punch
clock pauses appear in the history instead of producing empty versions.

Frontend value formatting for human readability:
- planned shift start/end/break and pause overrides: minutes -> HH:mm
- legacy Start/Stop/Pause 1-5 tick ids: (id-1)*5 minutes -> HH:mm, 0 = unset
- punch datetimes -> HH:mm (accepts Danish-culture '.' time separators)
- floats rounded to 2 decimals; unset->unset noise rows suppressed

Adds 62 i18n keys across all 26 locales, two backend unit tests for the
new diff fields, and a Playwright e2e spec asserting the timeline
formatting end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 07:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Time Planning version-history (“Historie”) modal into a day-grouped Activity Log timeline and fixes missing version-history rows for pause sub-slot and pause-override-minute updates by expanding backend diff coverage. It also adds human-readable value formatting in the frontend (minutes/tick-ids/datetimes/floats) and updates i18n across all locales, with new backend unit tests and a Playwright e2e spec to validate the HH:mm rendering.

Changes:

  • Backend: extend CompareVersions to diff pause sub-slot timestamp columns (Pause10–19/100–102, Pause20–29/200–202) and Pause1–5OverrideMinutes.
  • Frontend: replace the grid-based version-history UI with a day-grouped timeline + value formatting (minutes → HH:mm, tick-id → HH:mm, punch datetimes → HH:mm, float rounding).
  • Tests/i18n: add backend unit tests + a Playwright spec, and add new translation keys across all locales.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/TimePlanningPlanningService/TimePlanningPlanningService.cs Adds pause sub-slot and pause override minute fields to version diff generation.
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/PlanRegistrationVersionHistoryTests.cs Adds unit tests asserting pause sub-slot and override-minute changes appear in version history.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/workday-entity/workday-entity-dialog.component.ts Passes worker/site name + date into the history modal for richer header context.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.ts Implements timeline grouping + human-readable value formatting and removes the grid implementation.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.html Replaces table/grid with the Activity Log timeline layout and side-panel interactions.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.scss Adds timeline styling and removes table/grid styling.
eform-client/playwright/e2e/plugins/time-planning-pn/b/dashboard-version-history.spec.ts New e2e coverage validating HH:mm rendering (and preventing raw minute integers leaking).
eform-client/src/app/plugins/modules/time-planning-pn/i18n/enUS.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/da.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/deDE.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ukUA.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/svSE.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/noNO.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/plPL.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/itIT.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/nlNL.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/frFR.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/esES.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptPT.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptBR.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/roRO.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/fiFI.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/etET.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/hrHR.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/slSL.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/skSK.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/csCZ.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/huHU.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/bgBG.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/elGR.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/isIS.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ltLT.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/lvLV.ts Adds Activity Log/timeline labels + pause sub-slot and override-minute keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +153 to +154
const [, month, day] = datePart.split('-');
return `${day}.${month} ${time}`;
Comment on lines +1871 to +1875
data: {
planRegistrationId: this.data.planningPrDayModels.id,
workerName: this.data.planningPrDayModels.siteName,
date: this.data.planningPrDayModels.date
},
renemadsen and others added 3 commits July 14, 2026 10:12
…spec

The zero-minute case skipped the minute-face click, keeping residual
minutes from earlier shard state (07:50 instead of 07:00). Mirror
dashboard-edit-b's proven rotateZ(360deg) zero-minute handling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move dashboard-version-history.spec.ts from shard b to a new lane r so
it never shares dashboard state with the existing edit specs, and
force-click the zero-minute clock marker (an overlapping face number
intercepts pointer events, timing out a plain click).

Lane r mirrors lane q: activate-plugin + assert-true bootstraps, no own
SQL seed (CI falls back to lane a's). Matrix updated in both workflows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… force-click

Completes the lane isolation: activate-plugin/assert-true bootstraps for
lane r, matrix entries in both workflows, and the force-click fix for
the pointer-intercepted zero-minute clock marker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@renemadsen
renemadsen merged commit 5f8aa2e into stable Jul 14, 2026
39 checks passed
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.

2 participants