From 738f6b65b730a9f9cae67c0d4132fd5f996a468d Mon Sep 17 00:00:00 2001 From: HTMLGuy <2415447+HTMLGuyLLC@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:33:31 -0500 Subject: [PATCH] release: v0.5.10, a sticky header and no extra scroll on the Overview The header and section tabs stay at the top with a solid background, so nothing scrolls behind them. The header drags the window on the Mac. The page's bottom padding drops from 56px to 24px. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 14 +++++++++++- Cargo.lock | 10 ++++----- Cargo.toml | 2 +- app/package.json | 2 +- app/src-tauri/tauri.conf.json | 2 +- app/src/dom.test.ts | 28 +++++++++++++++++++++++- app/src/dom.ts | 18 +++++++++++++++ app/src/render.ts | 3 ++- app/src/style.css | 14 +++++++----- plugins/grade/.claude-plugin/plugin.json | 2 +- 10 files changed, 78 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 734bcbd..1d0e6ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes are listed here. Format follows [Keep a Changelog](https://k ## [Unreleased] +## [0.5.10] - 2026-11-19 + +### Changed + +- The header and the section tabs stay at the top while you scroll. + +### Fixed + +- The Overview no longer scrolls when the window is tall enough to show all of it. +- Scrolled content no longer shows through behind the header's buttons on the Mac. + ## [0.5.9] - 2026-11-18 ### Changed @@ -316,7 +327,8 @@ First release. - Per-source consent: nothing is read until you allow it, and Forget deletes a source's data - `noactually` command-line tool (`sources`, `allow`, `sync`, `stats`) -[Unreleased]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.9...HEAD +[Unreleased]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.10...HEAD +[0.5.10]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.9...v0.5.10 [0.5.9]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.8...v0.5.9 [0.5.8]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.7...v0.5.8 [0.5.7]: https://github.com/HTMLGuyLLC/NoActually/compare/v0.5.6...v0.5.7 diff --git a/Cargo.lock b/Cargo.lock index 6b440df..deeef08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2423,7 +2423,7 @@ dependencies = [ [[package]] name = "noactually-app" -version = "0.5.9" +version = "0.5.10" dependencies = [ "dirs 6.0.0", "jiff", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "noactually-cli" -version = "0.5.9" +version = "0.5.10" dependencies = [ "anyhow", "auto-launch", @@ -2469,7 +2469,7 @@ dependencies = [ [[package]] name = "noactually-engine" -version = "0.5.9" +version = "0.5.10" dependencies = [ "regex", "serde", @@ -2479,7 +2479,7 @@ dependencies = [ [[package]] name = "noactually-sources" -version = "0.5.9" +version = "0.5.10" dependencies = [ "dirs 6.0.0", "jiff", @@ -2494,7 +2494,7 @@ dependencies = [ [[package]] name = "noactually-store" -version = "0.5.9" +version = "0.5.10" dependencies = [ "dirs 6.0.0", "getrandom 0.4.3", diff --git a/Cargo.toml b/Cargo.toml index 8b65d4e..35b2c69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/engine", "crates/sources", "crates/store", "crates/cli", "app/src-tauri"] [workspace.package] -version = "0.5.9" +version = "0.5.10" edition = "2021" # Oldest Rust that builds the whole workspace, app included. CI's `msrv` job checks it. rust-version = "1.90" diff --git a/app/package.json b/app/package.json index 1cb4bf0..6c3aadd 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "noactually-app", "private": true, - "version": "0.5.9", + "version": "0.5.10", "type": "module", "packageManager": "pnpm@10.32.1", "engines": { diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index 6de6c29..148cba6 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "No, Actually...", - "version": "0.5.9", + "version": "0.5.10", "identifier": "app.noactually", "build": { "beforeDevCommand": "pnpm dev", diff --git a/app/src/dom.test.ts b/app/src/dom.test.ts index b8397e7..5ba56b5 100644 --- a/app/src/dom.test.ts +++ b/app/src/dom.test.ts @@ -1,6 +1,6 @@ // @vitest-environment happy-dom import { beforeEach, describe, expect, it } from "vitest"; -import { captureFocus, data, focusKey, must, restoreFocus, say } from "./dom"; +import { captureFocus, data, focusKey, must, restoreFocus, say, trackHeader } from "./dom"; const page = (body: string) => `

Title

