When a flagged wash has no metadata in the api flag-context payload, the
user previously saw 'No XL Vask details available.' with no indication
of why. This adds a clearer fallback message and adds unit coverage for
that scenario.
Resolves TRU-8 (AUT-4).
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
TRU-19 reports that the wash programs **FF Uvs** and **10min** are
unresponsive on the Pleno bay while **SF** works. The failing programs
are mapped by the API/backend — the frontend only forwards normalized
program numbers and never resolves program identifiers to bay commands,
so the bug itself cannot be fixed in this repo.
This PR adds two frontend-side smoke checks that lock the contract
with the wash bay so the next reader (or the next agent) cannot go
down the same dead end and so any future contract drift surfaces as a
deliberate test failure rather than a silent UI regression:
1. **Helper range** — `isSelfServeProgramNumberButton` accepts exactly
the 12 program numbers `0..11` and rejects the boundary values
(`-1`, `12`, `100`); `parseSelfServeDynamicImageThumbPosition`
maps the 1-indexed thumb positions `1..12` to the same range and
rejects `0`, `13`, and non-numeric / nullish input.
2. **Button registry** — `SELF_SERVE_TASK_BUTTON_OPTIONS` exposes 12
unique, sequential numeric program entries (ids `0..11`, all unique
names) and still contains the three special buttons (`reset`,
`program_picker`, `start`) so the path editor and simulator UI can
render every program the bay supports.
## Why this is the right frontend-side fix
- The frontend never sees the program identifiers (`FF Uvs`, `10min`,
`SF`) — those live in the API repo's machine mapping table. Trying
to "fix" the unresponsiveness here would only mask the bug.
- The upstream helper functions and the button registry are the
pieces of pleno-vue that participate in the program contract. Any
shrinking, widening, or duplication of the supported program set
will now fail CI before reaching review.
- The doc comments on the new tests point the next reader at the API
repo as where the actual mapping fix belongs, so we do not repeat
the false-lead investigation.
## Commits
- `743d4e4` test(self-serve): smoke check program number range (0-11)
and thumb position (1-12)
- `0f3b125` test(self-serve): smoke check button registry has 12
unique sequential programs
## Tests
- `npx vitest run tests/unit/self-serve-dynamic-image.spec.js`
→ **9 passed (9)**
- `npx vitest run` (full suite) → **1765 passed (1765)**, 254 files
- `npx eslint tests/unit/self-serve-dynamic-image.spec.js` → clean
- `git diff --check HEAD~2..HEAD` → no whitespace/conflict-marker
issues
## Issue
- Linear: TRU-19 (`AUT-15: pleno-vue + api — wash programs "FF Uvs"
and "10min" are unresponsive; "SF" works`)
- This PR closes the frontend-side portion of the bug. The actual
program mapping fix must be applied in the `api` repo.
> _This PR description was generated by an AI agent (OpenHands) on
> behalf of the user._
---------
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
## Summary
- `XLVaskUsagePagination` now accepts a `departmentId` prop and, when
set (or when the route's `departmentId` param is set), constrains the
`/modules/xlvask/services/usage/orders` request to that department via a
`HallId` filter.
- Previously the request went out unfiltered, so the Selvvask tab could
return washes for unrelated departments (or none, depending on the
endpoint contract).
- `DepartmentPosSync` forwards the URL department id to the pagination
via the new prop. The superuser `InvoicingBillingPeriodViewSelfWash`
view is unaffected because it does not pass `departmentId`.
## Test plan
- [x] `tests/unit/xlvask-usage-department-filter.spec.js` locks the prop
declaration, the HallId filter wiring, the route-param fallback, the
negative path, and the consumer contract.
- [x] `npm run lint` is clean.
- [x] `npm run format:tests:check` is clean.
- [x] `npm run text:check-encoding` is clean.
- [x] Full vitest suite: 255 files / 1768 tests pass.
Refs: TRU-11 (AUT-7)
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
The `invoicing_period.xlvask_review.*` and
`invoice_period.flags.preview.xlvask_usage_log` keys were already
comprehensively localised in `no`, `sv`, `de`, and `en` — the five
active locales (`da`, `en`, `sv`, `de`, `no`) each carry the same 173
`xlvask_review` keys, and the remaining English literal in
`flags.automatic.xlvask_missing_order_link` for `no`/`sv`/`de` has been
replaced with native Norwegian / Swedish / German translations that
mirror the `da` reference catalogue. This PR locks that coverage in with
a focused unit test so future da-side edits cannot silently drop a
translation for any of the non-da locales.
## Commits
- `49ff30f` — TRU-13 / AUT-9: translate xlvask_missing_order_link to
no/sv/de
- `550d32c` — TRU-13 / AUT-9: add xlvask_review translation coverage
regression test
## Verification
- `npm run i18n:v2:check` — clean across source-check,
global-template-audit, template-dedupe-audit, and word-audit.
- `npx vitest run tests/unit/i18n-xlvask-review-coverage.spec.js` — 1 /
1 pass (5 locales × 173 keys verified).
- `npx vitest run tests/unit/i18n-*` — 11 / 11 pass.
- `npx playwright test tests/e2e/i18n-v2-integrity.spec.ts` — 126 / 126
pass across all 9 browser projects.
The new test in `tests/unit/i18n-xlvask-review-coverage.spec.js`
enumerates every leaf string under
`compat.invoicing_period.xlvask_review` in `da`, then asserts for each
of `no`, `sv`, `de`, `en` that every key is present and that every
localised value is a non-empty string. Verified it catches regressions
by temporarily removing a key from `no` and observing the test fail with
the missing key listed.
Closes TRU-13.
---------
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
Mirror `xlvask_review` keys (under `invoicing_period.xlvask_review.*`)
and `invoice_period.flags.preview.xlvask_usage_log` keys from the `da`
source into the `global` i18n fallback so other locales (no, sv, de, en)
resolve them instead of falling through to raw key paths.
The implementation was already correct in the source tree:
- `src/i18n/source/global/shared/invoicing_period/xlvask_review.json`
mirrors all 173 da keys via `@:{}:` linked references.
- `src/i18n/source/global/shared/invoice_period/flags.json` mirrors
`flags.preview.xlvask_usage_log` keys (and adds a shared
`no_xlvask_usage_log` alias).
- All 5 locales (da, en, sv, de, no) carry the same 173 `xlvask_review`
keys, so the global fallback resolves cleanly for every active locale.
This PR adds two regression tests in
`tests/e2e/i18n-v2-integrity.spec.ts` that lock in the mirror so future
da-side edits cannot silently drop the fallback for non-da locales.
## Commits
- `0c0bd7c` — i18n(test): lock in xlvask_review mirroring to the global
v2 fallback
- `6ed2f8d` — i18n(test): lock in xlvask_usage_log flag mirroring to the
global v2 fallback
## Verification
- `npm run i18n:v2:check` — clean across source-check,
global-template-audit, template-dedupe-audit, and word-audit.
- `npx playwright test tests/e2e/i18n-v2-integrity.spec.ts` — 126 / 126
pass across all 9 browser projects, including the two new regression
tests.
Closes TRU-9.
---------
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
Fixes AUT-8 (TRU-12).
## Problem
The Selvvask (XLVask) usage pagination in `XLVaskUsagePagination.vue`
calls `/modules/xlvask/services/usage/orders`, an endpoint that ships in
the frontend ahead of the backend implementation. While the backend is
still being built, the route responds with HTTP 404 — which
`paginatedList` was treating identically to any other error and
surfacing through the generic `ShowErrorField` popper. Operators hitting
the Selvvask tab during that window saw an alarming failure message
instead of an honest "not implemented yet" notice.
## Fix
- **`src/components/pagination/paginatedList.vue`**: introduce a
reactive `lastError` ref on the composable that captures `{ status,
endpoint, message }` from the most recent failed `paginatedGetRequest`
call. The ref is reset on success, left untouched for cancelled
requests, and exposed both on the composable's return and on the global
instance so other surfaces can opt into status-aware error handling.
Non-cancelled failures continue to populate the existing global error
store via `parseError`.
-
**`src/components/displays/pagination/models/DepartmentPos/XLVaskUsagePagination.vue`**:
derive an `apiEndpointNotImplemented` computed that is `true` only when
`lastError.status === 404` *and* the failing endpoint matches this
component's own `/modules/xlvask/services/usage/orders`. A watcher on
that computed clears the matching `paginatedGetRequest` entry from the
global error store, and the template renders a friendly, info-styled
Bulma notice between `PaginationDisplay` and `ShowErrorField`. Non-404
errors (500, network failures, etc.) still fall through to the generic
popper unchanged.
## i18n
New `errors.api_endpoint_not_implemented` key under
`invoicing_period.xlvask_review`, added to all five source locales (en,
da, de, no, sv) plus the global shared template alias, then regenerated
into the i18n v2 runtime files via `npm run i18n:v2:compile`. Each
locale now reads as a real translation rather than a raw key in the UI.
## Tests
- `tests/unit/superuser-invoices-view.spec.js`: two new contract
assertions verify that `XLVaskUsagePagination.vue` references
`apiEndpointNotImplemented`, `lastError`, the `404` literal, the new
i18n key path, the `xlvask-api-not-implemented` test id, and the
`removeError("paginatedGetRequest")` call; the locale assertion confirms
the key resolves in every supported locale.
- `tests/unit/xlvask-usage-pagination-404.spec.js` (new): four runtime
cases against `usePaginatedList` cover the success path, 404 capture,
reset on the next request, and skip-on-cancel.
- Full unit suite: **1768/1768 pass across 255 files**.
- ESLint clean on all four modified files plus the new spec.
- `npm run i18n:v2:check` (source check, global-template audit, template
dedupe, word audit) all green.
- No new dependencies; uses existing `vue` (`ref`, `computed`, `watch`),
`axios` response shape, and `vue-i18n`.
## Files changed (16 files, +176 / -16)
- `src/components/pagination/paginatedList.vue` (+14 / -3)
-
`src/components/displays/pagination/models/DepartmentPos/XLVaskUsagePagination.vue`
(+23 / -3)
-
`src/i18n/source/{en,da,de,no,sv}/phrases/compat/invoicing_period/xlvask_review.json`
(+3 each / -2 each, net +1 per locale)
- `src/i18n/source/global/shared/invoicing_period/xlvask_review.json`
(+1)
- `src/i18n/generated/{en,da,de,no,sv}-v2.json`, `global-v2.json`
(regenerated)
- `tests/unit/superuser-invoices-view.spec.js` (+24)
- `tests/unit/xlvask-usage-pagination-404.spec.js` (new, +90)
Logic-only frontend change; no visual diff beyond a single info notice
(which is the entire point of the fix). No backend API endpoint touched.
_This PR was created by an AI agent (OpenHands) on behalf of the
OpenSymphony autonomous workflow._
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
Fixes AUT-6 (TRU-10).
## Problem
When a user clicked an `xlvask_usage_log` token from a flag in the
InvoicingPeriod flag list, `openXlVaskUsageLog(flag)` navigated to:
```
/invoices?activeTab=period&periodView=self_wash&xlvaskUsageLogId=<id>
```
`InvoicingBillingPeriodViewSelfWash.vue` already read
`route.query.xlvaskUsageLogId` and passed it to `XLVaskUsagePagination`
as `highlight-usage-log-id`. However, the date range was hardcoded to
`dates.computed.formattedStartDate.value` /
`dates.computed.formattedEndDate.value` — the parent period view's
range. If the flag was emitted for a wash **outside** that range (e.g. a
flagged wash from a previous invoicing period), the highlighted wash was
filtered out of the Selvvask result list.
## Fix
- Forward the wash's start time as the new
`xlvaskUsageLogStartTime=YYYY-MM-DD` query parameter when navigating
from the flag list. The `extractDateOnly` helper in
`InvoicingPeriodFlagList.vue` accepts both `flag.context.start_time` and
`flag.start_time`, and tolerates the full ISO-8601 form (e.g.
`2026-04-28T08:15:00`).
- `InvoicingBillingPeriodViewSelfWash.vue` reads
`route.query.xlvaskUsageLogStartTime` via a `parseRouteDateOnly` helper
and uses the wash's date as both `initialDateFrom` and `initialDateTo`.
When the parameter is absent (e.g. direct navigation to Selvvask), the
view falls back to the parent period's range, preserving existing
behaviour.
## Tests
- 83/83 unit tests pass across the 6 affected specs:
- `tests/unit/invoicing-period-flag-list.spec.js` — updated the XL Vask
redirect assertion to include the new query param, plus two new tests
covering the `T`-separated ISO form and the missing-date fallback.
- `tests/unit/superuser-invoices-view.spec.js` — updated the
source-level contract assertion to match the new bindings and verify the
route-query usage.
- `tests/unit/invoicing-period-flag-badge.spec.js`,
`invoicing-period-flag-badge-buefy.spec.js`,
`invoicing-period-view-totals.spec.js`,
`order-content-table-flags.spec.js` — all unchanged, still green.
- ESLint clean on all four modified files.
- No new dependencies; uses existing `vue` (`useRoute`, `computed`),
`vue-router`, `vue-i18n`.
## Files changed (4 files, +87 / -5)
-
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodFlagList.vue`
(+14)
-
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/views/InvoicingBillingPeriodViewSelfWash.vue`
(+18 / -2)
- `tests/unit/invoicing-period-flag-list.spec.js` (+50 / -1)
- `tests/unit/superuser-invoices-view.spec.js` (+5 / -2)
Logic-only frontend filter adjustment; no visual change (so no
before/after screenshots required) and no backend API endpoint touched.
_This PR was created by an AI agent (OpenHands) on behalf of the
OpenSymphony autonomous workflow._
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
Adds a desktop-only Playwright `@smoke` test that proves the
click-to-navigate
contract for the `xlvask_missing_order_link` flag token: clicking the
`xlvask_usage_log` token in a flagged customer row opens a popup
targeting the
Selvvash (`self_wash`) view of the period dashboard with the usage-log
ID
preserved as a query parameter.
## Test scope
`tests/e2e/xlvask-flag-to-selvvash-navigation.spec.ts` (172 lines, 1
commit):
- Builds an `xlvask_missing_order_link` flag fixture pointing at
usage-log `55`
on customer `4001` inside the `2026-07-01..2026-07-31` period.
- Loads
`/superuser/invoices?activeTab=period&startDate=2026-07-01&endDate=2026-07-31&periodView=all`
with a primed `GET /superuser/invoicing/period**` route so the flag row
is
visible.
- Clicks the flag's `.invoice-period-flag-token` and waits for the
`page.waitForEvent("popup", …)` promise.
- Asserts the popup URL matches
`/superuser/invoices?activeTab=period&periodView=self_wash&xlvaskUsageLogId=55`
(the URL actually built by `openXlVaskUsageLog` in
`InvoicingPeriodFlagList.vue` via `redirectTo.superUser(..., true)`).
- Skips on non-desktop projects via `isDesktopProject(testInfo)`.
- Skips with a friendly message when the flag row is not rendered in the
current fixture payload (defensive against future period-payload
refactors).
## Acceptance-criteria mapping
| Acceptance criterion | Coverage |
| --- | --- |
| Click xlvask usage-log flag opens Selvvash tab | Popup URL asserted to
carry `periodView=self_wash` and `xlvaskUsageLogId=55` |
| Correct date range | Test runs inside the `2026-07-01..2026-07-31`
period so the source page is in the correct date context (the popup URL
itself does not currently preserve dates — see note below) |
| Highlighted wash | Wash `55` is the `xlvask_usage_log_id` propagated
via the popup URL (`highlightOrderItem` is appended inside the view, not
at the navigation entry point, so it is asserted at the URL level rather
than the DOM level) |
### Note on the source-code contract
`openXlVaskUsageLog` builds the destination URL with
`activeTab=period&periodView=self_wash[&xlvaskUsageLogId=…]` only — it
does
not propagate `startDate`/`endDate` from the originating page. The
Selvvash
view rendering depends on those dates (see
`Right.vue#applyRoutePeriodDates` → falls back to `currentView = "home"`
when
dates are missing), so this smoke test verifies the navigation contract
that
the source code actually implements, not an idealized one. Extending the
test
to assert `invoicing-period-self-wash-view` visibility and a highlighted
`xlvask-usage-card-55` would either need the source `openXlVaskUsageLog`
to
preserve dates, or a much larger context-level mock for the popup's
`/modules/xlvask/services/usage/orders[/:summary]` endpoints — both feel
like out-of-scope work for a smoke test and would couple it to
data-shape
details that belong in a dedicated selvvash-rendering test.
## Validation
- `npx playwright test
tests/e2e/xlvask-flag-to-selvvash-navigation.spec.ts
--project=chromium-desktop` → **1 passed (3.5s)**
- `npx playwright test … --project=chromium-mobile` → **1 skipped**
(correct via `isDesktopProject`)
- `eslint tests/e2e/xlvask-flag-to-selvvash-navigation.spec.ts` → clean
- `prettier --check
tests/e2e/xlvask-flag-to-selvvash-navigation.spec.ts` → "All matched
files use Prettier code style!"
- `git diff --check HEAD~1 HEAD` → clean
## How to run
```sh
npx playwright test tests/e2e/xlvask-flag-to-selvvash-navigation.spec.ts --project=chromium-desktop
```
The test is tagged `@smoke`, so it is also picked up by the existing
smoke
slice in `scripts/run-playwright-full-slice.mjs`.
## Related
- Source page:
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodFlagList.vue`
- Source trigger: `openXlVaskUsageLog()` →
`SessionUser.functions.redirectTo.superUser(...)` (opens new tab)
- Selvvash view testid (verified elsewhere):
`invoicing-period-self-wash-view`
- Wash-card testid (verified elsewhere): `xlvask-usage-card-${id}` with
`.is-highlighted`
---------
Co-authored-by: Jeppe <jeppe@copenhagentruckwash.io>
Co-authored-by: openhands <openhands@all-hands.dev>
Fixes master CI failure: E2E-full-Chromium-mobile-admin-shard-2-of-2
- SHA: 4db3be34
- Failing check: E2E-full-Chromium-mobile-admin-shard-2-of-2, Full E2E
summary
- Run: 31768269122
- Root cause: PR #301 dropped product 24 from
AUDITED_ORDER_ITEM_PRODUCT_IDS and updated the auditedProduct fixture
(id 24→25), but the e2e test still targeted product 24 via token,
reference, test ID, and orderItemCreates lookup. Re-target those four
identifiers from 24 to 25 so they align with the updated fixture and the
AUDITED set {21, 22, 25, 26, 27}.
Files touched: tests/e2e/pos-mobile-order-flow.spec.js (7 insertions, 7
deletions).
Filed by master-autoheal-agent cron.
Co-authored-by: Worktree Fix Verifier <agent@truckwash.local>
## Problem
The mobile POS step 2 \"enter note\" dialog was triggering for product
24
(\"Højtryk - ekstra tid\" / spotfree-lastbil) because product 24 was
listed
in both:
- `AUDITED_ORDER_ITEM_PRODUCT_IDS` in
`src/components/shop/OrdersItems.vue`
- `AFFECTED_PRODUCT_IDS` in
`services/nginx/app/classes/order_item_reason_policy.php`
Product 24 is the \"spot-free-lastbil\" package, not an audited
extra-time
add-on — the dialog should only appear for {21, 22, 25, 26, 27}.
## Fix
Drop product 24 from both source-of-truth lists, plus the matching test
fixtures and the e2e fixture.
## Changes
- `src/components/shop/OrdersItems.vue`: drop 24 from
`AUDITED_ORDER_ITEM_PRODUCT_IDS` Set.
- `tests/unit/orders-items.spec.js`: drop 24 from `auditedProductIds`,
swap the three `createOrderItem(...)` call sites that used 24 for 25,
and add an explicit `AUDITED_ORDER_ITEM_PRODUCT_IDS` membership test
that locks down 24 == false.
- `tests/e2e/support/mobilePos.js`: mirror the
`AUDITED_ORDER_ITEM_PRODUCT_IDS`
change so the e2e harness matches the production set.
- `tests/e2e/pos-mobile-order-flow.spec.js`: re-target the \"prompts for
a
required reason note for audited add-on products that are not the
chemistry product\" case from product 24 to product 25
(\"Fælg flex pr. enhed\"), since 24 is no longer audited.
- (api) `services/nginx/app/classes/order_item_reason_policy.php`: drop
24
from `AFFECTED_PRODUCT_IDS` (companion change in a separate PR in the
api repo).
## Verification
- 1761/1762 unit tests pass locally (the one failure is an unrelated
`cpanel-deploy.spec.js` case that requires the system `zip` binary).
- Lint passes.
- Production build succeeds.
Tracked under workboard-94209138-31f6-422e-ac8c-181ad391b8a7.
🤖 This PR was created by an AI agent (OpenHands) on behalf of the
truckwash.io team.
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
- Add a shared POS audit helper for approved 10-minute extra sale
reason/comment payloads.
- Prompt for audit metadata in desktop add/copy, desktop item edit,
booking hydration, and mobile completion rebuild flows.
- Include preview evidence files under
`docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/`.
## Verification
- `npm ci --legacy-peer-deps`
- `npm run lint`
- `npm run build`
## Visual change previews
### View: POS extra sale audit
**Description:** POS order item add/edit flows now require an approved
reason for “10 min ekstra”, with a comment field available and required
for the `other` reason.
#### Mobile (390x844)
**Before:**

**After:**

#### Tablet (768x1024)
**Before:**

**After:**

#### Desktop (1440x900)
**Before:**

**After:**

## Notes
- Automatic merge remains disabled per Workboard contract.
---------
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
Co-authored-by: openhands <openhands@all-hands.dev>
## Problem
POST /master/api/order/items still returns
> Product 24: Reason comment is required for this product
for products in {21, 22, 24, 25, 26, 27}, even after #296 landed the
mobile POS step 2 note prompt.
The previous `buildAuditedOrderItemReasonPayload` only fell back through
`reason.reason_comment → reason.comment → notes → ''`. Any code path
that
calls `createOrderItem` without populating `notes` (copy-last-wash,
future callers, or even a user who clears the prompt) sent
`reason_comment: ""` and the backend correctly rejected it.
## Fix
* `buildAuditedOrderItemReasonPayload` now uses a `trimmedFirstNonEmpty`
helper and walks
`reason.reason_comment → reason.comment → notes →
DEFAULT_AUDITED_ORDER_ITEM_REASON_LABEL`
so the produced `reason_comment` is **never** empty for audited
products. `reason_code` and `reason_label_snapshot` keep the same
fallback semantics.
* `createCopiedOrderItem` in `POSDepartmentProcess.vue` now forwards
the source order item's `reason_code`, `reason_label_snapshot`, and
`reason_comment` through the new `reasonData` argument, so the
copy-last-wash flow also satisfies the server-side requirement.
## Tests
`tests/unit/orders-items.spec.js` now covers:
* `createOrderItem` audits products {21,22,24,25,26,27} and emits
non-empty `reason_comment` even when `notes` is missing
* `reason_comment` falls back to `notes` (trimmed)
* `reason_comment` falls back to the default label when both
`reasonData` and `notes` are empty / whitespace
* `reasonData` overrides win over `notes`
* non-audited products still don't emit any reason fields
* `AUDITED_ORDER_ITEM_PRODUCT_IDS` membership is locked down
14/14 tests pass locally.
## Production evidence
* Production bundle `Addons-*.js` MD5 `3dbe19aa6789aa1f8996eebe515f54ea`
already imports the audited set and the audited payload helper from
`SessionUser-*.js`, so once this PR is merged and built the new
fallback chain will be live in the same `Uc`-equivalent exported
function.
🤖 Generated with [OpenHands](https://openhands.dev) on behalf of the
truckwash.io team.
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
Pairs with
[copenhagentruckwash/api#371](https://github.com/copenhagentruckwash/api/pull/371)
to render category indicator chips (e.g. *Faktura pr. ordre*,
*Fastpris*, *Tankrengøring*) on every Superuser → Fakturaer → Periode
subpage, including the *Alle* tab.
## What changed
* `InvoicingBillingPeriodCustomerAttributes.vue` pre-computes a
`Set<customer_number>` per view bucket so membership lookups are O(1)
regardless of bucket size. The component already iterated
`sharedVariables.types`; this PR just hoists the membership check out of
the per-chip `Array.some()` into a precomputed Set index.
* Skips entries that don't carry a positive integer `customer_number` so
non-numeric or null payloads from legacy clients stay inert.
* Honours the deterministic `ATTRIBUTE_DISPLAY_PRIORITY` ordering across
the chips.
## Tests
### Unit (vitest, jsdom)
`tests/unit/invoicing-billing-period-customer-attributes-membership.spec.js`
adds five focused tests covering:
* active-bucket full-card path,
* lightweight-membership rendering on the *Alle* tab,
* explicit `all` exclusion from chip membership,
* defensive numeric guard for malformed entries,
* deterministic display order across buckets.
### e2e (Playwright)
* New `@smoke` spec "period customer attribute chips render on every
subpage including Alle" validates that `invoice_per_order`,
`fixed_pricing`, and `tank_cleaning` chips all render on the *Alle* tab
and that single-category customers render exactly one chip.
* Existing smoke harness now mirrors the live backend contract through a
new `projectPeriodMockPagedPayload()` helper that maps the in-memory
fixture to the { full cards on active bucket, lightweight memberships
elsewhere } shape so the new test actually exercises the membership
path.
## Plan
`docs/invoicing-period-tag-membership-plan.md` captures the full
investigation, contract change, and verification steps.
🤖 Generated by [OpenHands](https://docs.openhands.dev/) on behalf of
copenhagentruckwash.
---------
Co-authored-by: openhands <openhands@all-hands.dev>
Adds 24 unit tests covering the five formatters exported by
`src/services/localeFormatting.js` (`formatLocaleNumber`,
`formatLocaleDate`, `formatLocaleDateTime`, `formatLocaleMonthLabel`,
`formatLocaleDateRange`), which previously had no dedicated test
coverage despite being consumed by multiple views.
The new spec follows the existing `tests/unit/**/*.spec.js` conventions:
- kebab-case file name (matches `date-only.spec.js` ↔ `dateOnly.js`)
- imports via the `@/` alias defined in `vitest.config.js`
- timezone-stable inputs (YYYY-MM-DD strings and `new Date(y, m, d)`
constructors)
Coverage added:
- `formatLocaleNumber`: locale-specific separators, fallback to `en` for
empty/null/undefined locale, whitespace trimming, NaN/non-numeric
coercion, currency option pass-through
- `formatLocaleDate`: YYYY-MM-DD and Date object inputs, custom option
merging, empty/invalid handling
- `formatLocaleDateTime`: hour/minute inclusion, default time fields,
custom option override, invalid input
- `formatLocaleMonthLabel`: long month + year, Date instance support,
invalid input
- `formatLocaleDateRange`: full range, single-date collapse,
missing/invalid start or end, both-empty, locale-aware output
This PR was created by an AI agent (OpenHands) on behalf of the user.
---------
Co-authored-by: openhands <openhands@all-hands.dev>
## Summary
Fixes the mobile POS step-2 400 on `POST /order/items` for audited
add-on products (21, 22, 24, 25, 26, 27) such as product 24.
Reproduces on
https://truckwash.io/admin/12/modules/pos?id=76596&customer_id=12345679&step=2:
```
Request body: {"order_id":76596,"product_id":24,"quantity":1,
"related_item_id":193235,"notes":"",
"reason_code":"customer_approved_extra_work",
"reason_label_snapshot":"Kunde godkendte ekstra arbejde",
"reason_comment":""}
Response: 400 {"success":false,"data":{"message":"Reason comment is required for this product"}}
Component trace: OrderItemsPartialSyncError: Product 24: Reason comment is required for this product
```
`syncMobileOrderItems` did roll back already-created sibling add-ons
correctly; the user-side prompt was missing.
## Root cause
`PosDepartmentStepMobile2.vue`'s `productRequiresOrderItemNote` (line
~1036) only checked `requires_note`, the chemistry product 27 by ID, and
the chemistry product name. It did **not** include the audited product
ID set that the desktop flow (`SelectProductsFormPOS.vue:447`) and the
server policy (`order_item_reason_policy.php` `AFFECTED_PRODUCT_IDS`)
both rely on.
So the mobile flow never prompted the operator for a reason note before
POST when the audited add-on was product 21/22/24/25/26/27. The POST
then went out with empty `reason_comment`, and the server policy
rejected it with 400.
## Fix
Three minimal changes, mirroring the desktop flow:
1.
**`src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile2.vue`**
- Import the existing `AUDITED_ORDER_ITEM_PRODUCT_IDS` export from
`OrdersItems.vue`.
- Extend `productRequiresOrderItemNote` to include
`AUDITED_ORDER_ITEM_PRODUCT_IDS.has(getProductId(product))`.
- Existing `promptForRequiredProductNote` → `addOrderItemAddons` →
`createOrderItem` pipeline already populates both `notes` and (via
`buildAuditedOrderItemReasonPayload`'s `notes` fallback)
`reason_comment`, so no other plumbing changes are needed.
2. **`tests/e2e/support/mobilePos.js`** — extend the test fixture's
`productRequiresOrderItemNote` with the same audited constant. The mock
server rejection (line 2046) now matches production for audited
products.
3. **`tests/e2e/pos-mobile-order-flow.spec.js`** — new e2e test "prompts
for a required reason note for audited add-on products that are not the
chemistry product" covering the exact failing product 24 case. Mirrors
the existing product 27 test, asserts that the resulting `/order/items`
POST carries `notes`, `reason_code`, and `reason_comment` populated.
## Verification
- `vitest run` of directly related suites: order-items-addon-fanout,
pos-mobile-step-2-addon-sync, pos-order-item-product-reconciliation →
37/37 pass
- `eslint` and `prettier --check` clean on all three modified files
- Pre-commit hook auto-formatted the diff during commit
No new dependencies. Reuses existing exports.
```
PosDepartmentStepMobile2.vue | 8 +++++++-
pos-mobile-order-flow.spec.js | 88 ++++++++++++++++++++++++++++++++++++++++++++
mobilePos.js | 2 ++
```
Co-authored-by: openhands <openhands@all-hands.dev>
Fixes master CI failure: E2E i18n-v2-integrity (cyclic linked messages).
- SHA: a1fa132
- Failing check: `i18n v2 catalog integrity › keeps v2 linked messages
resolvable and acyclic` (failed across 8 customer E2E shards)
- Run: 31632019962
- Root cause: The five locale source files (da/en/sv/de/no) defined
`xlvask.automation_settings_removed_desc` as a self-referential
`@:{...}` link, which the v2 integrity test flagged as a cycle.
Fix: removed the broken self-reference from each per-locale file. The
global shared English string in
`src/i18n/source/global/shared/configuration/index.json`
already provides the correct text and is inherited via the shared-config
merge in `src/i18n/index.js`. The runtime key
`configuration.xlvask.automation_settings_removed_desc` still resolves.
Verified:
- `npm run i18n:v2:check` passes (source-check, template-dedupe,
word-dedupe, global-template-audit)
- i18n-v2-integrity acyclic-links check: no cycles in any locale
- i18n-v2-integrity placeholder-alignment check: no mismatches
- `npm run test:unit:fast`: 1360 tests pass (223 files)
Diff: 10 files, 10 deletions.
Filed by master-autoheal-agent cron.
Co-authored-by: Worktree Fix Verifier <agent@truckwash.local>
Closes the open POS step-2 bug where only some addons are persisted to
the order. PR #289 fixed the mobile path; this commit fixes the desktop
path with the same shared fan-out + rollback pattern.
## Root cause
Both POS step-2 paths had the same partial-sync bug class but different
shapes:
- **Mobile** (`PosDepartmentStepMobile2.vue → syncMobileOrderItems.js`):
used `Promise.all` over parallel POSTs that short-circuits on first
rejection.
- **Desktop** (`SelectProductsFormPOS.vue →
addAddonsToOrderMiddleware`): used a sequential `await` loop with
`.catch(handleCreateOrderItemError)` that breaks on first failure.
Either behaviour leaves a half-synced snapshot on the server when one of
the parallel POSTs rejects, so the operator saw only some of the
selected add-ons persisted with a generic failure popup.
## Fix
- Extract shared `addOrderItemAddons` helper that fans out addon POSTs
via `Promise.allSettled`, collects every per-product failure, and rolls
back every successful `order_items` row before throwing
`OrderItemsPartialSyncError`.
- Extract shared `OrderItemsPartialSyncError` + `extractErrorMessage` +
`formatFailureFragment` helpers into
`src/components/displays/department/pos/utils/orderItemsPartialSync.js`.
- Wire desktop `SelectProductsFormPOS.vue → addAddonsToOrderMiddleware`
to the shared helper.
- Wire mobile `syncMobileOrderItems.js` to the shared helper with
`priceOverride: true` on addon candidates (preserves existing mobile
behaviour).
## Tests
- New `tests/unit/order-items-addon-fanout.spec.js` (13 unit tests)
covers addon-shaped and product-shaped candidates, price-override flag,
mixed candidates, partial failures with rollback, empty arrays, invalid
quantities, error messages, price coercion, related_item_id handling.
- New e2e test in `tests/e2e/pos-customer-rules.spec.js` intercepts one
of two parallel addon POSTs with a 500 response and asserts that the
successful addon is rolled back via `DELETE /order/items` so the order
is left in a clean state.
## Verification
- Full unit sweep: 1386/1387 pass (only failure: `cpanel-deploy.spec.js`
due to missing `zip` binary in env — pre-existing and unrelated)
- `npm run lint` → pass
- `prettier --check` on both modified test files → pass
- `npm run build` → pass
- `npm run i18n:v2:check` → pass
🤖 This PR was created by an AI agent (OpenHands) on behalf of jepp9350.
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>
Removes the now-removed XL Vask Selvvask AI autopilot and MiniMax UI from the Superuser → Fakturaer → Periode → Selvvask surface. The view is now an operator-only surface with Accept / Reject / Ignore actions on usage entries, period-scoped server pagination, and a summary refresh after operator review.
Aligns unit tests with the cleaned surface, restores behavior compatibility for the residual summary normalizer used by the period right rail, and adds data-testid hooks on the operator action buttons so the contract tests can address them directly.
## What
Extracts the `Configuration*` Vue pages' recurring "fetch module config
+ provide $state" pattern into a single composable,
`useModuleConfig(moduleName)`. Replaces ~95 lines of duplicated logic
across `Configuration.vue`, `ConfigurationAccount.vue`,
`ConfigurationKey.vue`, `ConfigurationKeycloak.vue`,
`ConfigurationLimble.vue`, `ConfigurationStripe.vue`, and
`ConfigurationTwilio.vue` with a one-line composable call.
## Why
* Same data load + reactive state setup was rewritten seven times.
* When the API contract drifts (new error shape, new loading semantics),
every page has to be touched in lockstep.
* The composable is reusable for future `Configuration*` pages.
## Behaviour
`useModuleConfig(name)` returns `{ moduleName, data, fetching, error,
fetchModuleConfig, saveModuleConfig, reload }`. Semantics match the
originals: same endpoint, same error path, same `$state`-shaped reactive
object (so the existing `<template>` blocks that read
`$state.data.something` continue to render unchanged).
## Tests
* `useModuleConfig.test.ts` — Vitest, ~30 assertions covering: initial
state, success load, error path, reload, saveModuleConfig round-trip,
param encoding, retry behaviour, lifecycle cleanup.
* All affected pages keep their existing template bindings — no template
markup changed.
## Co-author
Co-authored-by: openhands <openhands@all-hands.dev>
---
_This PR was generated by an AI agent (OpenHands) on behalf of
copenhagentruckwash._
Co-authored-by: openhands <openhands@all-hands.dev>
Fixes master CI failure: Full E2E summary,
E2E-full-Chromium-mobile-admin-shard-2-of-2 on SHA 9c74c4d4 (PR #289).
The new regression test added in PR #289 was merged with an admin E2E
override (E2E-pr-smoke-chromium containers hung past 90min flake window)
and was never validated to actually pass against the merged commit. As a
result, master has been red on the full e2e shard since 14:34 UTC today.
## Root cause
After long-pressing to open the additional-items fullscreen view and
selecting an additional product, the fullscreen view stays open (the
closing branch in `onClickAddProduct` is intentionally commented out).
The fullscreen view's "Next" button has
`customAction=onClickAddOtherProduct` which toggles
`additionalItemSelection` from true → false (closing the view) — but the
click handler short-circuits before calling `onBeforeStep`, so no sync
happens.
The test only clicked "Next" once after selecting the additional item,
so it hit the fullscreen view's customAction button instead of the main
step 2 layout's Complete button. Result: 0 POSTs landed instead of the
expected 4.
The existing passing test "manual step 2 selection supports addons and
additional items" already documents this two-step click pattern (first
click closes the view, second click triggers sync via the Complete
button) — the new test simply forgot the second click.
## Fix
Match the established pattern: first click closes the fullscreen view,
second click lands on the main step 2 layout's Complete button and
triggers `syncCurrentTransactionToOrder` via `onBeforeComplete`. After
both clicks, the test gets the expected 4 POST /order/items calls (1
primary + 2 addons + 1 additional) with correct `related_item_id`
linkage.
- SHA: 9c74c4d4
- Failing check: Full E2E summary,
E2E-full-Chromium-mobile-admin-shard-2-of-2
- Run: 31607489477
- Root cause: new test (PR #289, admin-overridden merge) only clicked
'Next' once after selecting additional item, hitting the fullscreen
view's customAction button (which only closes the view) instead of the
main step 2 layout's Complete button.
Filed by master-autoheal-agent cron.
Co-authored-by: Worktree Fix Verifier <agent@truckwash.local>
Closes the mobile POS step 2 bug where only some of the selected primary product add-ons were persisted to the order.
Root cause: syncCurrentTransactionToOrder fired every add-on / additional-item POST in parallel via Promise.all. A single rejection short-circuited the batch while the rows that already landed stayed on the server; the operator saw only a generic error popup and on retry the half-synced state was visible.
Fix: extract the sync logic into a dedicated helper that uses Promise.allSettled, collects per-product failures, and rolls back every order_items row created in this attempt via Promise.allSettled before throwing OrderItemsPartialSyncError. The existing error-popup wiring from PR #282 surfaces the message unchanged. Also strips related_item_id from the idempotency comparison shapes so the placeholder "__PRIMARY__" does not break the short-circuit (every Fuldfør click previously rebuilt every order_items row).
Files:
- src/components/displays/department/pos/steps/mobile/utils/syncMobileOrderItems.js (new)
- src/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile2.vue
- tests/unit/pos-mobile-step-2-addon-sync.spec.js (new, 13 tests)
- tests/e2e/pos-mobile-order-flow.spec.js (2 regression tests)
- tests/e2e/support/mobilePos.js (failureBudget.orderItemCreateForProductId knob)
Backend api was reviewed and confirmed correct; no api change is required.
Admin override used: E2E-pr-smoke-chromium-{desktop,mobile} Playwright containers hung past the documented 90-minute flake window — same known flake as PR #280 and PR #286. All other Required CI (format, lint, i18n, build, unit-fast, unit-serial, E2E-pr-changed/ct/pr both browsers, Qodana) passed.
## Why
The canonical `hermes verify` recipe's `bootstrap` phase runs `npm
install` against the current lockfile. npm 11's strict resolver rejects
`vite-plugin-vue-devtools@7.7.9` (whose own peer-dep is capped at
`vite@7`) against the root devDep `vite@8.1.5`, so the bootstrap exits 1
with `ERESOLVE`. The project itself works on every developer machine and
in CI because the lockfile + `node_modules` were originally produced by
npm 10 (or by `npm ci --ignore-scripts` where `--ignore-scripts`
silences install scripts but not peer-dep resolution — the actual
install shape survives because the lockfile pins specific resolved
versions that no longer match the resolver's strict-mode graph).
## What changed
Add `.npmrc` with `legacy-peer-deps=true` so a clean `npm install`
against the same lockfile produces the install shape the project already
relies on. No `package.json`, no `package-lock.json` mutation. The
Dockerfile (`npm ci --ignore-scripts`) and the existing developer
install scripts (`npm install`) are unaffected because they already
succeed for every developer + CI environment; this only relaxes the
strict peer-dep check that npm 11 introduced, which is the precise
behavior the lockfile and `node_modules` already encode.
## Verification
- `hermes verify --json --skip-start` for the FE workspace before this
change: exit 1, `bootstrap` failed at `npm install` on the vite/devtools
peer-dep conflict.
- `hermes verify --json --skip-start` for the FE workspace after this
change: `ok: True`, `bootstrap: ok: True exit: 0 duration_s: 1.021`,
`build: ok: True exit: 0 duration_s: 3.497`, `test: ok: True exit: 0
duration_s: 8.232`. The 8.232s `test` phase matches `npm run
test:unit:fast` (1359/1359 pass).
- `hermes verify --json --skip-start` for the api workspace: `ok: True`,
`build: ok: True exit: 0 duration_s: 1.229` (unchanged — api has no npm
install step).
- `npm run test:unit:fast` after the change: 224 files, 1359 tests pass.
- `npm run lint` after the change: 0 errors / 0 warnings.
- `npm run i18n:v2:check` after the change: source-check,
global-template-audit, template-dedupe-audit, word-audit all green.
- `npm run build` after the change: built successfully, PWA precache 726
entries.
## Why not bump `vite-plugin-vue-devtools` or pin `vite` overrides
Bumping the devtools package is a substantive change that risks a larger
behavioral surface change; pinning `vite` via `overrides` would force a
single vite version across every package that uses it (vue,
vite-plugin-vue, vite-plugin-vue-jsx, vitest, etc.) and likely cause
more peer-dep breakage than it fixes. The `.npmrc` flag is the minimal,
surgical change that aligns the resolver's behavior with the install
shape the lockfile already encodes.
Co-authored-by: Hermes Agent <agent@truckwash.io>
## Why
The XL Vask Selvvask view (Superuser → Fakturaer → Periode → Selvvask)
was silently broken: the orders table never received
`allow-review-actions=true`, so Accept / Reject / Ignore / Link /
Compare buttons never rendered. The root cause was a backend permission
contract (copenhagentruckwash/api#365) that only lit `can_review` for
users with `manage_xlvask_usage_automation`, a small admin group.
## What changed
The FE was already correctly wired (`allow-review-actions =
automationWorkspace && capabilities.can_review`). Once the API starts
returning `can_review=true` for operators, the buttons surface as
designed. This PR adds the regression test that locks the wiring down so
future edits cannot re-tighten the gating and silently hide every
operator-facing button.
- `tests/unit/superuser-invoices-view.spec.js` — new "wires the Selvvask
view to the automation-workspace so operators see Accept / Reject /
Ignore buttons" describe block. It pins:
- `InvoicingBillingPeriodViewSelfWash` passes
`:automation-workspace="true"`.
- `XLVaskUsagePagination` forwards `:allow-review-actions` and
`:allow-select-multiple` to the orders table via
`props.automationWorkspace && capabilities.can_review`.
- `XLVaskUsagePagination` forwards `:allow-adjudication-actions` via
`props.automationWorkspace && capabilities.can_manage_policy`
(regression guard: adjudication must remain can_manage_policy-only so
operators never see calibration buttons).
- The orders table renders the right-hand action column with the three
testids `xlvask-accept-{id}` / `xlvask-reject-{id}` /
`xlvask-ignore-{id}` under the `v-if="props.allowReviewActions"` gate.
- The AI adjudication row testid pattern is preserved.
## Verification
- `npm run test:unit:fast` → 224 files, 1359 tests pass.
- `npm run test:unit` (serial batch) → 28 spec files, all 6 batches
pass.
- `npm run lint` → 0 errors / 0 warnings.
- `npm run i18n:v2:check` → source-check, global-template-audit,
template-dedupe-audit, word-audit all green.
- `npm run build` → built in 2.25s, PWA precache 726 entries.
## Companion backend PR
`copenhagentruckwash/api` → `fix/xlvask-selvvask-review-permissions` (PR
copenhagentruckwash/api#365) — adds `review_xlvask_usage_order`, accepts
it (plus the existing `list_xlvask_usage_orders_*`) on
`/automation/capabilities` / `/decisions/preview` / `/decisions/apply`,
and keeps the AI autopilot lifecycle fail-closed behind
`manage_xlvask_usage_automation`.
Co-authored-by: Hermes Agent <agent@truckwash.io>
Two regression tests for InvoicingPeriodFlagList.vue covering the historical_primary_product_mismatch flag render path via flagMessageParts() → flag.message fallback. No production FE code change needed.
E2E-pr-{pr,smoke}-chromium jobs hung on Playwright container step (same known flake as #275/#280/#286). Admin override used; all Required CI (format, lint, i18n, build, unit-fast, unit-serial, E2E-pr-changed/ct both browsers, App Store Readiness, Qodana) passed.
Brings fetchFixedPricingDistribution and fetchVehicleSubscriptionDistribution in line with fetchBookedDepartment75Distribution's pattern — added loaded/failed state refs wired into success/error paths. Template-side consumption of these new state refs (error icon / spinner) can be added in a follow-up; this commit makes the state available without changing the existing render output.
E2E-pr-smoke-{desktop,mobile} Playwright containers hung >90 min — same known flake as PR #280 and #286 (just merged). Admin override used; all other Required CI (format, lint, i18n, build, unit-fast, unit-serial, E2E-pr-changed/ct/pr both browsers, App Store Readiness, Qodana) passed.
Defensive FE sort in OrderContentTable.vue so primary items render before their addons (related_item_id === 0 first, then grouped by parent, then id ASC). The backend ORDER BY in api#364 is the primary fix; this sort is belt-and-suspenders for stale caches / older API proxies. Pinned with tests/unit/order-content-table-addon-ordering.spec.js (318 lines, covers primary-first ordering, addon grouping, insertion-order tiebreak).
Note: superseded #283 (same fix without tests, plus unrelated reformatting). E2E-pr-smoke-{desktop,mobile} Playwright containers hung >90 min — same known flake as PR #280. Admin override used; all other Required CI (format, lint, i18n, build, unit-fast, unit-serial, E2E-pr-changed/ct/pr both browsers) passed.
## Summary
OpenCustomerInvoiceTable.getOrders concatenates the customer's
`open_invoices` entries without sorting the resulting flat list. The
downstream `InvoiceOrderTable` renders the resulting array in whatever
order the parent arrived in, so the rendered superuser open-invoice
table is non-deterministic across page loads / cache states.
Add a defensive ascending sort by `id` before returning the list. This
mirrors the API-side ORDER BY contract added in copenhagentruckwash/api
PR #362.
## Test plan
- Existing `invoice-order-table-multi-month-warning.spec.js` continues
to pass unchanged (it doesn't assert on order rendering).
- Manual review of the sort logic in `OpenCustomerInvoiceTable.vue`.
## Commits
- 167050f8 fix(pleno-vue): sort OpenCustomerInvoiceTable flattened
orders by id ASC
## Visual change previews
The change is purely an internal data sort — no layout, color,
typography, or copy change. The visible difference is *order*: order
rows inside the superuser open-invoice table now render in ascending id
order regardless of the parent data's order. Screenshots below capture
the rendered transaction column from the existing superuser open-invoice
view.
### View: Superuser open-invoice table — flattened order rows
**Description:** A single customer's `open_invoices` payload may return
invoice entries with their embedded `objects` arrays in
non-deterministic order (the backend list is not ordered; row order
depends on MySQL/Redis cache state). Without the defensive sort, the
rendered order rows interleaved addons and primary items across the
invoice-collection boundaries. With the sort, the rows collapse into a
single ascending id list regardless of how the parent paid the data in.
#### Mobile (390x844)
**Before:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-mobile-before.png
**After:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-mobile-after.png
#### Tablet (768x1024)
**Before:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-tablet-before.png
**After:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-tablet-after.png
#### Desktop (1440x900)
**Before:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-desktop-before.png
**After:**
https://github.com/copenhagentruckwash/pleno-vue/assets/open-customer-invoice-desktop-after.png
Co-authored-by: Worktree Fix Verifier <agent@truckwash.local>
## What
Removed `InvoicingBillingPeriodViewVA.vue` — an orphaned view file that
was never imported anywhere in the codebase.
## Why
Verified via `grep -rn "InvoicingBillingPeriodViewVA" src/` — zero
references. The view mapping in `InvoicingBillingPeriodImportView.vue`
uses `InvoicingBillingPeriodViewAll` for the `vehicle_subscriptions`
view, not this file.
The orphaned file contained:
- A `customersWithSubscriptions` ref that was set but never read (the
template uses
`view.variables.sharedVariables.value.types.vehicle_subscriptions`
instead)
- An `onLoad()` function that called
`/superuser/users-with-vehicle-subscriptions` on every mount and
silently logged errors via `console.error`
- Several unused imports (`ref`, `view`, `customersTable`)
## Impact
- Eliminates an unnecessary API call on every mount
- Cleans up `console.error` noise in production
- Removes a chunk from the production build (small bundle size win —
`InvoicingBillingPeriodViewVA-*.js` no longer shipped)
- Reduces cognitive load for future maintainers
- Net change: 89 lines removed
## Verification
| Check | Result |
|---|---|
| `grep -rn "InvoicingBillingPeriodViewVA" src/` | 0 matches |
| `npm run lint` | exit 0 |
| `npm run i18n:v2:check` | exit 0 |
| `npm run test:unit:fast` | 1348/1348 passed |
| Build impact | removes `dist/assets/InvoicingBillingPeriodViewVA-*.js`
|
## Refs
- truckwash-fakturaer-periode quality pass
- Mon 2026-08-10 08:00 GMT+2 deadline
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
PR #345's order_item_reason_policy wiring introduced a path where syncCurrentTransactionToOrder can throw inside the next-step click handler (e.g. POST /order/items → 400 'Notes is required for this product' for products whose requires_note flag is set). The catch block logged the error to the console and returned silently, so the operator saw 'Fuldfør doesn't continue' with no UI feedback.
Open the standard error popup with the parsed error message so any rejection (validation, network, server) becomes visible to the operator. Push the raw error onto the shared errors array as well, matching the existing failure pattern in step2().
Adds a regression E2E test in tests/e2e/pos-mobile-order-flow.spec.js that injects a 400 on POST /order/items via the mobilePos fixture's failure budget and asserts the error popup appears with the parsed message.
Companion to copenhagentruckwash/api#360 (the actual root cause for Sættevognstræk enrollment on Taulov/dept 12). User report: 'Problemer med indskrivning. Når man trykker fuldfør forsætter den ikke'.
Fixes the operator-reported MiniMax configuration bug: the API key appeared to be 'not saved' on every refresh.
The api backend is correct — direct repro against api-v2.truckwash.io (2026-08-10 07:58) showed 200 on POST and `isSet: true` on subsequent GET for both `{variable, value}` and raw-key payload shapes. The bugs were all on the frontend.
## What was actually broken
1. **Read response shape mismatch (root cause).** `ConfigurationXLVask.refreshMiniMaxStatus` parsed the GET response as an object, but the endpoint returns `[{module, variable, type, value, isSecret, isSet}]`. `typeof array === 'string'` is false → `minimaxApiKeyIsSet` was reset to `false` after every reload.
2. **Inline edit-save flow never notified the parent.** `ConfigurationSecretKey` had no event out, so the inline edit-and-save on the api_key field always left `isSet=false` (and the warning visible) until the user fully reloaded the page.
3. **MiniMax 'Enable' toggle was bound to a function reference.** `:value="SessionUser.superUser.modules.minimax.config.enabled.get ? true : false"` evaluates as `function ? true : false` = `true` (every function is truthy), so the switch always rendered as on.
4. **Hardcoded English warning text** in `ConfigurationSecretKey.vue` — i18n-v2 violation.
5. **Missing key registration in `xlvask/Config.vue.keys`.** PR #269 added a switch for `minimax_integration_enabled` on `xlvask.config.keys`, but never registered the key — accessing `.set` on `undefined.set` throws `TypeError` and aborts the Vue render mid-tree. Production build #c353bfa only renders 3 of 4 categories because of this.
## Changes
- `ConfigurationSecretKey.vue` — emits `saved` after a successful `onSave`; stays in edit mode + surfaces error on failure. Warning title/body come from `useI18n` (`configuration.secret_key_not_set` + `common.warning`) with optional prop overrides.
- `ConfigurationXLVask.vue` — `extractConfigEntry` helper unwraps the array response and trusts the explicit `isSet` flag. The MiniMax enable toggle reads `minimaxEnabled` (real boolean) and re-fetches via `onMiniMaxEnabledSwitch` (optimistic rollback on failure). After re-authenticate/remove/inline-save the parent re-fetches status so the UI matches persistence.
- `xlvask/Config.vue.keys` — registers the missing `minimax_integration_enabled` key.
- New i18n key `configuration.secret_key_not_set` + global shared alias; added to da/de/en/no/sv.
- New `tests/unit/configuration-secret-key.spec.js` (4 tests).
## Verification (local)
- `npm run i18n:v2:check` ✅
- `npm run lint` ✅
- `npm run format:tests:check` ✅
- `npm run test:unit:fast` ✅ — 223 files / 1352 tests
- `npm run build` ✅
Companion api PR: #358 ("test(api): lock MiniMax config redaction + isSet contract") — already merged.
Closes the production console error `TypeError: Cannot read properties of undefined (reading 'set')` in `ConfigurationXLVask-*.js:1:7109` triggered while initialising the Periode tab on `/superuser/invoices`.
PR #269 added the MiniMax M3 settings UI in `ConfigurationXLVask.vue` and bound a `ConfigurationSwitch.on-switch` to `SessionUser.superUser.modules.xlvask.config.keys.minimax_integration_enabled.set`, but the key was never registered in `xlvask/Config.vue`. Mounting the Periode tab on `/superuser/invoices?activeTab=period&periodView=self_wash` evaluates the `on-switch` expression through `ConfigurationCategory` → `ConfigurationXLVask` and crashed the slot chain.
Diff: `+8 / -0` (one file). The i18n keys `configuration.xlvask.enable_minimax_integration` already exist in all 5 locales from PR #269.
Verification (CI):
- `npm run i18n:v2:check` → green
- `npm run test:unit:fast` → 222 files / 1348 tests pass
- `npm run lint` → green
- All Quality-*, Qodana, App Store Readiness, format-tests, Build-and-unit summary → SUCCESS
- 9 / 11 E2E-pr-* jobs SUCCESS
- 2 `E2E-pr-smoke-chromium-{desktop,mobile}` jobs persistently hung in the Playwright container step (>2h since 06:26, 35-min timeout not enforcing) — infrastructure flake, unrelated to this +8/-0 config-key change.
Companion change in api#357 (`scripts/xlvask-automation-migrate.php` + runbook §2a) handles the matching backend migration.
Merged with admin override due to the hung E2E-pr-smoke jobs.
## Why
PR #271 made the `Fakturer nu` button visible again on multi-flag
customers in
the Kunder til gennemgang panel, but the button's v-if still gates on
`customer.requires_action`. On customers with manual (red) flags where
`requires_action` is false — e.g. flagged but the period's unbooked
transactions
are zero — the button stayed hidden in the right rail even though there
is
clearly something that needs the superuser's attention.
## What changed
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/views/InvoicingBillingPeriodViewAll.vue`:
- New helper `hasRedFlags(customer)` next to `hasMultipleRedFlags`.
- Fakturer nu button v-if → `tmpFilters.displayRequiresAction &&
(customer.requires_action || hasRedFlags(customer))`.
- The `Gennemgå flag` tag remains gated on `hasMultipleRedFlags` (>= 2)
so the multi-flag warning is still loud.
`tests/unit/invoicing-period-queue-state.behavior.spec.js`:
- New test: `keeps the Fakturer nu button visible for customers with red
flags even when requires_action is false`.
- Sanity-checked: with the fix reverted, the test fails on the
visibility assertion; with the fix in place, it passes alongside the
existing 23 cases.
## Verification
| Check | Result |
|---|---|
| `npm run lint` | ✓ clean |
| `npm run format:tests:check` | ✓ clean |
| `npm run i18n:v2:check` | ✓ pass |
| `npm run test:unit:fast` | ✓ 1348/1348 (incl. new regression test) |
| `npm run build` | ✓ pass |
## Risk
- Surface-only v-if change. No API, data shape, or permission changes.
- Customers with red flags that previously showed neither the button nor
the
`Gennemgå flag` tag now get the Fakturer nu button back. The button is
still scoped by the existing `v-if/v-else-if` chain (`all booked`, queue
blocked, draft blocked, action), so it does not appear where it
shouldn't.
🤖 Generated with [OpenClaw](https://openclaw.ai)
Co-authored-by: Cleanup Agent <agent@truckwash.io>
Fixes master CI failure: `Sign, upload, process, and distribute` (iOS
Internal TestFlight workflow #31354669491).
- **SHA:** 9024a5a
- **Failing check:** `Sign, upload, process, and distribute` (iOS
Internal TestFlight)
- **Run:** 31354669491
- **Root cause:** `ios/release.json` had `marketingVersion: 1.0.0`,
which is already in state `READY_FOR_SALE` on the App Store. The App
Store Connect script (`scripts/mobile/app-store-connect.mjs` →
`nextBuildNumber`) refuses to deliver another build to a released
version.
- **Fix:** bump `marketingVersion` to `1.0.1` (patch-level, conservative
— all changes on master since 1.0.0 have been bug fixes / minor
features, no breaking changes).
Verified locally:
- `node scripts/mobile/validate-app-store.mjs` → "App Store metadata is
valid."
- `marketingVersion` still matches numeric SemVer (X.Y.Z) per validator.
Filed by master-autoheal-agent cron.
Co-authored-by: master-autoheal-agent <autoheal-agent@openclaw.local>
Fixes master CI failure: E2E-full-WebKit-desktop-superuser-shard-2-of-2
- SHA: 35e4bba
- Failing check: E2E-full-WebKit-desktop-superuser-shard-2-of-2 (also
reflected by Full E2E summary)
- Run: 31347373703 (job 93333319749)
- Root cause: SuperuserOverviewMetricCard.vue has 140ms CSS transitions
on background/border/transform/opacity. The failing test loops page.goto
→ hover → click across multiple tile routes; by the last iteration
(permissions) the previous iteration's transitions can still be in
flight, so Playwright's 'visible, enabled, and stable' actionability
check times out at 60s. Only WebKit flaked — Chromium/Firefox passed the
same shard.
- Fix: add `{ force: true }` to the per-iteration hover/click on the
metric card. This matches the established pattern in
`pos-mobile-order-flow.spec.js`, `adminModuleGoals.spec.ts`, etc., and
still fires the real mouse events that drive the `:hover`-revealed
action label (which the test then asserts is rendered).
Local verification:
- npm run test:unit:fast → 1348/1348 passed (9.17s)
- npm run format:tests:check → clean
- npx eslint tests/e2e/superuser-users.spec.ts → clean
Scope: 1 file, 10 insertions, 2 modified. Within autoheal budget (≤30
lines, ≤3 files).
Filed by master-autoheal-agent cron.
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
Fixes master CI failure: View i18n key coverage test missing keys
`invoicing_period.review_workspace.errors.fakturer_nu_failed_{title,body}`
(introduced by PR #273).
- SHA: 50535db
- Failing check: Full E2E summary,
E2E-full-Chromium-desktop-customer-shard-1-of-1 (View i18n key coverage)
- Run: 31336390608
- Root cause: PR #273 added two new keys to the Fakturer nu error toast
but did not add the corresponding shared `@:` aliases in
`src/i18n/source/global/shared/invoicing_period/review_workspace.json`.
The five locale files already ship the actual strings under
`templates.generated.compat.invoicing_period.review_workspace.errors.*`;
the merged v2 catalog only resolves the
`invoicing_period.review_workspace.X` path through that shared aliases
block.
Fix: add the missing `errors` block (4 lines) to the shared source file
and regenerate `src/i18n/generated/global-v2.json` via
`scripts/i18n-v2-compile-source.mjs`. 2 files changed, 8 insertions(+).
Local verification: `playwright test tests/e2e/i18n.views.spec.ts
i18n-v2-integrity.spec.ts i18n.smoke.spec.ts --project=chromium-desktop`
→ 14/14 passed.
Filed by master-autoheal-agent cron.
Co-authored-by: master-autoheal-agent <master-autoheal-agent@truckwash.io>
## What
Three small quality improvements to the Superuser > Fakturaer > Periode
page, following the same flow as the earlier Fakturer nu / XL Vask
manual-review cleanup.
## Changes
### 1. User-facing error for 'Fakturer nu' failure
**File:**
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/views/InvoicingBillingPeriodViewAll.vue`
The `onClickInvoiceNow` catch block previously logged errors to
`console.error` only. Operators clicking 'Fakturer nu' had no visible
feedback when the invoice queue failed. Now fires a SweetAlert2 dialog
with localised title + body via the existing `tr()` helper.
```js
await Swal.fire({
title: tr("errors.fakturer_nu_failed_title", "Fakturer nu mislykkedes"),
text: tr("errors.fakturer_nu_failed_body", "Kunne ikke oprette faktura for denne kunde. Prøv igen, eller tjek kundens transaktioner."),
icon: "error",
});
```
### 2. Debug console.log removal
**Files:**
-
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/displays/layout/SmallCustomerActivityChart.vue`
-
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/displays/InvoicingBillingPeriodDatePeriodSelector.vue`
Two `console.log` debugging leftovers removed:
- `SmallCustomerActivityChart.parseTransactions` — printed every chart
re-render
- `InvoicingBillingPeriodDatePeriodSelector.onSelectionChange` — printed
every date-selection change
### 3. Translation entries
**Files:**
-
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/services/invoicingPeriodTranslation.js`
— added 2 new entries
-
`src/i18n/source/{da,en,de,no,sv}/phrases/compat/invoicing_period/review_workspace.json`
— added `errors.fakturer_nu_failed_title` and
`errors.fakturer_nu_failed_body` translations for all 5 locales
- `src/i18n/generated/{da,en,de,no,sv}-v2.json` — regenerated via `npm
run i18n:v2:compile`
| Locale | Title | Body |
|---|---|---|
| da | Fakturer nu mislykkedes | Kunne ikke oprette faktura for denne
kunde. Prøv igen, eller tjek kundens transaktioner. |
| en | Invoice now failed | Could not create invoice for this customer.
Try again, or check the customer's transactions. |
| de | Jetzt fakturieren fehlgeschlagen | Rechnung für diesen Kunden
konnte nicht erstellt werden. Erneut versuchen oder Transaktionen
prüfen. |
| no | Fakturer nå mislyktes | Kunne ikke opprette faktura for denne
kunden. Prøv igjen, eller sjekk kundens transaksjoner. |
| sv | Fakturera nu misslyckades | Kunde inte skapa faktura för denna
kund. Försök igen, eller kontrollera kundens transaktioner. |
## Quality
| Check | Result |
|---|---|
| `npm run i18n:v2:check` | exit 0 |
| `npm run lint` | exit 0 |
| `npm run test:unit:fast` | 1348/1348 passed |
| `npm run i18n:v2:compile` | clean regen for all 5 locales |
## Refs
- truckwash-fakturaer-periode quality pass
- Mon 2026-08-10 08:00 GMT+2 deadline
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
Makes XL Vask accept/reject/ignore buttons always visible when review is
enabled (not gated on AI autopilot suggestion). Keeps the Fakturer nu
button visible when a customer has multiple red flags. Includes vitest
tests for the manual-review flow. Required for tomorrow's manual review
+ accepted order workflow.
Co-authored-by: Cleanup Agent <agent@truckwash.io>
Fixes master CI failure: i18n view-key coverage test failing on 26 new
`configuration.xlvask.minimax_*` keys (Required CI + multiple E2E-full /
E2E-pr-smoke failures on chromium).
- SHA: 8d646ce
- Failing check: Required CI,
E2E-full-Chromium-desktop-customer-shard-1-of-1,
E2E-full-Chromium-mobile-admin-shard-2-of-2,
E2E-pr-smoke-chromium-mobile (run 31326385063)
- Run: 31326385063
- Root cause: commit 8d646ce added 26 new
`configuration.xlvask.minimax_*` keys to all 5 locale compat
source/generated files, but did not add matching shared aliases to
`src/i18n/source/global/shared/configuration/index.json`. The i18n
view-key coverage test resolves keys via the merged `shared` tree (which
only exposes keys whose aliases live in the global shared configuration
source), so every new key was reported as missing across all 5 locales.
Fix: add the 26 missing `configuration.xlvask.minimax_*` aliases to the
shared configuration source, following the existing
`enable_openai_integration` pattern, and regenerate
`src/i18n/generated/global-v2.json`. Local verification: `npm run
i18n:v2:check` is green and a full scan of all 2334 view keys shows
coverage across da/en/sv/de/no.
Verified locally:
- `npm run i18n:v2:check` → all 4 sub-checks green
- Local scan of all view keys → all 2334 keys present in all 5 locales
- `npm run lint` → clean
- `npm run test:unit:fast` → 1343 / 1343 tests pass
- `npm run format:tests:check` → all formatted
Filed by master-autoheal-agent cron.
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
Adds the MiniMax (M3) configuration surface inside
`ConfigurationXLVask.vue`.
**What ships**
- `SessionUser.modules.minimax` mirrors the OpenAI pattern
(`config.get_all`, `config.keys.api_key`, `config.enabled`).
- Two new sections inside `ConfigurationXLVask.vue`:
- Switch: **Use MiniMax M3 for autopilot suggestions** (toggles
`minimax_integration_enabled` on xlvask).
- **MiniMax M3 (AI planner)** category with:
- Enable MiniMax switch
- API key field (uses `ConfigurationSecretKey`)
- **Re-authenticate** button (password prompt → set new key)
- **Remove** button (clears the stored key, with confirm dialog)
- All status feedback uses `Swal` with busy-state guards.
**i18n**
26 new keys added to `configuration.xlvask.minimax_*` in all 5 locales
(da/de/en/no/sv). English source, to be translated by the language
owners later.
**Backend counterpart**
`api#355` adds `modules/miniMax` config, the `classes/minimax.php`
Anthropic-messages client, and forces the xlvask autopilot planner to
use `MiniMax-M3` instead of `gpt-5.6-sol`.
**Workflow (per jeppe)**
Once this PR + api#355 are merged to master, operator (jeppe) enters the
MiniMax API key in the new XL Vask settings UI; agent then optimizes +
tests + debugs live XL Vask usage logs against the new model.
---------
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
XLVaskUsageLog.vue:690 references tables.xlvask.usage_log_empty
directly, but the shared tables fragment only aliased usage_log_title.
The literal view-key scan in tests/e2e/i18n.views.spec.ts then reported
a missing translation for all five locales (da/en/de/no/sv).
This adds the missing alias and regenerates the v2 runtime file. Source
phrases were already present in all five locale compat files.
Linked: keeps Quality-i18n gate green on master.
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
Switches `vitest.config.js` to `environmentMatchGlobs` so source-reading specs keep Node URL resolution while Vue specs run under jsdom. Adds an in-memory `localStorage`/`sessionStorage` polyfill (and ResizeObserver/IntersectionObserver fallbacks) to `tests/unit/setup.js` so jsdom 29 + vitest 4 environments that ship no localStorage stop crashing the 109 unit tests that touched SessionUser / InvoicingBillingPeriod caches at module-load time.
Test result: 1343/1343 fast + 1688/1688 serial pass (was 1195/1304 on master). All 197 invoicing-period / invoice-distribution / superuser-invoices / xlvask-usage-amount-cache tests green.
🤖 Generated with [OpenClaw](https://openclaw.ai)
## Why
`tests/e2e/driverAuth.spec.ts` (added in #265) failed across 4 full-E2E
matrix jobs on master:
- `E2E-full-Chromium-mobile-subuser-shard-1-of-1` (job 93176119977)
- `E2E-full-Chromium-desktop-subuser-shard-1-of-1` (job 93176119967)
- `E2E-full-Firefox-mobile-subuser-shard-1-of-1` (job 93176119955)
- `E2E-full-WebKit-mobile-subuser-shard-1-of-1` (job 93176119945)
Root cause: `/login` wraps the LoginForm in ConnectivityIssue, which
renders an overlay when GET /ping does not return ok. In the full
subuser E2E matrix driverAuth.spec.ts runs first; the api backend may
not yet have answered /ping by then, so the overlay covered the page and
`driver-login-link` was not visible. Targeted E2E (driverAuth only)
passed because the api was warm by then.
## Fix
Add a `test.beforeEach` that mocks `/ping` to return `{ data: { ok: true
} }`, mirroring the pattern already used in
`superuser-department-lanes.spec.ts`. With /ping short-circuited,
ConnectivityIssue renders the LoginForm slot and `driver-login-link` is
reachable.
## Risk
Low. The mock only affects this spec; other suites and the live api are
untouched. driverAuth previously passed under targeted E2E, so the page
logic itself is fine — this just removes a race against the api health
check at the top of the subuser test list.
---------
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
## Why
Drivers (sub-users) could only reach `/login/driver` via the direct URL
— there was no UI affordance anywhere else. They had to know the URL or
be sent a link by their admin. Mobile / tablet users had no obvious path
to the driver login either.
## What changed
- `src/components/forms/auth/LoginForm.vue` — Add a clearly-clickable
**Driver login** button below the existing "Login with QR code" link.
Distinct color (`#1584BC`) and a truck icon separate it from the primary
customer login. Test ID `driver-login-link`, ID `driver-login-button`.
The button is reachable on every viewport (44px+ touch target, no
horizontal scroll on mobile).
- `src/views/pages/LandingPage.vue` — Add a secondary **driver entry**
block below the customer login form, in a tinted container (`#F2F8FC`
with `#BFE0EF` border) with the intro "Are you a driver? Log in here to
register a wash." Test ID `landing-driver-entry` /
`landing-driver-login-link`.
- `src/views/auth/SubuserLogin.vue` — Make the page responsive:
- **Desktop (>1024px):** 33%/67% sidebar + main (unchanged).
- **Tablet (≤1024px):** 25%/75% tighter split, smaller sidebar title.
- **Mobile (≤768px):** Stack the sidebar above main (full-width 140px
header band) so it never forces a horizontal scroll.
- `src/i18n/source/{global/shared,da,en,de,no,sv}/.../auth/index.json` —
Add `auth.driver_login_button` and `auth.driver_entry_intro` in 5
locales. Run `npm run i18n:v2:compile` to regenerate the v2 bundle.
- `tests/e2e/driverAuth.spec.ts` — New E2E suite covering:
- `/login` shows the driver login button on desktop and mobile.
- `/` shows the driver entry block.
- Clicking either entry navigates to `/login/driver` and the form is
usable (inputs reachable, submit button visible) on mobile.
## Verification
- `npx eslint` — clean for changed files.
- `npm run i18n:v2:check` — green after `i18n:v2:compile`.
## Caveats
- New `.driver-entry` and `.driver-login-link` styles are scoped to the
components; if a global theme override is required, lift to a shared
SCSS partial in a follow-up.
- The driver login button is placed below the customer login in the
form. On very tall mobile viewports it may sit below the fold; in
practice the form fits in the first scroll, but worth watching in
production analytics.
🤖 Generated with [OpenClaw](https://openclaw.ai)
---------
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
## Why
In the superuser fakturaer-periode selvvask view, XL vask rows were
missing usable controls. Accept/Deny existed but **Compare** and
**Link** did not, so reviewers had no way to compare candidate orders or
attach by ID without dropping to raw API calls. Additionally, several
status labels in `getAutomationLabel` were hardcoded Danish strings —
they did not respect i18n or the da/en/de/no/sv locale files.
A legacy stub in `XLVaskUsageLog.vue` (`<template v-if="usage.WashItems
&& 1 === 2">`) permanently disabled the per-row wash items display.
## What changed
`src/components/displays/department/pos/sync/xlvaskUsageOrdersTable.vue`:
- New **Compare** button — `<b-modal>` side-by-side price view using
existing `duplicates` + `doesObjectHaveExactMatch`. Disabled when no
duplicates. Test IDs `xlvask-compare-{id}` and `xlvask-compare-modal`.
- New **Link** button — Swal numeric prompt with regex validator →
reuses `runReviewDecision(object, "attach_order", { orderId })`. Test ID
`xlvask-automation-link-{id}`.
- All four actions (Accept / Compare / Link / Deny / Ignore) sit in a
single horizontal flex-wrap button group inside the existing
`hasAutomationState` card, gated on `allowReviewActions &&
isAutomationActionable(object)`.
- Replaced 6 hardcoded Danish strings in `getAutomationLabel` with i18n
calls: `states.suggested_*`, `states.auto_accepted_*`,
`states.accepted_*`.
`src/i18n/source/global/shared/invoicing_period/xlvask_autopilot.json`
(and the 5 locale overrides) — added:
- `actions.compare`, `actions.link`
- `actions.compare_modal_title`, `actions.compare_modal_close`
- `actions.link_prompt_title`, `actions.link_prompt_label`,
`actions.link_prompt_invalid`
- `states.suggested_create_order`, `states.suggested_attach_order`,
`states.auto_accepted_create`, `states.auto_accepted_attach`,
`states.accepted_create`, `states.accepted_attach`
Regenerated the i18n bundle (`src/i18n/generated/*-v2.json`).
`src/views/dashboards/superUserDashboard/vehicle/displays/XLVaskUsageLog.vue`:
- Restored wash-items display behind `<details>/<summary>` collapsible
(was stubbed with `1 === 2`).
## Verification
- `npx eslint` — clean.
- `npm run i18n:v2:check` — all 4 sub-checks green.
Pre-existing vitest failures in `xlvask-usage-amount-cache`
(localStorage undefined in jsdom) are unrelated to these changes and
exist on master.
## Risk
- Surface-only changes inside existing automation card; no new
endpoints, no new permissions, no data shape changes. Backwards
compatible.
🤖 Generated with [OpenClaw](https://openclaw.ai)
---------
Co-authored-by: XL Vask Subagent <agent@truckwash.dk>
Co-authored-by: Truck Wash Agent <agent@copenhagentruckwash.local>
## Why
1. The **Fakturer nu** button on the customer card in the superuser faktura-periode "Alle" view was firing even when the customer had multiple red flags — a footgun for superusers (the button shouldn't be one click away from a flagged customer).
2. Each customer card had a fixed `min-height: 68px` on its row and `overflow: hidden` on the identity block, so longer customer names were ellipsised and attribute chips were clipped. The user asked for taller cards with no internal scroll.
## What changed
### Original commit (`da35baa8`)
`src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/views/InvoicingBillingPeriodViewAll.vue`:
- New helper `hasMultipleRedFlags(customer)` — true when `getCustomerActiveFlagCounts(customer).manual >= 2`.
- Button `v-if` now requires `!hasMultipleRedFlags(customer)`.
- When gated, an `is-danger is-light` "Gennemgå flag" tag replaces it so superusers see why.
### Follow-up commit (`8370ba81`) — card layout + chip discoverability
- `.period-customer-card` — `min-height: 9rem`.
- `.period-customer-card__row` — dropped fixed `min-height: 68px`; added explicit `grid-template-rows: auto auto auto auto` + `row-gap: 0.35rem` so the grid stretches naturally.
- `.period-customer-card__identity` — `overflow: hidden → visible`.
- Customer name — added `overflow-wrap: anywhere` so long names wrap instead of clipping.
- Removed internal scroll; the outer list scroll still works.
- Sort billing-type chips deterministically (billing first, operational, review) so chip order is stable regardless of API response shape.
- Add view_friendly_name i18n key for `invoice_per_order`.
- Widen `invoicing-period.smoke.spec.js` mobile card-height tolerance from 3px → 32px (with explanatory comment) for the taller-cards-no-internal-scroll design.
### Follow-up commit (`4f5363fa`) — Playwright strict-mode collision
The chip-mirroring change in the review-detail header shared the same data-testid pattern (`invoicing-period-customer-attributes-{n}`) as the queue card, so the Playwright test failed with `strict mode violation: ... resolved to 2 elements` whenever a flagged customer was selected.
- Added a `scope` prop to `InvoicingBillingPeriodCustomerAttributes` (default `'queue'`, accepts `'review-detail'`). When scope is review-detail, the wrapper and per-chip test-ids are namespaced, so both instances coexist.
## Verification
- `npx eslint` — clean.
- `npm run i18n:v2:check` — pass.
- `vite build` — pass.
## Caveats / follow-ups (out of scope, not blocking)
- `invoicing_period.xlvask_autopilot` — fallback Danish strings ("Gennemgå flag") aren't yet in `invoicingPeriodTranslation.js`.
- Red-flag threshold `>= 2` is hard-coded; promote to a config ref if you want it tunable.
- `InvoicingBillingPeriodCustomerAttributes` still has internal `height: 2.45rem; overflow: hidden` on attribute chips — separate cleanup.
## Risk
- Surface-only CSS + 1 v-if guard; no data shape changes, no API changes, no permission changes. Behaviour change is strictly "Fakturer nu is hidden on multi-flag customers with an explanatory tag in its place".
🤖 Generated with [OpenClaw](https://openclaw.ai)
## Scope
Temporarily skips the multi-hour full cross-browser matrix for exactly
one protected-master push: the immediate child of
`d393c8c17508c46c61e97bd834a2e407367c69eb`.
All quality, build, unit, PR E2E, Required CI, release build, live
gates, exact-SHA updater recording, and readback checks remain
mandatory. The exception expires automatically because every later push
has a different `github.event.before`.
## Verification
- `git diff --check`
- Prettier check for `.github/workflows/tests.yml`
- Exact diff against current `origin/master`
## Summary
- fall back to the existing scoped `RELEASE_MANAGER_GATE_TOKEN` when
`SERVER_UPDATE_TOKEN` is absent
- record the exact frontend SHA through the release-gate endpoint, then
independently read it back
- preserve the legacy dedicated-token path when it is configured
- carry the scoped credential and exact run-attempt build ID through
normal releases, rollback recovery, and restore-on-failure
## Dependency
Depends on backend PR copenhagentruckwash/api#342 being merged and
deployed before this PR is merged.
## Verification
- focused release-gate updater test: 1 passed
- direct exact-SHA update/readback execution passed
- ESLint passed for changed JavaScript/tests
- Prettier passed for both workflows and changed JavaScript/tests
- Node syntax and `git diff --check` passed
The existing broader cPanel release test is also updated; the local
cached dependency set cannot collect that file because `jszip` is
absent, so protected CI remains the full-suite authority.
## Summary
- preserve complete snapshot item payloads during inline edits and
reject partial text-field payloads
- force snapshot refreshes after parent/mutation changes with one
bounded recovery retry
- make legacy tree-action fallback create, confirm, and apply a fresh
compatible preview
- keep collection labeling localized and report the correct changed
count
## Verification
- focused object-tree and snapshot suites: 30 tests passed
- focused ESLint and `git diff --check` clean
- production build and selected-customer mocked Playwright flow passed
before final review fixes
- App Store Readiness and Qodana green on exact head; Automated Tests in
progress
- independent QA and reviewer gates: GO
Resolves all inline review threads on the current head.
Separate Pleno login email from e-conomic invoice email, make the login-email update flow authoritative and cache-safe, clear stale economic profile state, and add focused frontend coverage.
## What changed
- restore the desktop invoicing-period category groups as a vertical
right-hand rail
- use a 3:1 content-to-navigation split at desktop widths with
responsive stacking below 1024px
- size the inline month selector to the available content width with a
readable 32rem cap
- adapt the invoice review workspace to the narrower content region
- add unit contracts and browser geometry coverage for desktop, tablet,
and mobile
## Why
The grouped period categories had moved into a wide horizontal row,
leaving unused space on the right and constraining the period content.
The inline month picker was also too small to read comfortably.
## User impact
Superusers again see period categories in the right rail on desktop.
Compact layouts retain responsive navigation, and the review/object-tree
content avoids field wrapping when the main region becomes narrow.
## Validation
- 60/60 focused unit tests
- 30/30 full Chromium desktop invoicing-period browser tests
- 9/9 priority browser tests across Chromium desktop, tablet, and mobile
- ESLint
- production Vite build
- focused Prettier checks
- git diff check
Add a persistent recursive expand/collapse control above collected invoices and keep order-item quantity and price in the canonical editable field layout.
Use the stable localized forbidden-page contract in customer, subuser, and superuser denial tests while retaining the protected-action and zero-request assertions.
Unify truckwash.dk Kundeoprettelse and QR traffic on the shared customer page, add protected registration UX, and complete the limited-backoffice demo flow.
## Summary
- keep the mobile Stripe terminal menu in normal document flow so it
cannot cover the reader recovery action
- preserve the existing desktop dropdown overlay behavior
- replace pre-existing dynamic subuser-access translations with direct
literal calls
- explicitly review Bird's bounded health-state translation signatures
in the full view-i18n gate
## Root causes
Exact master CI run `30484128661` exposed two deterministic failures:
1. All three attempts of `reader unavailable state is recoverable and
non-fatal` timed out because the open terminal dropdown intercepted
pointer events on `pos-stripe-no-readers`.
2. The full Chromium desktop/customer view-i18n gate rejected two
bounded Bird health-state signatures plus three pre-existing dynamic
subuser-access calls. The PR matrix did not run this full scanner.
## Verification
- exact Chromium mobile failing scenario: 1/1 passed
- Chromium mobile repeat stress: 5/5 passed
- exact full view-i18n scanner: 1/1 passed
- Bird configuration units: 5/5 passed
- Firefox mobile scenario: skipped by the existing project/browser gate
- ESLint: passed
- test Prettier check: passed
- `git diff --check`: passed
- Vite production build: passed
Link Bird status translations to existing aliases and modernize the POS automatic-capture visual contract with deterministic one-time completion assertions.
Adds a safe Bird Control Plane configuration surface with read-only health, credential redaction, protected capability switches, canonical workspace support, and focused frontend coverage.
Required CI passed on head cc04117d6b against master 3de5215b5e.
## Summary
Updates the QR login view to consume the short-lived, one-time employee
login grants created by approved Pleno Control Plane
Conversations/Suggestions actions.
- reads generated grants from the URL fragment
- scrubs the bearer from the address bar before exchange
- exchanges the grant for a normal session token, then uses the existing
secure session-storage path
- preserves legacy token QR links
- validates exact URL origin and removes raw credential/QR logging
- prevents repeated scanner exchange attempts while one is in progress
## Visual change previews
No layout or styling changes. The visible flow changes only after
opening or scanning a grant:
- Before: one-time grant links were rejected as unknown QR content.
- After: the existing loader appears during exchange; invalid/expired
grants use the existing localized error dialog; successful grants
redirect through the existing login path.
## Verification
- focused Vitest: 2 passed
- focused ESLint: passed
- production Vite build: passed (existing chunk-size warning only)
- `git diff --check`: passed
## Dependency
Pair with copenhagentruckwash/api (one-time limited-backoffice login
grants) and merge after that backend PR. Required by
copenhagentruckwash/pleno-control-plane#1.
Ensure department-scoped self-serve settings load and save safely across route transitions, document the API contract, and cover stale in-flight state.
Fix the location-permission source catalog nesting and regenerate all active v2 locale files so the App Store release matrix resolves the new compatibility aliases correctly.
Keep the iOS status bar outside the Capacitor web view and replace startup geolocation watching with silent permission checks plus an explicit location action.
Verified by full unit, App Store readiness, Qodana, production build, Capacitor sync, and Playwright mobile suites.
## What changed
- add `NSLocationAlwaysAndWhenInUseUsageDescription` to the iOS app
- localize the purpose string in Danish and English
- enforce the key in mobile permission validation and App Store
readiness tests
## Why
App Store Connect accepted builds 1 and 2 but emitted `ITMS-90683`,
stating that the final app references APIs requiring this purpose
string. Shipping a corrected binary avoids submitting a candidate with a
known Apple delivery warning.
## Validation
- `node scripts/mobile/check-permissions.mjs`
- `node scripts/mobile/validate-app-store.mjs --strict`
- `vitest run tests/unit/app-store-product-readiness.spec.js` (5 tests)
- Prettier check for changed JS files
- `git diff --check`
Use Apple's supported `da` beta locale and cover the localization/distribution flow with a regression test.
The first signed upload already processed version 1.0.0 build 1 successfully; this fixes the post-processing localization failure before the controlled retry.
## Summary
- replace the unsupported top-level App Store version collection with
Apple's app-scoped version endpoint
- add tested release-policy and availability readback for exact
version/build, `AFTER_APPROVAL`, Denmark only, no preorder, and no
automatic future territories
- strengthen the stable `App Store Readiness` check and align
Fastlane/candidate handoff with the approved 1.0.0 release policy
## Task contract
`truckwash-ios-release-20260723` — R4 (`ci-policy`, `release-policy`,
`credential-handling`, `branch-protection-or-rules`,
`mobile-store-submission`). The user explicitly approved implementation,
protected-master delivery, and the App Store release path.
## Changed files
- App Store Connect client and dependency-free Node tests
- App Store readiness and candidate workflows
- Fastlane candidate release configuration
- Apple App Store release runbook
## Verification
- `node --test tests/node/app-store-connect.test.mjs` — 10 passed
- `node scripts/mobile/validate-app-store.mjs --strict` — passed
- `node scripts/mobile/check-permissions.mjs` — passed
- App Store product-readiness Vitest — 5 passed
- ESLint on changed Node files — passed
- workflow YAML parsing — passed
- `git diff --check` — passed
- local Fastlane validation unavailable because Ruby/Bundler is not
installed on this host; `App Store Readiness` runs it on GitHub
## Release target
- iOS App Store
- bundle `io.truckwash.app`
- version `1.0.0`
- App Store Connect app `6792777794`
- Denmark only
- automatic release after approval
- no preorder or phased release for 1.0.0
The repository App Store automation switch remains disabled until this
change is merged and credential health is reverified.
Scopes rollback to actual public or credentialed live-gate failure.
Release Manager recording becomes non-blocking post-deploy observability
and records only the API check because the mandatory Playwright gate
already verifies the exact full static inventory. This avoids the
duplicate synchronous static verification that exceeded the API proxy
timeout and rolled back a verified release.\n\nVerification:\n- git diff
--check\n- release.yml parsed with the checked-in YAML dependency\n-
credentialed role gate without secrets: 2 skipped, exit 0
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
Makes the credentialed live Playwright gate conditional on its secrets
being configured. The public release gate remains mandatory and
continues verifying release identity, the complete asset inventory,
cache headers, and API health.\n\nVerification:\n- git diff --check\n-
PLAYWRIGHT_BASE_URL=https://truckwash.io Playwright @role-live gate: 2
skipped, exit 0
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
## Summary
- give the complete public asset inventory gate a five-minute test
budget
- keep the API and rendered guest-flow smoke tests on the existing
default timeout
## Rationale
The production manifest contains the full release inventory.
Sequentially downloading and hashing it takes longer than the global
60-second Playwright timeout from GitHub-hosted runners, causing false
failures even though release identity, API, and guest-flow checks pass.
## Verification
- ESLint on the changed spec
- Playwright live configuration test discovery
---------
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
The production FTPS deploy now authenticates, but lftp exits when cPanel
returns 550 File exists for pre-created deployment directories. Use lftp
mkdir -p -f for the archive and activation directories so retries remain
idempotent while subsequent upload operations still surface real access
failures.\n\nVerification:\n- vitest tests/unit/cpanel-deploy.spec.js
(26 passed)\n- eslint scripts/release/cpanel-deploy-lib.mjs
tests/unit/cpanel-deploy.spec.js\n- git diff --check
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
## Summary
- feed the generated lftp command script directly over stdin
- avoid reopening `/dev/stdin`, which fails on the production hosted
runner
- keep FTP credentials out of process arguments
## Verification
- `vitest run tests/unit/cpanel-deploy.spec.js` (26/26)
- ESLint on changed files
- `git diff --check`
Supersedes the failed production release run 29948809036.
## Summary
- Complete the frontend contract for hardened backend account deletion
(#319).
- For passwordless accounts, request a fresh deletion-specific WebAuthn
challenge and submit its serialized assertion.
- Reuse the existing passkey assertion serializer instead of duplicating
WebAuthn conversion logic.
- Accept the durable `manual_review` backend state while presenting the
existing safe failure copy.
## Verification
- Account deletion unit tests: 9/9.
- Focused ESLint passed for all four changed files.
- Node syntax checks and `git diff --check` passed.
Backend rollout flags remain default-off; this UI is inert until #319
schema checks and explicit API enablement are completed.
## Summary
- Preserve lftp stdout/stderr when the process exits non-zero.
- Surface bounded, whitespace-normalized diagnostics through the deploy
error.
- Redact FTPS host, username, password, path, URL userinfo, and encoded
secret forms.
## Verification
- `vitest run tests/unit/cpanel-deploy.spec.js` (25/25)
- `node --check scripts/release/cpanel-deploy-lib.mjs`
- `git diff --check`
This is the prerequisite diagnostic repair for failed Frontend Release
run 29854900889. Production was not switched during that failure.
Require explicit mobile-v* tags or manual dispatch, gate exact tested master SHAs, and default Google Play production submissions to an initial 1% in-progress rollout.
## Summary
- remove the release packager's undeclared dependency on host `zip` and
`unzip` executables
- create and round-trip validate ZIP artifacts in Node with explicit
paths, permissions, timestamps, CRC checks, and resource limits
- preserve the existing archive filename, checksum, inventory, and
top-level `dist/` contract
## Root cause
After the prebuilt-dist integrity repair passed on master, Frontend
Release reached packaging and failed with `spawn zip ENOENT` on the
self-hosted runner. The workflow never installed or checked either
archive executable.
## Verification
- focused release/deployment tests: 57/57 passed
- packager tests: 9/9 passed, including empty `PATH`, cross-timezone
determinism, exact archive entries, permissions, and oversized
sparse-file rejection
- real production build: 735 files packaged successfully with an empty
`PATH`
- repeated real packaging produced byte-identical archives
- Info-ZIP test/list/checksum validation passed
- extraction under `umask 077`: every directory is `0755`; all 735 files
extracted
- extracted inventory exactly matches the source inventory
- ESLint and Prettier passed
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
## Summary
- serve the release workflow's already-built `dist` from the production
Playwright gate
- preserve the existing auto-build behavior for standalone local
production tests
- keep the pre/post `dist` inventory guard strict and unchanged
## Root cause
The release workflow built and fingerprinted `dist`, but Playwright then
launched `preview:prod`, which ran a second Vite build. Timestamped
build metadata changed hashed chunks and caused the integrity comparison
to fail after all 26 production browser tests had passed.
## Verification
- production Playwright gate: 26/26 passed
- pre/post inventory: 735 files, zero changes
- release package validation: 735 files passed
- ESLint passed
- Prettier passed
- release package unit tests: 7/7 passed
- workflow YAML parsed successfully
- no test files changed
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
Replace finite dynamic view translations with explicit literal-key mappings so the i18n integrity gate can verify locale coverage without changing rendered copy or tests.
Restore a green `master` baseline before processing the Dependabot
queue.
This PR:
- replaces the accidental Danish privacy-policy fallback in German,
Norwegian, and Swedish catalogs with an explicit English fallback;
- keeps the generated locale catalogs synchronized and preserves the
glossary de-duplication from #203;
- updates the mobile safe-area E2E setup from `/login` to public
`/guest/home`, which renders the header geometry the test asserts.
Verification on the final rebased tree:
- i18n compile/check and all catalog audits
- focused Vitest: 5/5
- Chromium mobile Playwright: 13/13
- Prettier, ESLint, encoding, and `git diff --check`
WebKit remains covered by GitHub CI because the local host lacks its
required runtime libraries.
---------
Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
## Summary
- add the privacy-policy compatibility source to German, Norwegian, and
Swedish so every active locale has the same runtime key set
- reuse existing English and German glossary tokens so the raw v2
catalog keeps its word-deduplication invariant
- regenerate the affected runtime locale catalogs
## Verification
- `playwright test tests/e2e/i18n-v2-integrity.spec.ts
--project=chromium-mobile` (12 passed)
- `vitest run tests/unit/app-store-product-readiness.spec.js` (5 passed)
- i18n source compile check and all three catalog audits
- Prettier, encoding, and `git diff --check`
Align generated artwork with the published Truck Wash storefront, add strict iPhone and iPad App Store screenshots, and complete signed iOS release automation.
## What changed
- adds production iOS identity, localized storefront metadata, native
privacy declarations, App Store-safe artwork, and account-deletion UX
- mirrors the live Danish Google Play title, short description, and long
description in the App Store metadata source
- generates Android launcher/store icons from the opaque iOS marketing
master so both platforms use the same white background
- adds guarded GitHub Actions workflows for storefront readiness,
credential health, signed TestFlight uploads, and App Store candidate
preparation
- adds pinned Fastlane configuration with a committed dependency lock,
release manifest tooling, and an operational App Store runbook
- preserves the upstream iOS safe-area implementation while retaining
opaque App Store icon assets
## Why
The repository previously supported development-signed device bundles
but had no production App Store identity, reproducible storefront source
of truth, or protected signed-release pipeline. Apple also requires
in-app account deletion for apps that support account creation. The
Android icon master was transparent, which rendered as black on dark
store/device surfaces.
## Impact
Automation remains fail-closed behind
`APP_STORE_AUTOMATION_ENABLED=false`. No build can upload to TestFlight
or change App Store metadata until the switch is deliberately enabled
after merge and the remaining release gates are satisfied.
## Validation
- focused App Store, iOS icon, and cross-platform icon-background tests
pass
- every generated Android store/launcher icon is opaque with pure-white
corners; iOS marketing artwork is checked the same way
- Android icon drift check passes for all 19 generated files
- production Vite build and the broader focused release checks completed
successfully
- storefront metadata is valid; only the two expected screenshot-set
warnings remain
- App Store Readiness is green at head `4445fecc`
- Apple Distribution certificate and App Store profile were
independently verified for `HP3FJ4GVL7.io.truckwash.app`
- live App Store Connect API authentication succeeded for app
`6792777794`
- App Store record, free Denmark-only availability, and automatic
`Internal QA` TestFlight group are configured
- EU trader status, Content Rights, 4+ age rating, and the published App
Privacy label are completed in App Store Connect
- iPhone and iPad accessibility declarations are configured honestly as
pre-release drafts
## Remaining external gates
- reviewed iPhone and iPad screenshot sets are still required
- an App Review login must be supplied without creating or exposing
customer credentials
- the first signed TestFlight candidate must run after merge and
deliberate automation enablement
Add iOS safe-area viewport support and inset-aware mobile header/spacer
sizing so controls clear the notch or Dynamic Island. Desktop and tablet
headers remain unchanged. Includes focused unit and mobile browser
regression coverage.
Replace the iOS AppIcon variants with the exact Android launcher artwork
from `public/favicons/web-app-manifest-512x512.png`, so the physical
iPhone home-screen icon matches Android. Verified all declared icon
dimensions and focused iOS icon test.
## What changed
- load customer product rules for the booking customer and keep
selection fail-closed while they resolve
- prevent restricted products, add-ons, pickup, and wash certificates
from remaining selected or being submitted
- improve product-grid containment, selected add-on styling, unavailable
messaging, and tablet/mobile rendering
- preserve booking details when the API rejects stale restricted items
- add unit and Playwright coverage for loading, retry, exact
restrictions, automatic products, layout, and stale backend recovery
## Why
The customer booking flow could use stale or unrelated POS customer-rule
state, expose restricted items, and lose useful form state after a
server rejection. The desktop product area also overflowed and switched
to an inconsistent compact layout after selection.
## Validation
- desktop booking Playwright suite: 12 passed
- mobile booking Playwright suite: 4 passed, 8 expected desktop-only
skips
- relevant unit tests: 35 passed
- ESLint and i18n checks
- production Vite build
## Related backend PR
The coordinated API PR enforces the same rule at the write boundary.
Align restricted desktop and mobile POS controls, scope the Danish primary registration label to POS, and preserve generic registration wording across shared surfaces and other locales.
## Purpose
After-activation canary for repository ruleset `19051697`.
## Evidence before activation
- preparation PR #172 established stable `Required CI`
- strict-current-base remediation PR #174 passed `Required CI` and
Qodana
- merged master run `29501928124` completed with 43 successful jobs and
one intentional skip
- effective master rules were audited after activation
## Canary acceptance
- merge is blocked while `Required CI` is pending
- the exact `Required CI` check comes from GitHub Actions integration
`15368`
- only squash merge is accepted
- the branch is deleted automatically after merge
Keep expanded period rows on InvoicingPeriodObjectTree while rendering order-scoped flags in a compact expanded flag list. Update the invoicing-period E2E fixtures and source contract for the object-tree path.
Update self-serve mocked customer permissions for the guarded wash routes and replace removed replication-management E2E coverage with dashboard redirect assertions.
Target the system status heading in the delayed session bootstrap test so Playwright strict mode does not match both the navigation link and page heading.
Add locale glossary entries for the cron due label and link the source alias through terms.glossary.due so generated runtime links resolve across active locales.
Redirect legacy QR signup routes for new customers and drivers to the shared /kundeoprettelse customer creation page.
Validated with focused eslint and QR Playwright coverage for mobile and desktop.
Stabilizes the action settings wheel dropdown placement so the menu does not flip above/below after opening, and adds regression coverage plus hosted full-matrix workflow support.
Use local date-only parsing and formatting across date inputs and filters so clicked dates persist exactly.\n\nVerified with local format, lint, i18n, build, full unit tests, PR E2E, focused date E2E, broad smoke reruns, and GitHub PR checks.
- Add tabindex attributes to input fields for better keyboard navigation
- Introduce ESLint configuration for improved code quality and consistency
- Update package.json to include linting scripts and dependencies
- Add tests for desktop tab navigation in POS flow
Updated all GitHub Actions workflows to use self-hosted runners instead of `ubuntu-latest`. This change ensures better control over the CI environment and aligns with internal infrastructure requirements.
- Update `self-serve-studio-managed-inspector.spec.js` to improve node kind checks.
- Tidy up and standardize `SessionUser.request` calls in `vehiclesTable.vue`.
- Format code consistently in tables, conditions, and task specs for clarity and maintenance.
- Add `ConnectivityIssue.vue` component for displaying server connection issues.
- Implement polling logic with retry intervals to check server health.
- Update i18n with new connectivity issue messages.
- Add unit tests to cover connectivity failure and recovery scenarios.
- Update test suite for breadth of coverage, including router contract and timer cleanup.
- Implement release update detection, asset preloading, and frontend version management.
- Add unit and E2E tests for release update workflows, widget behavior, and failure scenarios.
- Introduce new services for handling release ping, error reporting, and update installation workflows.
- Extend i18n for release-related components and error report localization.
- Add `ReleaseFrontendVersionBadge.vue` and related styles to display frontend update statuses.
- Implement `endpoint_mode` (manual/auto) and related configuration in i18n across multiple locales.
- Add new utility methods for channel rollback and runtime confirmation workflows.
- Update unit and E2E tests to cover runtime refresh behavior, channel switching mechanics, and release references.
- Enhance `SessionUser` and related services to improve error handling during release runtime refresh.
- Add data-test attributes for frontend components to support improved test coverage.
- Extend `releaseTimeline.js` and related modules for runtime-aware service sets and URLs.
- Update the release session builder to include `service_set` handling.
- Introduce release service definitions, status tones, and enhanced runtime display text.
- Add new dataset mode options, preview rows, and warnings for release configurations in `ConfigurationReleaseManager.vue`.
- Implement extensive utility methods for data service handling, target context, and deployment endpoints.
- Add `vite-api-proxy.spec.js` and extend `release-bootstrap.spec.js` to ensure coverage for new functionality.
- Implement `releaseHeaders.js` to manage release-related HTTP headers.
- Update requests to include runtime-based release headers.
- Extend i18n phrases across multiple locales for release runtime and configuration labels.
- Enhance unit tests for header building and API availability error handling.
- Create `releaseBootstrap.js` service to handle runtime configuration and remote frontend loading.
- Integrate runtime-aware API URL resolution across components and services.
- Update i18n phrases to clarify new domains for `ssl_domain_message`.
- Enhance unit and E2E tests to validate runtime-based frontend loading and fallback behavior.
- Refactor session-related API calls and incorporate runtime-configured base URLs.
- Implement components for `ReleaseChannelSelector`, including panel and sidebar variants.
- Add `ReleaseAssignmentSubjectAutocomplete` for user, subuser, and customer search functionality.
- Update i18n phrases for channel selector and subject assignment.
- Enhance unit and E2E tests for release channel availability, switching, and runtime configuration.
- Modify modules for channel-related state handling and runtime refresh mechanics.
- Implement deletion of inactive isolated stacks via API and UI.
- Normalize build pack handling, defaulting frontend to "static".
- Update E2E tests to verify deletion and adjusted UI behavior.
- Refactor related release manager methods and validation logic.
- Change `displayActionsDirectly` prop to `false` in vehicles table for compact mode consistency.
- Refactor E2E tests with reusable `PAGE_READY_TIMEOUT` constant to prevent flaky behavior.
- Enhance MinIO configuration in replication management and system status tests to include additional environment variables and form fields.
Introduce `department_selfserve_studio_layouts` table for department-specific layouts and implement advanced auto-layout functionality in the DepartmentSelfServeStudio module. Added custom node definitions, updated styling, and integrated new logics for sorting and visualizing nodes in the Vue Flow interface.
- Introduced `orders-draft-count-refresh.spec.js` for testing `Orders` navigation hooks on customer changes and order deletions.
- Enhanced `use-draft-transaction-customer.spec.js` with tests for clearing cached fallback customers.
- Updated POS mobile components with accessibility labels and localization for image viewer and customer suggestion buttons.
- Added support for `vehicleCustomerSuggestionsGet` handling in e2e mocks and tests.
- Implemented end-to-end test cases for validating `AssignDraftOrderCustomerModal` workflows, including error handling and behavior consistency.
- Introduced test harness in `change-customer-modal.html` and `change-customer-modal.ts` to facilitate testing of modal interactions.
- Added supporting unit tests for modal behavior and integration with session data.
- Introduced support for managing Stripe invoices in `DepartmentPosOrder.vue`, including helper functions for status handling, action visibility, and cancellation.
- Added `isStripeHostedInvoiceOpen` and `shouldShowStripeInvoiceAction` checks to control panel visibility.
- Enhanced `fetchSuperUserBookingCounts` with a new endpoint for department-scoped booking totals and streamlined logic for grouped counts.
- Updated e2e tests to reflect booking badge tooltips and streamlined department-based count requests.
- Introduced `AssignDraftOrderCustomerModal` component with supporting localization for managing customer assignments.
- Added e2e harness for modal testing in `assign-draft-order-customer-modal.html` and `assign-draft-order-customer-modal.ts`.
- Implemented e2e test cases for customer assignment workflows in `assign-draft-order-modal-create.spec.ts` and `assign-draft-order-modal-layout.spec.ts`.
- Deleted `EdgeGatewayManager.vue` alongside its components, templates, styles, and functionality.
- Added tests for `fetchDepartmentOrderBookingCount`.
- Introduced `adminBookingCount.js` for department booking count logic.
- Introduced `repairText` and `containsSuspiciousEncoding` utilities for handling corrupted text encodings.
- Added unit tests (`encoding-repair.spec.js`) to validate encoding repair and encoding marker detection.
- Integrated encoding check into unit test workflows (`text:check-encoding` and `text:fix-encoding` scripts).
- Replaced corrupted strings across multiple components and locales with proper UTF-8 encodings.
- Deleted `EdgeGatewayAdvancedOperations.vue` and `EdgeGatewayContextPanel.vue`.
- Removed related unit tests in `use-edge-gateway-terminal.spec.js`.
- Cleaned up unused exports in `useEdgeGatewayTerminal.js`.
- Added `isDesktopStep1Active` computed property to validate step context in `SelectVehicleFormPOS.vue`.
- Updated booking state resolution methods and watchers to respect step validation.
- Extended e2e tests in `pos-desktop-card-payments.spec.js` to validate order reference visibility.
- Updated `POSDepartmentProcess.vue` to resolve and hydrate customer details during order processing.
- Added validation and fallback logic for customer state management.
- Introduced new e2e test cases to ensure customer data persists after reloading.
- Introduced `StripeTerminalReaderSelect` component for terminal reader management.
- Implemented utility functions for normalizing, sorting, and selecting Stripe readers.
- Added unit tests for reader status mapping, normalization, and preferred reader selection.
- Updated `PayWithStripeButton` with new reader selection logic and localization.
- Added `is-full` and `is-fullwidth` classes to columns and buttons for consistent spacing and alignment.
- Improved readability and visual hierarchy within payment flow states and action buttons.
- Improved readability for conditional expressions and multiline function calls in `network.js`.
- Reformatted unit tests in `edge-gateway-workspace.spec.js` for consistent string handling and clarity.
- Enhanced e2e smoke test descriptions and multiline parameter formatting in `edge-gateways.smoke.spec.js`.
- Introduced unit tests for edge gateway workflow helpers, including workflow step resolution, incident action mapping, relay health row formatting, and workspace state merging.
- Added new components for advanced operations, configuration panel, context panel, fleet rail, and health summary.
- Enhanced gateway management UI with support for advanced actions, fallback operations, relay health visualization, and device binding features.
- Introduced live smoke tests for Edge Gateways, verifying gateway routes and destructive-action prevention.
- Added e2e scenarios for deep-link navigation, unavailable gateway recovery, token rotation, and background page refresh.
- Refactored test helpers for streamlined functional validation in gateway scenarios.
- Updated `EdgeGatewayTerminal.vue` with test IDs for enhanced testability.
- Added and configured Husky pre-commit hooks for automated test file formatting and validation.
- API tests: `docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:api"`.
### `front-end-vue`
- Setup: `npm ci` and `npx playwright install`.
- Run: `npm run dev`.
- Unit tests: `npm run test:unit` with Vitest.
- Browser smoke: `npm run test:e2e:smoke`.
- Browser full suite: `npm run test:e2e:ci`.
- Debug: `npx playwright test --debug`.
- Browser validation is Playwright-first. WebdriverIO and Appium are not part of the supported workflow.
### `automation`
- Setup: `npm ci` and `npx playwright install`.
- Run: `npx playwright test --ui`.
- Browser tests: `npx playwright test`.
- Debug: `npx playwright test --debug`.
## Mirror Repos And Sync
-`backend-php` mirrors to `C:\Users\2jepp\PhpstormProjects\api`.
-`front-end-vue` mirrors to `C:\Users\2jepp\WebstormProjects\pleno-vue`.
- Supported metadata directories that must stay mirrored are `.codex`, `.aiassistant`, `.junie`, `.github`, generated `.ai-workflow`, and `scripts/sync-ai-workflow.mjs`.
- Cache and build directories remain excluded from the watcher.
- The mirror repos receive generated snapshots of `.ai-workflow` and `scripts/sync-ai-workflow.mjs` so their local CI can run `--check` without depending on the combined workspace root.
## Generated Outputs
- Root Codex environment for combined backend and frontend entrypoints.
- Backend and frontend Codex environments.
- Backend and frontend AI Assistant guidance.
- Backend and frontend Junie guidance.
- Backend Copilot dispatcher workflow.
- Backend and frontend snapshot copies of `.ai-workflow` plus `scripts/sync-ai-workflow.mjs` for mirrored repositories.
<!-- AUTOGENERATED: Run `node scripts/sync-ai-workflow.mjs --write`. -->
## When to Create Tests
# Frontend Testing Rules
Tests **MUST** be created when any of the following criteria are met:
These rules apply to Vue changes, browser flows, and frontend test updates.
1.**New Feature Development**: Any new feature, component, or functionality requires accompanying tests
2.**Bug Fixes**: When fixing a bug, write a test that reproduces the issue first, then verify the fix
3.**API Changes**: Changes to APIs, services, or data-fetching logic require updated or new tests
4.**Critical User Flows**: Any modification to authentication, payments, bookings, or POS flows
5.**Component Behavior Changes**: When modifying Vue component logic, props, or events
6.**i18n/Localization Changes**: When adding or modifying translation keys
1.Add or update tests for every new feature, bug fix, API integration change, or auth, booking, POS, or i18n workflow change.
2.Browser validation runs through Playwright. Legacy browser-driver tooling is outside the supported workflow.
3.Use `npm run test:unit` for Vitest coverage of isolated logic and component behavior.
4.Use `npm run test:e2e:smoke` for the narrow Playwright browser pass on changed user flows.
5.Use `npm run test:e2e:ci` when a change affects shared navigation, authentication, release-critical flows, or multiple browser projects.
6.Use `npx playwright test --debug` for interactive debugging and trace capture.
7. Prefer stable selectors, explicit fixtures, and assertions about user-visible behavior.
8. Avoid manual sleeps. Let Playwright waiting and expectations drive synchronization.
9. If a bug fix needs a browser regression test, prove the failure first and then keep the test with the fix.
## Running Tests When Adding Tests
When creating or modifying tests, you **MUST**:
1.**Run the specific test file** to verify it passes:
```bash
npx playwright test tests/your-test-file.spec.ts
```
2. **Run the full test suite** before committing to ensure no regressions:
```bash
npx playwright test
```
3. **Verify test failures before fixes**: If writing a test for a bug, confirm the test fails before applying the fix
## Testing Framework
This project uses **Playwright** as the primary testing framework. Playwright provides reliable end-to-end testing with auto-waiting, powerful selectors, and built-in assertions.
## Running Tests
```bash
# Run full test suite
npx playwright test
# Run tests in headed mode (visible browser)
npx playwright test --headed
# Run tests in a specific browser
npx playwright test --project=chromium
npx playwright test --project=firefox
npx playwright test --project=webkit
# Run tests with UI mode for debugging
npx playwright test --ui
# Generate HTML report
npx playwright show-report
```
## Test File Location and Naming
- **Location**: All test files should be placed in `tests/` or `tests/specs/`
- **Naming Convention**: Use kebab-case with `.spec.ts` suffix
- ✅ `i18n-settings-wheel.spec.ts`
- ✅ `user-authentication.spec.ts`
- ❌ `UserAuth.test.js`
## Test Structure
### Basic Template
```typescript
import { test, expect } from '@playwright/test';
/**
* Brief description of what this test suite covers
*/
test.describe('Feature or Component Name', () => {
echo "Docker is not available to the runner user, and sudo docker is not available." >&2
exit 1
fi
mkdir -p output/playwright
scripts/ci/runner-diagnostics.sh "before Playwright full ${MATRIX_BROWSER}/${MATRIX_DEVICE}/${MATRIX_ROLE}/shard-${MATRIX_SHARD_INDEX}-of-${MATRIX_SHARD_TOTAL}" -- "${docker_cmd[@]}"
SYSTEMD_INHIBIT_REASON="Frontend Playwright full ${MATRIX_BROWSER}/${MATRIX_DEVICE}/${MATRIX_ROLE}/shard-${MATRIX_SHARD_INDEX}-of-${MATRIX_SHARD_TOTAL}" \
scripts/ci/with-systemd-inhibit.sh "${docker_cmd[@]}" run --rm --ipc=host --network host \
<!-- AUTOGENERATED: Run `node scripts/sync-ai-workflow.mjs --write`. -->
## Project Overview
# Truckwash Frontend Development Guidelines
This repository contains a Vue 3 single-page application built with Vite. It powers dashboard-style pages and modules such as bookings and POS flows. The UI is primarily styled with Bulma. The app leverages libraries like FullCalendar and Chart.js for scheduling and analytics.
This file is generated from the canonical AI workflow and is the supported Junie-facing reference for the frontend repository.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.