Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion app/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
28 changes: 27 additions & 1 deletion app/src/dom.test.ts
Original file line number Diff line number Diff line change
@@ -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) => `<h1>Title</h1>${body}`;

Expand Down Expand Up @@ -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 = `<div id="app"><header class="top">x</header></div>`;
});

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 = `<div id="app"></div>`;
expect(() => trackHeader(must("#app"))).not.toThrow();
});
});
18 changes: 18 additions & 0 deletions app/src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement>(".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);
}
3 changes: 2 additions & 1 deletion app/src/render.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -218,6 +218,7 @@ async function draw(): Promise<void> {
}
root.innerHTML = markup.value;
applyBarWidths(root);
trackHeader(root);
restoreFocus(root, focus);
announcePage();
if (state.tab === "learn" && !isGlance) await refreshCheck(root);
Expand Down
14 changes: 9 additions & 5 deletions app/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand All @@ -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 }
Expand All @@ -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 }
Expand Down Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion plugins/grade/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading