Commit graph

236 commits

Author SHA1 Message Date
Alexandre Brandizzi
0de695362a
Merge branch 'dev' into feat/sh-250-fe-additive-add 2026-08-18 17:46:49 -03:00
Codex Review Integration
9a066092b3 fix(vendors): correct additive add reload, phone and contact (SH-250, SH-246)
Three review findings on the additive add path:

- Create-mode reload refreshed selectedRoster (including rowVersion) but left
  the form company fields on their pre-conflict values, so a retry diffed stale
  fields against the reloaded roster and could overwrite the concurrent company
  update that caused the 409. Reload now resets the form from the fresh roster,
  matching the select path.
- mapVendorRosterAdditivePatchToBackend copied companyFields verbatim while the
  reconcile write mapper canonicalizes companyPhone, so PATCH and PUT could send
  different phone shapes for the same input.
- emptyRosterTechnician seeded preferredContact "Phone" even though that
  control was removed from the form, so filling the first blank row submitted a
  fabricated value. append already omitted it; both paths now agree.
2026-08-18 17:28:48 -03:00
Codex Review Integration
9624c264de fix(vendors): send only user-edited company fields on additive add (SH-250)
Adversarial review found a last-writer-wins window: after a stale 409 the
roster is refetched while the form keeps its pre-conflict values, so the
form-vs-roster diff resent our stale value for any company field another
user changed in that window, silently reverting their edit.

Transmit only fields the user actually edited, taken from react-hook-form
dirty state. Selecting a company calls reset(), so loaded values are never
dirty and only genuine edits are sent.

dirtyFields is resolved during render: formState is a Proxy that only tracks
properties read at render time, so reading it inside the submit callback
returned empty. The vendors E2E caught that; unit tests could not, since
they pass the flags in directly.
2026-08-18 14:42:01 -03:00
Codex Review Integration
a710e21281 fix(vendors): additive technician add for existing companies (SH-250, SH-246) 2026-08-18 13:09:33 -03:00
Arthur Bassi
8d1a3340a8 fix(work-orders): align Past Due overlay and copy to Schedule On (SH-185)
Dispatchers were told to change Due Date, which cannot clear Past Due.
Drive the table overlay from Schedule On and match the 422 contract.
2026-08-18 09:20:18 -03:00
Arthur Bassi
4a95da32d2 chore(work-orders): merge origin/dev and keep SH-184 Add-On with severity gates 2026-08-17 09:36:07 -03:00
Arthur Bassi
b4cb9d0288
feat(work-orders): severity gates and wizard type/WO# parity (SH-192) (#106)
Some checks failed
CI / ci (push) Has been cancelled
CI / governance (push) Has been cancelled
CI / vendor-visual-regression (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
* fix(work-orders): allow blank WO number in wizard create path

[recover] remove malicious eslint payload (was d0d08508)

* fix(work-orders): emit severity before type in board scalar PATCH ops

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(work-orders): drop vendor collateral from SH-192 lane

* fix(work-orders): add severity to unscheduled highlight fixture after dev merge

* refactor(work-orders): extract inline type/severity cell under function line cap

* fix(work-orders): add severity to comp-doc and media fixtures after dev merge

PR #45 introduced completion-doc, media and table-mutation fixtures that predate the required severity field, so the integrated head failed tsc. Fill severity on those row builders (null for PM, SEV 1 for the Emergency fixture) and type the mutation BASE_ROW instead of asserting it.

* test(work-orders): align merge fixes with severity field and WO# placeholder

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Arthur Bassi <bassi-arthurr@users.noreply.github.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-08-14 11:59:52 -03:00
Arthur Bassi
4af826a1e0
feat(work-orders): query broadcast, remove auth bypass, dispatch polish (#100)
* fix(work-orders): address wizard create review findings

[recover] remove malicious eslint payload (was 166c63e4)

* fix(work-orders): remove legacy completedDate EditWorkorder path

[recover] remove malicious eslint payload (was f4e6132b)

* fix(work-orders): use local calendar day for completedDate

Restore todayIso() after parent merge reintroduced UTC slice, and keep the wizard-date-utils regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): send wizard status and clear POC notes on site change

Map draft.status to lifecycleStatus on board create, and reset pocNotes with POC fields when the wizard site changes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(query): scope broadcast channel per account and clear on auth

Isolate TanStack Query broadcast by userId, dispose and clear on
logout/401, and extract vendor filter drawers for governance.

* feat(work-orders): board wizard create with service notes

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): enforce single-service wizard create per SH-118

