Commit graph

670 commits

Author SHA1 Message Date
Codex Review Integration
c7388ba2d9 fix(dashboard): map breakdown type keys and open performance drill-downs
The Work Order Breakdown object from the backend serializes its keys
without JsonPropertyName, so they arrive lowercase (pm/emergency/reactive/
overdue/other). The mapper copied them straight into `status`, which the
card uses as both label and the `types` drill-down id, and
`workOrderTypeDrilldownSearch` only accepts canonical WOType values — so
every breakdown row rendered lowercase and was inert (SH-354). Route both
mapping branches through a normalizer that maps type keys back to their
canonical labels case-insensitively; `other` is not a WOType, so it stays a
labelled, non-drillable "Other" row, and unknown values (legacy array-shape
lifecycle labels) pass through unchanged.

Dispatcher Performance gated its drill-down on `completionRate > 0`, so a
dispatcher with assigned work but no completions yet was inert here while
drillable from Workload. The drill-down filters by dispatcher + range and
never uses the rate, so gate on identity instead.

Also mock useDashboardTrend in the dashboard page test so it no longer
issues a real request that failed quietly in jsdom.
2026-09-16 20:40:33 -03:00
Codex Review Integration
1b17cbec01 feat(dashboard): build dashboard experience (SH-336) 2026-09-16 19:37:15 -03:00
Alexandre Brandizzi
07734d8361
SH-138: manage ordered site contacts (#191)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* feat(locations): derive site areas from state

* chore(locations): keep ticket keys out of source comments

* feat(locations): manage ordered site contacts

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-16 14:53:58 -03:00
Alexandre Brandizzi
30c43a4d86
SH-281: group vendor directory rows by company (#188)
* fix(vendors): add accessible trade overflow tooltip

* fix(vendors): add accessible trade overflow tooltip

* refactor(vendors): satisfy row maintainability gate

* feat(vendors): group directory rows by company

* chore(vendors): trigger SH-281 review checks

* test(vendors): align company directory visuals

* test(vendors): complete company visual baselines

* fix(vendors): keep empty states in viewport

* test(vendors): align centered empty baseline

* fix(vendors): use grouped directory endpoint

* test(vendors): follow grouped directory endpoint

* test(vendors): refresh combined visual snapshots

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-16 14:40:24 -03:00
Arthur Bassi
fc3e7591dc
fix(work-orders): add Unscheduled option to Advanced Filters Date range (#181)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* fix(work-orders): add Unscheduled option to Advanced Filters Date range

* fix(work-orders): page unscheduled results server-side

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-09-15 19:11:35 -03:00
Alexandre Brandizzi
ebc401dcb7
SH-273: derive Site Area from State (#190)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* feat(locations): derive site areas from state

* chore(locations): keep ticket keys out of source comments

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 16:38:18 -03:00
Alexandre Brandizzi
861f820715
SH-279: replace Vendor trade overflow title with MUI Tooltip (#187)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* fix(vendors): add accessible trade overflow tooltip

* refactor(vendors): satisfy row maintainability gate

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 16:23:14 -03:00
Alexandre Brandizzi
80be702733
feat(vendors): structure the address into Street/City/State with autocomplete (#176)
* feat(vendors): structure the address into Street/City/State with autocomplete

The Vendor form carried one free-text "Address (optional)" line, with City,
State and Zip already present but hidden behind display:none, and a separate
"Google Maps URL" input someone had to paste into by hand.

Street Address, City and State are now three required fields. Typing three
characters in Street Address offers up to four candidates; picking one fills
all three at once, and typing without picking stays plain free text. The
Google Maps URL input is gone — the location is derived from the address, the
Street Address itself is the link in view mode, and a keyless map preview
renders once all three parts are present. Zip stays in the payload but out of
the form; the ticket scopes the visible set to three.

The suggestion algorithm, candidate cities and copy are ported from the
approved prototype rather than invented, so dev and design agree on what a
dispatcher sees. Suggestions are deterministic for a given input on purpose:
a reshuffling list moves a row out from under the pointer mid-click.

Test fixtures that predate the requirement now carry an address, so each test
still fails for the reason it is about. The two drawer tests asserting the
stored-URL "Open in Google Maps" row are rewritten to the behaviour that
replaced it.

Delivers SH-271.

* feat(work-orders): show the vendor location map in the Vendor dialog

The last of SH-271's five acceptance bullets. The Work Order Vendor dialog
gets one composed address line from the vendor dropdown payload, not the
structured parts the form and detail drawer hold, so the preview takes the
line directly — it is saved data either way, and the completeness rule exists
to stop a map of half-typed input, not to reject a stored address.

The dialog's hand-built maps URL now goes through the shared helper, so the
link and the preview cannot drift apart.

* test(vendors): update the browser specs and pixel baselines for the new address

`npm run verify` does not run Playwright, so the first push went out with the
browser suite still asserting the UI this ticket removes. Three assertions
were stale: the combined "Address (optional)" input, the "Google Maps URL
(optional)" input, and the detail drawer's separate "Open in Google Maps"
row — now replaced by the Street Address itself being the link, checked
against the derived href. A fourth test created a vendor without an address,
which the new requirement blocks; it fills one, so the test still fails only
for the reason it is about.

Baselines regenerated in mcr.microsoft.com/playwright:v1.61.1-noble, the image
CI uses — macOS font rendering produces different pixels. Exactly three of the
sixteen were rewritten (vendor add, edit, detail); the rest, including every
Work Orders shot, are byte-identical, which is the evidence that this change
stays inside the surfaces it claims.

* test(vendors): keep the map preview out of the pixel baselines

The visual suite mocks `**/api/**` and nothing else, so the address map
preview's iframe reached maps.google.com for real. Whether that frame paints,
and what it paints, depends on the network and on what Google serves that
minute — which is why `vendor-edit` failed in CI at 18178 differing pixels
while passing in a container that could not reach Google. Regenerating the
baseline would not have fixed it; it would have moved the flake.

Aborting the request pins the frame to a blank box, so the shot measures our
layout and nothing else. The committed baselines are unchanged by this — they
were already correct — and a second container run with no --update passes
16/16, which is the evidence the shot is now stable rather than merely green
once.

* fix(vendors): complete structured address map flows

* test(vendors): align add visual baseline with CI

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 16:13:15 -03:00
dependabot[bot]
3f3af07f8e
chore(deps-dev): bump fast-uri (#166)
Bumps the npm_and_yarn group with 1 update in the / directory: [fast-uri](https://github.com/fastify/fast-uri).


Updates `fast-uri` from 3.1.5 to 3.1.7
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.5...v3.1.7)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-15 15:27:25 -03:00
renovate[bot]
21c3f985c1
chore(deps): update dependency vitest to v4.1.11 [security] (#174)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-15 15:11:42 -03:00
Arthur Bassi
da86297fb4
fix(work-orders): align sidebar and advanced filters with AAP (#185)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
* fix(work-orders): align sidebar and advanced filters with AAP

* test(vendors): scope Site locator exactly

* fix(work-orders): keep sidebar scope unchanged

* test(work-orders): refresh SH-220 filter baseline

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-09-15 14:05:18 -03:00
Adam Moussa
d88a2e7854
fix(observability): upload source maps under the client Sentry release (SH-342) (#189)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
Dev events bake shoc-frontend@<sha>. Stop tagging artifacts with Terraform
version_label so Sentry can symbolicate them.
2026-09-14 15:21:15 -04:00
Arthur Bassi
99df031f68
Merge pull request #175 from Sea-Haven-Industries/feat/SH-191-completion-freeze
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
feat(work-orders): consume completion freeze snapshot on the board
2026-09-14 11:03:04 -03:00
Arthur Bassi
1d0c4f8f8a
Merge branch 'dev' into feat/SH-191-completion-freeze 2026-09-14 10:22:06 -03:00
Arthur Bassi
15ea87df4f test(work-orders): expect frozen POC contact notes in mapper 2026-09-14 10:19:12 -03:00
Adam Moussa
29aecff2bb
fix(ci): hash the served index.html byte stream in CloudFront verify (SH-300) (#186)
Some checks failed
Frontend checks / Build and test (push) Has been cancelled
Frontend checks / governance (push) Has been cancelled
Frontend checks / Visual regression (push) Has been cancelled
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Has been cancelled
Capturing the curl body in "$(...)" strips the trailing newline, so the
served sha256 never matched dist/index.html and every release and rollback
verify polled to the budget and failed. Hash the response stream directly
and give the test fixture a trailing newline so the suite covers it.
2026-09-11 18:10:51 -03:00
Adam Moussa
c30e8aa74b
fix(ci): assert the baked API URL in served JS assets (SH-300) (#184)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
Vite puts VITE_API_URL in hashed JS, not index.html. Scan every
referenced /assets file and reject staging or localhost there too.
2026-09-11 19:38:07 +00:00
Adam Moussa
f23c60ccc2
fix(ci): skip duplicate verify on content CD and ignore origin timeout drift (SH-300) (#183)
* fix(terraform): ignore origin response_completion_timeout in the release plan guard (SH-300)

AWS returns 0 when the timeout is unset. The provider writes null on
origin_path updates, so the first real CD plan failed closed.

* fix(ci): drop duplicate verify from the content CD workflow (SH-300)

Frontend checks already runs verify on PRs and pushes. Removing the
validate job also requires dropping needs: validate so dispatch can run.

* fix(terraform): equate origin timeout 0 and null only (SH-300)

Numeric timeout changes still fail closed. Rename the filter so it is
not read as an after_unknown allowlist.
2026-09-11 19:17:36 +00:00
Adam Moussa
7716b4afc8
fix(ci): confirm release prefix with s3api head-object (SH-300) (#182)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Validate and deploy / Validate production build (push) Waiting to run
Validate and deploy / Deploy shoc-frontend-new-dev through Terraform (push) Blocked by required conditions
grep -q closed the aws s3 ls pipe after a successful upload and failed the deploy.
2026-09-11 18:26:19 +00:00
Adam Moussa
69c24c1c2c
feat(terraform): ship dev content CD through Terraform (SH-300) (#180)
* feat(terraform): ship dev content CD through Terraform (SH-300)

GitHub uploads immutable release prefixes; Terraform owns live publish.
Push-to-dev stays off until TERRAFORM_CONTENT_CD_ENABLED is set.

* fix(terraform): align release-plan guard flags and CloudFront verify IAM (SH-300)
2026-09-11 13:40:14 -04:00
Adam Moussa
b24e6f3b9a
fix(cdk): keep the auto-delete Lambda description off the site bucket (SH-300) (#179)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
* fix(cdk): keep the auto-delete Lambda description off the site bucket

* style(cdk): format the auto-delete Lambda path check
2026-09-11 13:21:00 -03:00
Adam Moussa
5b08bfa57b
Merge pull request #178 from Sea-Haven-Industries/feature/terraform-dev-adoption
feat(terraform): complete dev environment adoption (SH-300)
2026-09-11 11:33:41 -04:00
f532aa6059
feat(terraform): complete dev environment adoption (SH-300) 2026-09-11 11:22:28 -04:00
Adam Moussa
8b5281d357
ci(terraform-isolation): re-evaluate the gate on label changes (#177)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
* ci(terraform-isolation): re-evaluate the gate on label changes

* test(terraform-isolation): lock the ci.yaml label-event contract

* fix(terraform-isolation): do not treat terraform markdown as a mixed change

* fix(ci): do not skip Frontend checks on isolation label events

* ci(terraform-isolation): run label retriggers in a dedicated workflow

* fix: apply eslint formatting

* fix: apply additional missed eslint formatting
2026-09-10 20:45:49 -04:00
Adam Moussa
763b82a77d
Merge pull request #159 from Sea-Haven-Industries/feature/frontend-terraform-adoption
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Terraform and application changes are isolated (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
feat(terraform): adopt dev hosting into HCP Terraform, import-first (SH-300)
2026-09-10 19:59:08 -04:00
8ec91f0dac
ci: run the Terraform isolation gate as a job in the CI workflow 2026-09-10 19:37:27 -04:00
7ab6fa30e7
fix(terraform): lock provider hashes for linux and darwin platforms 2026-09-10 19:34:10 -04:00
0bc7e22884
docs(terraform): mark the isolation override as temporary 2026-09-10 19:22:43 -04:00
b71c0ad87b
docs: document the dev Terraform adoption runbook and gates
Two-phase runbook, ownership boundary, workspace invariants, rollback
per phase, and operational rules in terraform/README.md; CDK adoption
mode and the retired cd-cdk path in infra/cdk/README.md; gate matrix and
deployment section updates.
2026-09-10 19:15:14 -04:00
08da408a13
ci(governance): wire Terraform and CDK gates and isolate Terraform PRs
Governance now runs the import-plan checker tests, Terraform fmt and
validate for terraform/live/dev, the isolation gate tests, and the CDK
build, tests, and synth in both modes. A new terraform-isolation
workflow fails PRs that change terraform/** together with application
code; the terraform-isolation-override label is the reviewed exception.
Renovate gains the terraform manager.
2026-09-10 19:15:13 -04:00
87e79072ad
ci(deploy): make dev content deploy workflow_dispatch only
Remove the push-to-dev trigger and the org cd-cdk.yaml caller so CI no
longer runs cdk deploy during the adoption. The workflow assumes the
pinned dev role and runs the simple scripts/deploy-web.sh against a
pinned bucket and distribution, which keeps content deploys working
after CloudFormation relinquishes the stack outputs. Staging is
untouched.
2026-09-10 19:15:12 -04:00
82361e14b5
feat(cdk): add Terraform adoption retain mode
retainForTerraformAdoption=true adds the required ManageSiteInfrastructure
parameter, conditions the 13 transferred resources and the S3 auto-delete
custom resource on it, applies Retain policies, pins the live dev origin
ID, attaches the deploy boundary and HcpTerraformWorkspace tag, and
narrows the OIDC subject to StringEquals. Normal synthesis is unchanged;
template tests cover both modes.
2026-09-10 19:15:11 -04:00
78398482cf
feat(terraform): add dev root and import guard for HCP adoption
Port the reviewed dev root and environment-owned/inventory modules from
111eb556 with the 13 pinned dev identifiers. adoption_complete is pinned
to false in code; the root has no variables so a workspace variable
cannot change what applies. The tf-poc root, staging root, and tf-poc
map entries are dropped; staging constants stay only for the checker's
cross-environment negative tests.
2026-09-10 19:15:09 -04:00
Arthur Bassi
c7aec49f05 fix(work-orders): keep completion freeze on live registry edits 2026-09-10 18:47:32 -03:00
Arthur Bassi
1809694973 Merge branch 'feat/SH-191-completion-freeze' of origin into feat/SH-191-completion-freeze 2026-09-10 18:16:27 -03:00
Arthur Bassi
2fbf2ed380
Merge branch 'dev' into feat/SH-191-completion-freeze 2026-09-10 18:15:15 -03:00
Arthur Bassi
99c758872a fix(work-orders): extract helpers to satisfy governance complexity 2026-09-10 18:15:02 -03:00
Alexandre Brandizzi
73346371e5
Merge pull request #167 from Sea-Haven-Industries/feat/sh-298-sentry
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
Deploy / Upload private source maps (push) Blocked by required conditions
feat: add browser Sentry tracing (SH-298)
2026-09-10 15:52:28 -03:00
Arthur Bassi
116f65ca48 feat(work-orders): consume completion freeze snapshot on the board
Prefer FrozenSite, FrozenCompany, and FrozenPoc on Completed rows.
2026-09-10 15:41:01 -03:00
Codex Review Integration
fdd97c24f9 Merge branch 'dev' into feat/sh-298-sentry
Three conflicts, all where dev refactored code this branch had instrumented:

- api.ts — dev extracted the session-expiry helper into
  lib/auth/expire-session. Took dev's import, dropped the now-duplicate local
  copy, kept the tracing import.
- work-order-board-documents-api.ts — dev replaced the ky upload with
  uploadFormWithProgress, an XHR path that exists because ky's
  onUploadProgress streams the body and browsers refuse that over HTTP/1.1.
  Kept dev's helper and wrapped it in traceHttpOperation so the upload stays
  instrumented; neither change is lost.
- work-orders-api.test.ts — kept both mock surfaces, since the merged
  work-orders-api calls apiRequestRaw while other code uses the ky instance.

getMediaContent arrived from dev calling `api.get` directly, which this file
no longer imports; routed it through apiRequestRaw like its siblings, which
also brings it under tracing.
2026-09-10 14:44:12 -03:00
Arthur Bassi
b7d531f554
Merge pull request #173 from Sea-Haven-Industries/feat/SH-186-schedule-clear
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
feat(work-orders): persist Schedule On clear for SH-186
2026-09-09 18:31:17 -03:00
Arthur Bassi
1fdecdd45d Merge remote-tracking branch 'origin/dev' into feat/SH-186-schedule-clear 2026-09-09 18:18:11 -03:00
Arthur Bassi
8e0f7617aa
Merge pull request #172 from Sea-Haven-Industries/feat/SH-171-wo-documents
feat(work-orders): complete Extra Docs authorized attachment lifecycle
2026-09-09 18:17:59 -03:00
Arthur Bassi
117f7949f5 fix(work-orders): pass HTTP status into Extra Docs error helper 2026-09-09 18:05:03 -03:00
Arthur Bassi
15de3fca0a Merge remote-tracking branch 'origin/dev' into feat/SH-186-schedule-clear 2026-09-09 17:47:37 -03:00
Arthur Bassi
11743caa61 Merge remote-tracking branch 'origin/dev' into feat/SH-171-wo-documents 2026-09-09 17:46:41 -03:00
Arthur Bassi
a7d359ffc4
Merge pull request #171 from Sea-Haven-Industries/fix/SH-181-vendor-save-gate
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
fix(workorders): correct vendor save behavior
2026-09-09 17:46:19 -03:00
Arthur Bassi
eab83f6562 Merge branch 'dev' into feat/SH-171-wo-documents 2026-09-09 17:46:10 -03:00
Arthur Bassi
54671baf5c Merge remote-tracking branch 'origin/dev' into fix/SH-181-vendor-save-gate 2026-09-09 17:33:58 -03:00
Arthur Bassi
ef2ba9da1f
Merge pull request #170 from Sea-Haven-Industries/feat/SH-299-completion-doc-diag
fix: restore work-order completion media uploads
2026-09-09 17:33:04 -03:00