Repository navigation
Commit 08a6a46
authored
fix(mobile): keep code reviewer custom instructions recoverable after an empty save (#9301)
* fix(mobile): confirm clearing custom instructions and keep the row reachable
Saving an emptied custom-instructions field replaced the stored text with
nothing, with no question, and the overview row that leads back into the
editor only existed while text was stored. One accidental save removed both
the text and the only way to type it again.
The screen now asks before an empty draft replaces stored instructions, on
the Save button and on the back guard's Save, and the overview row stays on
every config with a not-set value.
* fix(mobile): keep the back guard doc on the hook
The new outcome type sat between useSettingsBackGuard's doc comment and the
function, so the doc described the type. Move it above the comment.
* refactor(mobile): drop the unused save mutation contract
The editor no longer takes the save mutation as a prop; the screen owns the
save, so the named contract had no consumer.
* fix(mobile): pad row text blocks on the side facing their control
The text block beside a switch kept a physical right padding, so in a
right-to-left layout the block ran into the padding box and the design gate
measured it as clipped on the code reviewer overview. Pad the end side
instead, as the shared choice row already does, so the gap follows the
writing direction.
* fix(mobile): color the shared switch from the palette and unify the row copy
The shared switch passed no colors, so Android resolved its track and thumb
from the device theme: the on track came out as the framework accent (a teal
that is in no palette) and the off thumb was near-white in dark mode, far
brighter than the muted one in light mode. It now names palette colors for both
states, so the on track is the primary fill and the off thumb is the ink that
sits on it, in either theme.
The overview row that opens the instructions editor used its own label, which
had drifted from the screen it opens: the row and the deprecation note read
"Custom Instructions" while the header reads "Custom instructions". The row now
names the screen with the screen's own title key, the note follows it in
sentence case, and the duplicate overview key is gone from every catalog.
* fix(mobile): lift the dark off track and mark the deprecation note as a notice
The shared switch takes one thumb colour for both states: white in light mode,
the palette's near-black primary ink in dark mode. In dark mode the off track
was the muted ink, so the whole control read as one dim shape against the card.
The off track now takes the lighter secondary ink there, which keeps the thumb
and the track edge visible; light mode keeps its track.
The Custom instructions screen's deprecation line was muted body text and read
as a field description. It now renders as a tinted warning notice with its own
warning mark.
* refactor(mobile): resolve the switch's dark track from the palette it renders with
The shared switch read the platform appearance to pick its off track, which
made every mounted suite that stubs the native module fail on the missing
export. The palette it already renders with identifies the theme on its own, so
the wrapper reads that instead and needs no second platform call.
* test(mobile): drop the palette mocks the branch's own switch wrapper needed
The wrapper this branch carried read the palette through useThemeColors, so
its mounted suites mocked the hook. The merge of main's shared switch took
that wrapper away; the shared switch resolves the palette itself and the
suites pass unchanged without the mock. One suite also stayed under the
file-length limit only without the extra block.
* chore: trigger review
* fix(web): review a merge-commit head whose content no review covers
* fix(web): match merge-head coverage across the first-parent chain
* fix(web): carry a finished review verdict onto a merge head1 parent 5908fec commit 08a6a46
108 files changed
Lines changed: 1459 additions & 474 deletions
File tree
- apps
- mobile/src
- app/(app)/code-reviewer/[scope]/[platform]/(edit)
- components
- code-reviewer
- security-agent
- ui
- i18n/locales
- lib/hooks
- web/src
- lib
- code-reviews/db
- integrations/platforms/github
- webhook-handlers
- tests/setup/__mocks__/lib/integrations/platforms/github
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| 130 | + | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| |||
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| |||
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| 223 | + | |
| 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 | + | |
215 | 249 | | |
216 | 250 | | |
217 | 251 | | |
| |||
414 | 448 | | |
415 | 449 | | |
416 | 450 | | |
417 | | - | |
| 451 | + | |
418 | 452 | | |
419 | 453 | | |
420 | 454 | | |
421 | | - | |
422 | 455 | | |
423 | | - | |
| 456 | + | |
424 | 457 | | |
425 | 458 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
439 | 466 | | |
440 | | - | |
| 467 | + | |
441 | 468 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
446 | 476 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | 477 | | |
453 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
454 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
455 | 522 | | |
456 | | - | |
457 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
458 | 544 | | |
459 | 545 | | |
460 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
461 | 590 | | |
462 | | - | |
463 | 591 | | |
464 | 592 | | |
465 | 593 | | |
| |||
506 | 634 | | |
507 | 635 | | |
508 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
509 | 654 | | |
510 | 655 | | |
511 | 656 | | |
| |||
0 commit comments