Commit graph

1161 commits

Author SHA1 Message Date
Adam Moussa
bd79617aa2
Merge branch 'main' into dev 2026-09-18 15:08:29 -04:00
ceecab5438
fix(cd): ignore githubdeploy description and retire leftover pointer CD
SCP denies UpdateRoleDescription on githubdeploy-*, so HCP apply cannot
rewrite the role description. Pointer workflows must not land on main.
2026-09-18 15:04:51 -04:00
Adam Moussa
c96a259365
refactor(cd): ship SPA content from GitHub on main (#220)
Some checks failed
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Has been cancelled
* ci(cd): convert SPA hosting to handbook HCP and GitHub content CD

Give HCP the bucket and CloudFront with an empty origin path. GitHub owns
bucket-root sync and invalidation so merge-to-main and a human staging tag
can deploy without creating HCP runs. G13 fails PRs that mix terraform/
with deployable application files.

* ci: run Frontend checks and Terraform CI on PRs to main and dev

Match backend 148 so a PR targeting origin/dev still gets the required
checks. Push remains main only.

* refactor(terraform): keep live/dev and live/staging as HCP roots

Leave the adopted working directories in place so this CD PR does not
retarget two live HCP workspaces. Flattening stays a later change.

* style: prettier terraform-validate.mjs

* fix(terraform): pin githubdeploy assume-role policy in import checker

Reject controlled role updates whose trust document is not the rendered
GitHub OIDC policy, matching the bucket-policy pin.
2026-09-18 14:30:20 -04:00
Adam Moussa
ff79c9d56e
Merge pull request #221 from Sea-Haven-Industries/dev
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
chore: promote current dev onto main
2026-09-18 14:25:41 -04:00
Codex Review Integration
84568dd737 refactor(workorders): extract board patch api module
work-orders-api.ts exceeded the 500-line godfile cap after adding
updatePoc. Move patchBoardField/updatePoc and their shared response
handling into work-order-board-patch-api.ts and re-export through
workOrdersApi, mirroring workOrderBoardDocumentsApi.
2026-09-18 15:03:59 -03:00
Codex Review Integration
3b1da21abb fix(workorders): preserve partial POC edits 2026-09-18 15:00:01 -03:00
Codex Review Integration
ff1a946e74 Merge remote-tracking branch 'origin/feat/ab/sh-292-notification-center' into HEAD
# Conflicts:
#	src/app/(protected)/workorders/_hooks/use-work-orders-list-page.ts
2026-09-18 14:46:02 -03:00
Codex Review Integration
5b0c758a9f fix(workorders): persist manual POC edits via dedicated POC endpoint (SH-379)
The UI dropped manual POC edits before they reached the API: the patch
mapper listed pocName/pocPhone/pocNotes as local-only keys and the
slide-over draft excluded them from Save, so the optimistic edit vanished
on refetch and the completion freeze captured the Site contact instead.

- Emit one composite POC op from table patches and route it through a new
  workOrdersApi.updatePoc (PATCH workorders/{id}/poc), reusing the board
  patch row/error contract (409 conflict with currentState, 422 validation).
- Include POC scalars in slide-over edit keys so dirty state and Save carry
  them; site dialog and slide-over now both persist POC edits.
2026-09-18 14:44:06 -03:00
Codex Review Integration
8b122ad71c fix: satisfy governance hook line limits 2026-09-18 14:38:27 -03:00
Codex Review Integration
75c2c1c1fa Merge remote-tracking branch 'origin/feat/ab/sh-292-notification-center' into HEAD
# Conflicts:
#	src/app/(protected)/workorders/_components/detail/use-slide-over-edit-state.ts
#	src/app/(protected)/workorders/_components/detail/use-work-order-slide-over.ts
#	src/app/(protected)/workorders/_components/detail/work-order-slide-over.tsx
#	src/app/(protected)/workorders/_components/list/work-orders-list-page-panels.tsx
#	src/app/(protected)/workorders/_hooks/use-work-orders-list-page.ts
2026-09-18 14:35:17 -03:00
Codex Review Integration
062a1e26c8 fix: resolve notification review findings 2026-09-18 14:23:43 -03:00
albrand
74e7c526e8 fix(notifications): re-open tab and match API mentions for event highlights
Re-apply the requested slide-over tab on every open via an open counter, so a
second comment/mention notification for the work order already on screen still
switches to Comments and re-scrolls to the highlighted comment. Treat a board
comment's mentions id array (plain @Name text) as a mention alongside encoded
@[id:name] tokens so mention items highlight and comment items exclude them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-18 14:01:55 -03:00
Codex Review Integration
de1c23b118 Merge remote-tracking branch 'origin/feat/ab/sh-292-notification-center' into feat/ab/sh-288-event-notifications 2026-09-18 13:54:07 -03:00
Codex Review Integration
edd2e7efe2 test(visual): refresh mobile navigation baseline for the notification bell 2026-09-18 13:52:00 -03:00
Codex Review Integration
299f471612 Merge commit '988c96c' into feat/ab/sh-288-event-notifications
# Conflicts:
#	src/components/notifications/notification-row.tsx
#	src/components/notifications/use-notification-center.ts
#	src/domain/notifications/utils/notification-target-url.ts
2026-09-18 13:43:48 -03:00
Codex Review Integration
ae941bc93d feat(notifications): open comment, mention, assignment and uplift items where they happened
Comment and mention items open the work order on the Comments tab with the
comments they were raised for highlighted; a grouped assignment opens the
dispatcher's own open queue; uplift decisions open the work order's uplifts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 13:42:13 -03:00
Codex Review Integration
988c96c42d fix(notifications): keep vendor reminder actions and refresh header baselines
No Vendor opens the work order form on vendor assignment and Vendor Conflict
links each work order, as the vendor reminders did. Header baselines include the
notification bell, and the top bar user menu moves to its own component to stay
within the function-size gate. The vendor e2e now covers the feed contract.
2026-09-18 13:34:12 -03:00
Codex Review Integration
33d0ab4fd6 test(uplifts): scope modal permission and date assertions to what they prove
The permission spec asserts the work order renders from the queue item
and, separately, that only the approved-on-WO breakdown degrades to
Unavailable. The Requested At assertion derives the local calendar day
so it holds in every runner time zone.
2026-09-18 13:02:11 -03:00
Codex Review Integration
dcf944d7dc SH-292: Notification Center bell panel and feed page
Header bell panel and /notifications page share one feed from GET /api/notifications: labeled sections with live counts, unread styling, session-only dismiss and clear all (acknowledge rows excluded), and deep links to the unassigned queue and a work order's tab via ?wo=&tab=.
2026-09-18 12:55:54 -03:00
Codex Review Integration
3c84d851c0 feat(uplifts): align uplift detail modal with SH-209
Two sections, Work order and Uplift request, divided by a single rule.
Work order shows Service, Vendor / Technician, Assigned Dispatcher and
Scheduled from the queue item, so it no longer fetches the work order
and no longer degrades to Unavailable for account-scoped staff. Uplift
request shows Requested By, Requested At, the justification in a
bordered block, the approved-on-WO breakdown and a horizontal
attachment row whose chips open the evidence in a new tab. Every field
renders data or an explicit placeholder. The footer shows Reject and
Approve for pending uplifts, Revoke for approved ones and nothing for
read-only records; closing is the header X.
2026-09-18 12:53:55 -03:00
npal
62e5d46b0f fix: address PR #224 review findings and extract task-template copy (SH-378)
Three real behavior deltas flagged in review, each closing a gap
against the "no behavior change" claim:

- use-vendor-portal-session.ts: add retry:false and
  meta:{suppressErrorToast:true} so an invalid/expired token fails
  fast with a single request and no duplicate global toast (this was
  also the root cause of the failing e2e test - the toast and the
  inline error message both had role="alert", tripping a strict-mode
  locator match)
- task-template-schema.ts: trim the name before validating so a
  whitespace-only name is rejected, matching the old manual
  form.name.trim() check
- task-template-detail-form.tsx: block Enter-triggered implicit
  submission on the Template Name / Description inputs, since the
  original page had no <form> element and Enter did nothing
- task-template-items-field.tsx: surface a visible error when a
  loaded item has empty text, since the schema already blocked save
  in that case but gave no way to see why; use-task-template-editor.ts
  now eagerly validates after loading a template so this reflects
  reality immediately instead of only after an unrelated edit

Also extract every user-facing string in the task-templates feature
into TASK_TEMPLATE_COPY (task-template-constants.ts) instead of
inline literals scattered across 5 files.

6 new regression tests cover all of the above; full suite (36 tests
across the 2 refactored areas) still green.
2026-09-18 10:46:16 -05:00
Alexandre Brandizzi
c9562650ca
Merge branch 'dev' into fix/ab/sh-364-inline-technician-registration 2026-09-18 11:59:16 -03:00
Alexandre Brandizzi
e780bafdd8
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-18 11:59:13 -03:00
npal
5645c7e02b Merge remote-tracking branch 'origin/dev' into refactor/dispatch-detail-modal-split-v2 2026-09-17 18:10:34 -05:00
npal
a93747f119 refactor(vendor-portal,settings): move state and fetch logic into hooks (SH-378)
vendor-portal-provider.tsx and task-templates.tsx mixed data-fetching,
state, and rendering in one file, with no caching and hand-rolled form
state. This is a pure refactor with no behavior change.

- vendor-portal-provider.tsx: replace manual useEffect/useState fetch
  with useVendorPortalSession (useQuery), closing the token race
  condition the old key={token} remount was working around
- task-templates.tsx: split into useTaskTemplateEditor hook plus 4
  presentational components; replace hand-rolled form state with
  react-hook-form + zod validation; replace the "new" string sentinel
  with a NEW_TEMPLATE_ID constant
- add 29 tests (hook, component, and full-page integration) confirming
  identical behavior to the original code
2026-09-17 18:05:06 -05:00
Alexandre Brandizzi
d6510b262e
Merge pull request #193 from Sea-Haven-Industries/fix/ab/sh-339-wizard-complete-image
Some checks failed
Deploy dev content / Deploy shoc-frontend-new-dev through Terraform (push) Waiting to run
Frontend checks / Build and test (push) Has been cancelled
Frontend checks / governance (push) Has been cancelled
Frontend checks / Visual regression (push) Has been cancelled
SH-339: Allow completing Reactive/Emergency WOs from the side panel after photo upload
2026-09-17 16:14:07 -03:00
Alexandre Brandizzi
5f2d120965
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 16:02:15 -03:00
Alexandre Brandizzi
29b75e18de
Merge pull request #203 from Sea-Haven-Industries/fix/ab/sh-368-completion-uploads
SH-368: preserve multipart upload Content-Type
2026-09-17 16:00:15 -03:00
Alexandre Brandizzi
1ee4bbef7e
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:46:18 -03:00
Alexandre Brandizzi
3058a96edb
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:46:15 -03:00
Alexandre Brandizzi
3312cdd938
Merge pull request #215 from Sea-Haven-Industries/feat/ab/sh-326-team-member
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
SH-326: add team member detail drawer
2026-09-17 15:44:22 -03:00
Codex Review Integration
28ff14d457 Merge remote-tracking branch 'origin/dev' into feat/ab/sh-304-services-registry-ui
# Conflicts:
#	src/test/lib/auth/user-utils.test.ts
2026-09-17 15:34:52 -03:00
Codex Review Integration
8a0a134238 style: format wizard-vendor-company-fields with prettier 2026-09-17 15:31:15 -03:00
Alexandre Brandizzi
bff5ed138b
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:30:22 -03:00
Alexandre Brandizzi
3a6f101776
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:30:20 -03:00
Alexandre Brandizzi
d53507731e
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:30:16 -03:00
Alexandre Brandizzi
73e59a0d9e
Merge pull request #213 from Sea-Haven-Industries/feat/ab/sh-336-dashboard
SH-336: Build dashboard experience
2026-09-17 15:28:18 -03:00
Codex Review Integration
abe28a3a7f Merge remote-tracking branch 'origin/dev' into fix/ab/sh-364-inline-technician-registration
# Conflicts:
#	src/app/(protected)/workorders/_components/wizard/use-new-wo-wizard-controller.ts
#	src/app/(protected)/workorders/_components/wizard/wizard-step-location-service-select.tsx
#	src/app/(protected)/workorders/_components/wizard/wizard-step-vendor-time.tsx
#	src/test/app/(protected)/workorders/wizard-service-clears-vendor.test.tsx
2026-09-17 15:27:39 -03:00
Alexandre Brandizzi
948ce278de
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:16:30 -03:00
Alexandre Brandizzi
b9c3b11a74
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:16:27 -03:00
Alexandre Brandizzi
9ed8099e71
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-17 15:16:25 -03:00
Alexandre Brandizzi
6eacdc09f6
Merge branch 'dev' into feat/ab/sh-336-dashboard 2026-09-17 15:16:22 -03:00
Alexandre Brandizzi
873e3e32de
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:16:18 -03:00
Alexandre Brandizzi
1e0a984ec3
Merge pull request #205 from Sea-Haven-Industries/fix/ab/sh-321-wizard-vendor-notes
SH-321: save wizard vendor company notes
2026-09-17 15:14:19 -03:00
Alexandre Brandizzi
361f6b65a2
Merge branch 'dev' into feat/ab/sh-304-services-registry-ui 2026-09-17 15:10:25 -03:00
Alexandre Brandizzi
0876e9c3f0
Merge branch 'dev' into feat/ab/sh-336-dashboard 2026-09-17 15:10:22 -03:00
Alexandre Brandizzi
5b6991c93a
Merge branch 'dev' into feat/ab/sh-326-team-member 2026-09-17 15:10:19 -03:00
Alexandre Brandizzi
bca906f900
Merge branch 'dev' into fix/ab/sh-339-wizard-complete-image 2026-09-17 15:02:23 -03:00
Alexandre Brandizzi
534d7ce4d6
Merge branch 'dev' into fix/ab/sh-364-inline-technician-registration 2026-09-17 15:02:19 -03:00
Alexandre Brandizzi
f5da80cd6e
Merge branch 'dev' into fix/ab/sh-368-completion-uploads 2026-09-17 15:02:16 -03:00