Commit b864382
committed
fix(endpoint-form): a location group can come from a field-name prefix, so relocation stops asking visitors for coordinates
/embed/relocation-wheel rendered four raw latitude/longitude number inputs
plus a decimal-hours timezone, and it was the only widget that did. Never a
missing feature: the city-search substitution was already generic, it just
could not see this one shape.
A group used to come from object nesting alone, and groupHasLocation required
all three of LOCATION_TRIO by exact field name. Five of the six two-location
operations nest per person (person1/person2, personA/personB) so each already
got its own city box. generateRelocationChart is the only operation in the
spec that puts both coordinate pairs at the TOP level, told apart by a name
prefix, so no field was named latitude, the flat group failed the test, and
nothing was suppressed.
Three rules now, all derived from spec shape, no per-operation list anywhere:
- splitCoordinateName groups a flat *Latitude/*Longitude pair under its
prefix, so a future partnerLatitude needs no code change. The prefix is
harvested from coordinates ONLY, so birthDate does not invent a birth group
holding a lone date.
- The field key stays the original wire name. A prefixed coordinate reports
name: latitude but keeps key: birthLatitude, because the key is the
serialisation identity and birth.latitude POSTs a body the API rejects.
The fill handler now looks keys up from the model instead of building
group.name, which is what made that assumption safe to break.
- LOCATION_PAIR: a group qualifies on lat+lon, timezone optional. Relocation
has one top-level timezone and it is the BIRTH timezone, since relocating
does not move the birth moment, so the relocation group owns none. Only the
first location group claims an unowned flat timezone, else two city boxes
overwrite each other with the wrong offset.
The browser audit then caught two things no model-level test could: the
placeholder was hardcoded "City of birth" so both boxes read the same, and
the help text hardcoded "Required: latitude, longitude, timezone", which is a
visible lie on the block that owns no timezone. Both now derive. Rendered
result: Birth location / Relocation location, Birth city / Relocation city,
"Fills latitude, longitude, timezone" vs "Fills latitude, longitude", zero
number inputs.
Verified: all 6 multi-location operations produce the right picker count, a
sweep of all 73 coordinate operations leaves 0 raw coordinates and creates 0
phantom single-field groups, new unit tests are sabotage-verified, a new
Playwright test renders relocation in a real browser, 474 unit and 27 e2e
green, axe still passes with the second picker.
Also in here, both found while auditing rather than assumed:
- e2e specs renamed to *.e2e.ts with testMatch pinned. Bun globs *.spec.ts as
well as *.test.ts, so a bare `bun test` swept up the Playwright files and
reported 4 failures. The enumerated test script hid it, but a red suite that
is not red trains you to ignore the number. Bare bun test now 0 fail, and
the test script is a glob instead of 16 hand-listed files, which was a real
drift trap since a new test file silently never ran.
- release.yml: the git tag + git push --follow-tags pair is INERT here, since
--follow-tags pushes only annotated tags. Tagging actually happens
server-side in action-gh-release, which is why every tag on this remote is
lightweight. Annotated in place after the identical two lines were found
losing every tag in a sibling repo with no Release step. Not restructured on
a release day.1 parent 5d184ff commit b864382
11 files changed
Lines changed: 286 additions & 15 deletions
File tree
- .github/workflows
- packages/ui
- src
- components
- utils
- tests
- e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
503 | 512 | | |
504 | 513 | | |
505 | 514 | | |
| |||
516 | 525 | | |
517 | 526 | | |
518 | 527 | | |
519 | | - | |
| 528 | + | |
520 | 529 | | |
521 | 530 | | |
522 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
523 | 561 | | |
524 | 562 | | |
525 | 563 | | |
| |||
561 | 599 | | |
562 | 600 | | |
563 | 601 | | |
564 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
565 | 611 | | |
566 | | - | |
567 | 612 | | |
568 | 613 | | |
569 | 614 | | |
| |||
572 | 617 | | |
573 | 618 | | |
574 | 619 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
581 | 630 | | |
582 | 631 | | |
583 | 632 | | |
| |||
848 | 897 | | |
849 | 898 | | |
850 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
851 | 914 | | |
852 | 915 | | |
853 | 916 | | |
| |||
860 | 923 | | |
861 | 924 | | |
862 | 925 | | |
863 | | - | |
| 926 | + | |
864 | 927 | | |
865 | 928 | | |
866 | | - | |
| 929 | + | |
867 | 930 | | |
868 | 931 | | |
869 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
112 | 153 | | |
113 | 154 | | |
114 | 155 | | |
| |||
232 | 273 | | |
233 | 274 | | |
234 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
235 | 282 | | |
236 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
237 | 293 | | |
238 | 294 | | |
239 | 295 | | |
| |||
File renamed without changes.
Lines changed: 46 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
File renamed without changes.
File renamed without changes.
0 commit comments