${body}`; @@ -106,3 +106,29 @@ describe("focus across a redraw", () => { expect(document.activeElement?.id).toBe("outside"); }); }); + +describe("trackHeader", () => { + beforeEach(() => { + document.documentElement.className = ""; + document.documentElement.style.removeProperty("--top-h"); + document.body.innerHTML = `
x
`; + }); + + it("sets --top-h for the sticky section tabs", () => { + trackHeader(must("#app")); + expect(document.documentElement.style.getPropertyValue("--top-h")).toMatch(/^\d+px$/); + }); + + it("makes the header drag the window only under the Mac's overlay title bar", () => { + trackHeader(must("#app")); + expect(must(".top").hasAttribute("data-tauri-drag-region")).toBe(false); + document.documentElement.classList.add("mac-bar"); + trackHeader(must("#app")); + expect(must(".top").hasAttribute("data-tauri-drag-region")).toBe(true); + }); + + it("does nothing on a page without a header", () => { + document.body.innerHTML = `
`; + expect(() => trackHeader(must("#app"))).not.toThrow(); + }); +}); diff --git a/app/src/dom.ts b/app/src/dom.ts index 0309193..1547242 100644 --- a/app/src/dom.ts +++ b/app/src/dom.ts @@ -72,3 +72,21 @@ export function restoreFocus(root: HTMLElement, memo: FocusMemo): void { if (!target.matches("a[href], button, input, select, textarea, [tabindex]")) target.tabIndex = -1; target.focus({ preventScroll: true }); } + +let headerWatch: ResizeObserver | null = null; + +/** Keeps `--top-h` at the sticky header's height, so the sticky section tabs sit just under it. + * On the Mac the header covers the window's drag strip, so it moves the window too. */ +export function trackHeader(root: ParentNode): void { + headerWatch?.disconnect(); + headerWatch = null; + const top = root.querySelector(".top"); + if (!top) return; + const html = document.documentElement; + top.toggleAttribute("data-tauri-drag-region", html.classList.contains("mac-bar")); + const set = () => html.style.setProperty("--top-h", `${top.offsetHeight}px`); + set(); + if (typeof ResizeObserver === "undefined") return; + headerWatch = new ResizeObserver(set); + headerWatch.observe(top); +} diff --git a/app/src/render.ts b/app/src/render.ts index 99064a4..1bba924 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -1,6 +1,6 @@ // Draws the current view into #app, keeping keyboard focus where it was. import { api, demo, type Meta, REPORT_CARD_TOOLS, type Stats } from "./api"; -import { captureFocus, must, restoreFocus, say } from "./dom"; +import { captureFocus, must, restoreFocus, say, trackHeader } from "./dom"; import { ago, errorText, isFiltered, listNames, subjectText } from "./format"; import { isDismissed, rescoredUnseen } from "./hints"; import { type Html, html } from "./html"; @@ -218,6 +218,7 @@ async function draw(): Promise { } root.innerHTML = markup.value; applyBarWidths(root); + trackHeader(root); restoreFocus(root, focus); announcePage(); if (state.tab === "learn" && !isGlance) await refreshCheck(root); diff --git a/app/src/style.css b/app/src/style.css index 5f6a612..4f8e873 100644 --- a/app/src/style.css +++ b/app/src/style.css @@ -42,7 +42,7 @@ body { background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--bo h1, h2 { font-family: var(--display); text-wrap: balance; margin: 0 } h2 { font-size: 22px; font-weight: 800 } p { margin: 0 } -.wrap { max-width: 1000px; margin: 0 auto; padding: 20px 24px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px } +.wrap { max-width: 1000px; margin: 0 auto; padding: 20px 24px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px } main { display: grid; grid-template-columns: minmax(0, 1fr); gap: inherit } .eyebrow { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted) } .muted { color: var(--muted) } @@ -55,12 +55,12 @@ main { display: grid; grid-template-columns: minmax(0, 1fr); gap: inherit } .mac-bar .drag-strip { display: block; position: fixed; inset: 0 0 auto; height: 44px; background: var(--paper); z-index: 30 } /* The logo and menu sit level with the window buttons (`trafficLightPosition` in tauri.conf.json). */ .mac-bar .wrap { padding-top: 12px } +.mac-bar .top { padding-top: 12px; margin-top: -12px } .mac-bar .home { margin-left: 72px } -.mac-bar .home, .mac-bar .top .sync-pill, .mac-bar .top nav { position: relative; z-index: 31 } .mac-bar .top .tab { height: 28px; padding-block: 0 } .mac-bar .top .tab.icon-only { width: 28px; height: 28px; padding: 6px } -/* Keeps a focused control from scrolling under the strip. */ -html.mac-bar { scroll-padding-top: 52px } +/* Keeps a focused control from scrolling under the sticky header and section tabs. */ +html { scroll-padding-top: calc(var(--top-h, 52px) + 64px) } /* Skip link: off the page until it takes focus, then the first thing on it. */ .skip-link { position: absolute; left: 12px; top: -48px; z-index: 60 } .skip-link:focus { top: 8px } @@ -84,7 +84,9 @@ select:hover, input[type="number"]:hover { border-color: var(--ink) } .action-error { flex-basis: 100%; color: var(--pen-text); font-size: 13px } .action-note { flex-basis: 100% } -.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: -16px } +/* The header stays put while the page scrolls under it; it covers the drag strip, so it drags the window too. */ +.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 32; background: var(--paper); + padding: 20px 0 8px; margin: -20px 0 -24px } /* One line: the logo with its sync status beside it, then the menu at the far end. */ .top .sync-pill { font-size: 11.5px; margin-left: 8px } .top nav { margin-left: auto } @@ -166,6 +168,8 @@ svg [data-tip]:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px .views.period .tab { padding: 7px 11px; font-size: 12.5px } /* Sections on the left, the period on the right, one underlined row; it wraps on narrow windows. */ .views-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 8px } +/* The sections and period stay just under the header (`--top-h`, set in dom.ts) while the page scrolls. */ +.views-row { position: sticky; top: var(--top-h, 0px); z-index: 31; background: var(--paper); padding-top: 8px; margin-top: -8px } .views-row .views { border: 0; padding: 0; min-width: 0; flex: 0 1 auto } .period-select { display: none; min-height: 34px; font-size: 13px } /* The model picker and the time range: what the whole page is filtered by. */ diff --git a/plugins/grade/.claude-plugin/plugin.json b/plugins/grade/.claude-plugin/plugin.json index d20c129..f3de011 100644 --- a/plugins/grade/.claude-plugin/plugin.json +++ b/plugins/grade/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "grade", - "version": "0.5.9", + "version": "0.5.10", "description": "Report cards on how you prompt: type /grade:me for a letter grade, why, and how to ask so it's clear the first time. Works with the No, Actually... app to track your progress.", "author": { "name": "HTMLGuy LLC",