Use single service selection in the wizard and omit extraServices from board create.

* fix(vendors): restore filter drawer labels for e2e and visual CI

Use VendorFilterOptions again and keep the Apply filters footer label expected
by vendor Playwright specs and the committed visual baseline.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 11:52:48 -03:00
Arthur Bassi
d3bfd35d9b chore(work-orders): merge origin/dev and keep SH-184 Add-On with wizard range 2026-08-14 10:06:56 -03:00
Arthur Bassi
ee90d73a44
feat(work-orders): board wizard create with service notes (#99)
Some checks are pending
CI / ci (push) Waiting to run
CI / governance (push) Waiting to run
CI / vendor-visual-regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
* feat(work-orders): board wizard create with service notes

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): enforce single-service wizard create per SH-118

Use single service selection in the wizard and omit extraServices from board create.

* refactor(work-orders): extract wizard controller for maintainability gate

Move duplicate-WO wiring and lookup hooks out of NewWoWizard so the
changed-file function line cap passes after merging dev.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 18:43:11 -03:00
arthur.bassi
b39bb0020f chore(work-orders): merge dev into Add-On indicator branch
Integrate SH-189 duplicate WO dialog with SH-184 Add-On indicator:
preserve remote duplicate check, AddOnPill, and inline override toggle.
2026-08-13 13:19:18 -03:00
Arthur Bassi
25837171a4
feat(work-orders): duplicate WO number dialog on table and wizard (SH-189) (#90)
Some checks are pending
CI / ci (push) Waiting to run
CI / governance (push) Waiting to run
CI / vendor-visual-regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
* docs(work-orders): add pending BE contract checklist for design parity gaps

* feat(work-orders): confirm dialog when duplicate wo number detected

* fix(work-orders): show duplicate wo number dialog on wizard create

* docs(work-orders): align pr description with jira and qa residuals

* style(work-orders): prettier wizard duplicate dialog files

* refactor(workorders): extract wizard state hook and list overlays

* fix(work-orders): check duplicate numbers globally

* fix(work-orders): exhaust fuzzy pages for exact WO number lookup

Prevent accepting duplicates that fall outside the first fuzzy search page.

* style(work-orders): format editable WO number cell for Prettier gate

* fix(work-orders): 0-based WO search page and stale duplicate guard

* fix(work-orders): sync draft WO# ref in effect for duplicate guard [SH-189]

* fix(work-orders): extract WO number editor under max-lines gate

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): harden duplicate WO number checks [SH-189]

* fix(work-orders): sync wizard refs in effects and exhaust duplicate WO lookup

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): extract hooks to satisfy max-lines governance gate

Co-authored-by: Cursor <cursoragent@cursor.com>

