Feat v0.6.14 visual polish

Fix v0.6.13 spacing regressions with half-step tokens (--sp-1h 6px,
--sp-2h 10px). Purge ~65 stale hex/rgba fallback values from var() calls
including all old gold #b38a4e references. Self-host DM Sans and JetBrains
Mono woff2 fonts, eliminating Google Fonts CDN dependency. Standardize
border-radius to three tokens (--radius-sm 4px, --radius 8px, --radius-lg
12px) across all kernel CSS and 12 extension packages.

Also fixes: theme settings showing resolved mode instead of stored preference,
surface-inner overflow causing notes scrollbar and chat input clipping at
high zoom, user menu drift at scale >100% from zoom-unaware fixed positioning,
and three undefined CSS variable references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 12:59:06 +00:00
parent 3af62a9cc5
commit 6fff84f40a
35 changed files with 422 additions and 334 deletions

View File

@@ -16,14 +16,28 @@ export function Menu({ items = [], anchor, open, direction = 'down-right', onSel
const selectableItems = items.filter(i => !i.divider && !i.disabled);
// Position relative to anchor (CSS zoom reflows layout correctly)
// Position relative to anchor, accounting for CSS zoom on #surfaceInner.
// getBoundingClientRect() returns viewport coords, but position:fixed inside
// a zoomed ancestor needs coords divided by the zoom factor.
useEffect(() => {
if (!open || !anchor) return;
const rect = typeof anchor.getBoundingClientRect === 'function'
const rawRect = typeof anchor.getBoundingClientRect === 'function'
? anchor.getBoundingClientRect()
: anchor;
const vw = window.innerWidth;
const vh = window.innerHeight;
// Detect CSS zoom on surface container
const zoomEl = document.getElementById('surfaceInner');
const zoom = zoomEl ? (parseFloat(zoomEl.style.zoom) || 1) : 1;
// Convert viewport coords to zoom-space
const rect = {
top: rawRect.top / zoom,
bottom: rawRect.bottom / zoom,
left: rawRect.left / zoom,
right: rawRect.right / zoom,
};
const vw = window.innerWidth / zoom;
const vh = window.innerHeight / zoom;
let top, left;
const [vDir, hDir] = direction.split('-');

View File

@@ -23,7 +23,7 @@ function getPrefs() {
export function AppearanceSection() {
const prefs = getPrefs();
const [theme, setTheme] = useState(sw.theme?.current || 'system');
const [theme, setTheme] = useState(sw.theme?.mode || 'system');
const [scale, setScale] = useState(prefs.scale || 100);
const applyTheme = useCallback((mode) => {