Repository navigation
Commit 14a48d2
committed
feat(panel): move the memory library onto the host's own panel seats
The library used to have exactly one full entry point: a sidebar.footer.action
slot that opened a createPortal overlay centred on the viewport. That overlay
is not a host panel — it sits in the middle of the screen without joining the
host's layout or navigation state, so Escape handling, the focus ring and the
backdrop click all had to be reimplemented, while it still looked like a new
window in screenshots.
The host already declares a pair of seats for this: sidebar.panellist (list,
the sidebar panel list) and main (keyed, the centre column). PanelRow handles
the click itself by calling layout.selectPanel(id), so the plugin only hands
over a glyph and a page — no second button, no aria plumbing, and no close
affordance (every host path back to a session goes through selectPanel(null)).
main's key must match the sidebar id verbatim: the host looks the entry up by
options.key and throws layout.selectPanel: main panel "..." is not registered
when they differ.
Older hosts keep the footer.action fallback, but the choice is a real one.
slots.inject alone cannot decide it — it neither throws nor calls back for an
undeclared slot, it just waits — so hostHasPanelSeat() asks slots.spec()
explicitly and mountFooterSeat() checks it before registering. The panellist
disposer mounts the fallback again, otherwise a host that retracts the seat
would be left with no entry at all, and only that path can ever notice.
The semantic colour layer grows a fifth root: .mneme-paneliglyph lives inside
the host's span.panelGlyph, outside the .mneme-x subtree, and the conflict
badge on it needs --mneme-danger. contrast.test.js pins that selector exactly,
which is the point — a new render root must not slip past the AA audit.
The new test boots the real seat block against a fake ctx and asserts what
mounts, not which strings exist: seat-only on a new host, one footer on an old
one, and the fallback coming back (with main torn down) when the seat goes
away. Removing any of the three guards turns it red.1 parent e9e5b42 commit 14a48d2
4 files changed
Lines changed: 272 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2022 | 2022 | | |
2023 | 2023 | | |
2024 | 2024 | | |
2025 | | - | |
| 2025 | + | |
2026 | 2026 | | |
2027 | | - | |
2028 | | - | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2029 | 2031 | | |
2030 | 2032 | | |
2031 | 2033 | | |
| |||
2218 | 2220 | | |
2219 | 2221 | | |
2220 | 2222 | | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
2221 | 2232 | | |
2222 | 2233 | | |
2223 | 2234 | | |
| |||
8593 | 8604 | | |
8594 | 8605 | | |
8595 | 8606 | | |
| 8607 | + | |
| 8608 | + | |
| 8609 | + | |
| 8610 | + | |
| 8611 | + | |
| 8612 | + | |
| 8613 | + | |
| 8614 | + | |
| 8615 | + | |
| 8616 | + | |
| 8617 | + | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
| 8623 | + | |
| 8624 | + | |
| 8625 | + | |
| 8626 | + | |
| 8627 | + | |
| 8628 | + | |
| 8629 | + | |
| 8630 | + | |
| 8631 | + | |
| 8632 | + | |
| 8633 | + | |
8596 | 8634 | | |
8597 | 8635 | | |
8598 | 8636 | | |
| |||
9853 | 9891 | | |
9854 | 9892 | | |
9855 | 9893 | | |
9856 | | - | |
9857 | | - | |
9858 | | - | |
9859 | | - | |
9860 | | - | |
9861 | | - | |
9862 | | - | |
| 9894 | + | |
| 9895 | + | |
| 9896 | + | |
| 9897 | + | |
| 9898 | + | |
| 9899 | + | |
| 9900 | + | |
| 9901 | + | |
| 9902 | + | |
| 9903 | + | |
| 9904 | + | |
| 9905 | + | |
| 9906 | + | |
| 9907 | + | |
| 9908 | + | |
| 9909 | + | |
| 9910 | + | |
| 9911 | + | |
| 9912 | + | |
| 9913 | + | |
9863 | 9914 | | |
9864 | 9915 | | |
9865 | 9916 | | |
| |||
9872 | 9923 | | |
9873 | 9924 | | |
9874 | 9925 | | |
| 9926 | + | |
| 9927 | + | |
| 9928 | + | |
| 9929 | + | |
| 9930 | + | |
| 9931 | + | |
| 9932 | + | |
| 9933 | + | |
| 9934 | + | |
| 9935 | + | |
| 9936 | + | |
| 9937 | + | |
| 9938 | + | |
| 9939 | + | |
| 9940 | + | |
| 9941 | + | |
| 9942 | + | |
| 9943 | + | |
| 9944 | + | |
| 9945 | + | |
| 9946 | + | |
| 9947 | + | |
| 9948 | + | |
| 9949 | + | |
| 9950 | + | |
| 9951 | + | |
| 9952 | + | |
| 9953 | + | |
| 9954 | + | |
| 9955 | + | |
| 9956 | + | |
| 9957 | + | |
| 9958 | + | |
| 9959 | + | |
| 9960 | + | |
9875 | 9961 | | |
9876 | 9962 | | |
9877 | 9963 | | |
| |||
0 commit comments