Commit f20cc42
committed
fix(ui): scroll-to + flash the target Settings section on every redirect
Only the Security section highlighted on deep-link; other "open Settings"
links dumped the user at the top of the page. Generalize the mechanism so any
section can be targeted, and wire the existing redirects to the right one.
- SettingsPage: replace the security-only `securityRef`/`flashSecurity` with a
section-keyed registry (`registerSection`/`sectionFlashClass`) driven by
`pendingSettingsSection`. The matching section scrolls into view + flashes
the ring for 2.2s, then the pending value is cleared. Unknown/unmounted
sections are dropped (no stale flash). Wrapped the redirect-target sections:
Updates, Gateway, Workspaces, Security.
- ConnectionCard "Port … change in Settings" → targets the Gateway section.
- App update banner "Update now" → targets the Updates section (was top of page).
- WorkspaceInstallPanel auth nudge already targets Security — unchanged.
Test: App update-banner test now asserts the redirect sets
`pendingSettingsSection = 'updates'`. Full TS suite green (224).
Claude-Session: https://claude.ai/code/session_01Baan9JmzR43uxxRUh7CAMF
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>1 parent 5598451 commit f20cc42
4 files changed
Lines changed: 49 additions & 15 deletions
File tree
- apps/desktop/src
- components
- features/settings
- tests/ts/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| 353 | + | |
| 354 | + | |
351 | 355 | | |
352 | 356 | | |
353 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
74 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
80 | 99 | | |
81 | | - | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
| |||
378 | 397 | | |
379 | 398 | | |
380 | 399 | | |
381 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
382 | 403 | | |
383 | 404 | | |
384 | 405 | | |
| |||
474 | 495 | | |
475 | 496 | | |
476 | 497 | | |
| 498 | + | |
477 | 499 | | |
478 | 500 | | |
479 | 501 | | |
| |||
612 | 634 | | |
613 | 635 | | |
614 | 636 | | |
| 637 | + | |
615 | 638 | | |
616 | 639 | | |
| 640 | + | |
617 | 641 | | |
618 | 642 | | |
619 | 643 | | |
| |||
646 | 670 | | |
647 | 671 | | |
648 | 672 | | |
| 673 | + | |
649 | 674 | | |
650 | 675 | | |
651 | 676 | | |
652 | | - | |
| 677 | + | |
653 | 678 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 679 | + | |
659 | 680 | | |
660 | 681 | | |
661 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
403 | 407 | | |
404 | 408 | | |
0 commit comments