* style(work-orders): format wizard state hook for Prettier gate

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(work-orders): search one-character WO numbers for duplicates

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 11:04:48 -03:00
arthur.bassi
dc5140b495 chore(work-orders): resolve Add-On indicator conflicts with current dev 2026-08-12 16:09:56 -03:00
Alexandre Brandizzi
778472d1d8
Merge branch 'dev' into fix/vendor-portal-locked-banner-copy 2026-08-12 12:23:23 -03:00
Alexandre Brandizzi
449ec647b0
Merge branch 'dev' into feature/wo-board-completed-date-column 2026-08-12 12:17:36 -03:00
Alexandre Brandizzi
5419edc4af
Merge branch 'dev' into fix/SH-109-inline-save-unscheduled 2026-08-12 12:11:17 -03:00
Arthur Bassi
5d3fd1f986 fix(vendor-portal): align locked banner with comments-only actions 2026-08-12 11:25:41 -03:00
arthur.bassi
fd2b34a1cc fix(work-orders): dedupe completedDate after merging PR #45
Keep a single fixture property and board op rule so the integrated head typechecks (TS1117).
2026-08-12 09:50:03 -03:00
Arthur Bassi
2ce7210668 fix(vendor-portal): accurate locked banner copy by dispatch status 2026-08-12 09:39:16 -03:00
arthur.bassi
eadb0bda8b chore(work-orders): merge origin/dev into completedDate column branch 2026-08-12 09:35:54 -03:00
Arthur Bassi
4440f7d087 chore(work-orders): merge origin/dev into SH-109 inline save branch
EOF
2026-08-12 09:33:49 -03:00
Arthur Bassi
11e1b65bc1 fix(work-orders): pass workOrderVersion in slide-over media and fix test fixture
Wire workOrderVersion through slide-over media delete/categorize after dev
merge, and remove duplicate completedDate in unscheduled highlight fixture.
2026-08-11 16:55:31 -03:00
Arthur Bassi
93c5a35b46 chore: merge origin/dev into slide-over media branch
Sync with latest dev (CompDoc/completedDate from PR #45) and resolve
conflicts while preserving slide-over detail, workOrderVersion on media
mutations, and the consolidated list page hook.
2026-08-11 16:46:32 -03:00
arthur.bassi
29580c6add refactor(work-orders): shrink inline row cells under function line cap
Extract muted dash placeholders so governance max-lines-per-function passes.
2026-08-11 15:44:36 -03:00
arthur.bassi
99724f831c fix(work-orders): adapt Add-On indicator unstack onto independently approvable base
Extract inline schedule cell for the maintainability gate, drop completedDate
patch coverage that is not on WorkOrderTableRow on dev, and align range create
expectations with assignWizardScheduleFields.
2026-08-11 15:42:29 -03:00
arthur.bassi
8398a08b76 fix(work-orders): add completedDate to unscheduled highlight fixture
Unblocks tsc after merging origin/dev with the required table-row field.
2026-08-11 15:41:49 -03:00
Arthur Bassi
017820ac4b fix(work-orders): add completedDate to unscheduled highlight fixture
Keep the merged origin/dev test building against WorkOrderTableRow after
the CompDoc completedDate field landed on this branch.
2026-08-11 15:35:42 -03:00
arthur.bassi
94f07fb66f chore(work-orders): merge origin/dev into completedDate column branch
Align merge-base so vendor files matching dev drop out of the PR diff.
2026-08-11 15:31:57 -03:00
arthur.bassi
c9637afbd8 fix(work-orders): drop unrelated vendor changes from completedDate PR
Keep SH-216 scoped to the completedDate board column only.
2026-08-11 15:29:44 -03:00
Arthur Bassi
1005186ea7 Merge branch 'dev' into feature/wo-detail-comp-doc 2026-08-11 15:23:55 -03:00
Arthur Bassi
f666ee215d test(work-orders): cover site dialog POC autofill races 2026-08-11 15:15:02 -03:00
Arthur Bassi
8a2bc21845 fix(work-orders): sync addon-indicator with platform-polish parent
[recover] remove malicious eslint payload (was 692598b7)
2026-08-11 15:08:27 -03:00
Arthur Bassi
969f99a576 fix(work-orders): send workOrderVersion on media categorize/delete
Align CompDoc media mutations with backend PR #47 so categorize and
delete no longer return 422 WorkOrderVersionRequired.
2026-08-11 14:52:41 -03:00
Adam Moussa
4949508d43
Merge branch 'dev' into feat/sh-101-uplift-lifecycle 2026-08-11 13:35:55 -04:00
Arthur Bassi
f35fce9bd5
feat(work-orders): comment @mentions autocomplete (SH-217) (#91)
* docs(work-orders): add pending BE contract checklist for design parity gaps

* feat(work-orders): add mentions in work-order comments composer

* docs(work-orders): align pr description with jira and qa residuals

* refactor(workorders): split work order view page into view components

* fix(work-orders): export comment assignment vendor input types for view hook

* fix(work-orders): drop preferredContact from vendor update payload

Align with WorkOrderVendorUpdatePayload on current dev so the mentions branch typechecks.

* fix(work-orders): remove Preferred Contact from WO vendor editor (SH-180)

EOF

* fix(work-orders): harden comment mentions and clear draft on success

* fix(work-orders): harden mention highlight boundary and submit catch [SH-217]

* fix(work-orders): keep mention cursor sync on current value [SH-217]

* fix(work-orders): keep mention menu open after typing @

Pass live text into syncCursor instead of a render-time valueRef.
Add a composer interaction regression for @ autocomplete visibility.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-08-11 14:07:02 -03:00
arthur.bassi
4637f3ab14 chore: merge origin/dev into slide-over media branch
Sync with latest dev and add completedDate to the unscheduled highlight
fixture so the merge build stays type-safe.
2026-08-11 14:02:42 -03:00
Arthur Bassi
a30ac73d29
feat(work-orders): draft technician until vendor dialog save (SH-193) (#89)
Some checks are pending
CI / ci (push) Waiting to run
CI / governance (push) Waiting to run
CI / vendor-visual-regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
* docs(work-orders): add pending BE contract checklist for design parity gaps

* feat(work-orders): add technician affordance in wo vendor dialog

* fix(work-orders): defer technician create until vendor dialog save

* docs(work-orders): align pr description with jira and qa residuals

* fix(vendors): harden draft technician optional field typing

* refactor(workorders): extract vendor dialog body footer and save hook

* fix(work-orders): coerce null company vendor for add-technician prop

* fix(work-orders): preserve draft technician staging on save [SH-193]

* fix(work-orders): select technicians by stable id [SH-193]

Keep selectedKey as explicit dialog state (SiteDialog pattern) so same-name drafts do not collide with existing vendors, and cover the regression with interaction tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-08-11 14:01:31 -03:00
arthur.bassi
251edd9c61 fix(work-orders): drop vendor collateral from slide-over PR
Restore vendors and page-header to origin/dev so this PR stays the WO
slide-over/media slice only. Remove stale godfile baseline entries now
under the 500-line cap.
2026-08-11 13:54:31 -03:00
Alexandre Brandizzi
b177987081
Merge branch 'dev' into feat/sh-101-uplift-lifecycle 2026-08-11 13:52:26 -03:00
Arthur Bassi
9c7b42e96b
feat(work-orders): SH-132 FE — Due Date distinct from Schedule On + Emergency calendar modal (#82)
* feat(work-orders): align Due Date and Past Due with SH-132 FE contract [SH-132]

* fix(work-orders): highlight Schedule On for unscheduled rows

Restore forceScheduleHighlight for Unscheduled section rows while keeping Due Date highlight for past-due and attempt feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(work-orders): cover unscheduled Schedule On highlight [SH-132]

Add row-level public-interface regression proving Unscheduled rows force-highlight Schedule On, not Due Date (SH-165).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Alexandre Brandizzi <alex_brandizzi@hotmail.com>
2026-08-11 13:49:41 -03:00
Alexandre Brandizzi
34ebad390f fix(uplifts): align revise validation contract 2026-08-11 13:49:03 -03:00
Arthur Bassi
f66284d78c Merge remote-tracking branch 'origin/dev' into feature/wo-detail-comp-doc 2026-08-11 09:47:20 -03:00
Alexandre Brandizzi
c0e203a090 feat(uplifts): complete SH-101 vendor workflow 2026-08-11 08:57:38 -03:00
Alexandre Brandizzi
bd12351c87
Merge branch 'dev' into feat/sh-98-portal-lifecycle-recovered 2026-08-11 08:53:28 -03:00
arthur.bassi
5108f0e816 fix(work-orders): preserve dirty POC fields during site autofill
Only autofill empty POC name/phone when location detail resolves so createMode edits typed before the request finishes are not overwritten.
2026-08-10 19:09:22 -03:00
arthur.bassi
d52df52de6 fix(vendors): restore blank-tech filter and deactivation gate
Omit empty new technician rows on save and route Active to Inactive through VendorDeactivationDialog, blocking sparse isActive:false updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 19:08:01 -03:00
arthur.bassi
a05e768115 fix(work-orders): address Bugbot findings on slide-over and vendor roster
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 18:35:28 -03:00
Alexandre Brandizzi
bc5659eb2a fix(vendor-portal): clear stale refusal state 2026-08-10 18:25:57 -03:00
arthur.bassi
767f0df43f Merge remote-tracking branch 'origin/dev' into feature/wo-detail-comp-doc 2026-08-10 18:13:40 -03:00
Arthur Bassi
d72be8c505 fix(work-orders): use local calendar day for slide-over completedDate
[recover] remove malicious eslint payload (was 6a278c01)
2026-08-10 17:12:13 -03:00