Repository navigation
Commit 677ff55
refactor(mobile): workspace layout reveals the review and files inspector itself
Opening Review or Files in split view revealed the inspector from an effect
in each screen (ReviewSheet, ThreadFilesTreeScreen), which set layout state
after the workspace had already committed without the inspector, so every
open committed the whole workspace tree twice. The layout now derives the
reveal in render from the focused workspace route name and thread, once per
route and thread, so the first commit already shows the inspector and coming
back from a screen pushed over the route keeps the user's choice.
useRegisterWorkspaceInspector kept registration in sync with focus through a
focus effect, a renderer-change effect, an unmount effect and two refs. One
useFocusEffect does the same: it re-runs when the renderer changes while
focused, and its cleanup deactivates on blur and unmount.
Effects: AdaptiveWorkspaceLayout 5 -> 3, ReviewSheet 1 -> 0,
ThreadFilesRouteScreen 1 -> 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 96fc7b9 commit 677ff55
3 files changed
Lines changed: 33 additions & 66 deletions
File tree
- apps/mobile/src/features
- files
- layout
- review
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | 441 | | |
443 | 442 | | |
444 | 443 | | |
| |||
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | 513 | | |
522 | 514 | | |
523 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
| |||
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
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 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
160 | 128 | | |
161 | 129 | | |
162 | 130 | | |
| |||
354 | 322 | | |
355 | 323 | | |
356 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
357 | 343 | | |
358 | 344 | | |
359 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 13 | + | |
21 | 14 | | |
22 | 15 | | |
23 | 16 | | |
| |||
432 | 425 | | |
433 | 426 | | |
434 | 427 | | |
435 | | - | |
| 428 | + | |
436 | 429 | | |
437 | 430 | | |
438 | 431 | | |
| |||
451 | 444 | | |
452 | 445 | | |
453 | 446 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | 447 | | |
459 | 448 | | |
460 | 449 | | |
| |||
0 commit comments