Commit 6914b5c
committed
fix(app): the desktop panel is centred on purpose — say so, and test it
Fourth review thread. The doc comment promised "an anchored popover on desktop.
Same split as ContextUsageButton (SPEC-37)" and D11 specified a MenuAnchor; the
code ships showDialog + Alignment.center. So this was not a stale comment, it was
an unrecorded spec deviation.
Kept the centring, and the reason is a real finding rather than a shrug: the
mechanism cannot transfer, because the DOOR TOPOLOGY differs. ContextUsageButton
is a persistent control in the composer, so a MenuAnchor has something to stay
anchored to for as long as the popover is open. Both of this panel's desktop doors
are transient MENU ITEMS -- the pane-header kebab and the mobile glass menu -- so
by the time an item is chosen its menu has been dismissed. Anchoring to where a
vanished menu item used to be is arbitrary placement dressed up as precision.
What SPEC-37 actually contributes is kept: the window-clamped width and the
SingleChildScrollView, so a panel opened from a narrow split pane cannot hang
off-screen.
The real defect underneath: the desktop host had NO test. Every case in
session_identity_widget_test.dart passed `desktop: false`, which is exactly how
the code and its own doc comment drifted apart and stayed that way through
implementation. Two tests added:
* desktop opens a centred, window-clamped panel -- not a sheet
* a desktop panel in a narrow window is clamped to the window (300pt window,
340pt panel, so the clamp is load-bearing)
Both mutation-proven: Alignment.center -> topLeft fails the first, and dropping
the math.min window clamp fails the second.
D11 amended in the spec and logged as deviation 8, so the next reader does not
find a third version of the truth.1 parent 1a0bb8a commit 6914b5c
4 files changed
Lines changed: 92 additions & 3 deletions
File tree
- app
- lib/ui/session
- test
- docs/specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
436 | 453 | | |
437 | 454 | | |
438 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
316 | 387 | | |
317 | 388 | | |
318 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments