8000 feat(ui): settings shows one section at a time from a section list by aorumbayev · Pull Request #112 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

feat(ui): settings shows one section at a time from a section list - #112

Merged
aorumbayev merged 25 commits into
mainfrom
feat/settings-sections
Nov 10, 2026
Merged

aorumbayev merged 25 commits into
mainfrom
feat/settings-sections

Conversation

@aorumbayev
Copy link
Copy Markdown
Member

Settings shows one section at a time from a section list, so a person never scrolls through every option to find one.

What changed

  • Section list on the left: search box, then General, Appearance, Keyboard, Installed, Updates, then a "Plugins" group with one row per enabled plugin that has settings. Only the chosen section shows on the right, in a centered column. The chosen section is kept while the window is open; a plugin section that goes away shows General until the plugin returns.
  • Search across sections: results list their section. Enter (from the search box or the list) or a click opens that section and scrolls to the row's group. Up and Down work from the search box too.
  • Keyboard: Tab from search into the list, Up/Down, Enter, Tab into the content. The focus ring shows for the keyboard only and does not move the row.
  • Spacing: notes run up to their control, rows are 16 × 12, no extra gap above the first heading, title and list share a left edge, headings are foreground semibold, one-group sections don't repeat their name.
  • Rows: new "Ask before archiving" switch (confirm-archive, which had no row). Notifications has a real note. Agent integration is one sentence; the flag list moved to docs/behaviour.md. Plugin status and the Sidebar/Review slots moved from Appearance to Installed.
  • SettingsOp::Plugins now selects Installed. Decision 207 (with Cost: +72 lines to the ceiling). Book and docs paths updated.

Checked

fmt, clippy -D warnings, 1817 tests, size budget and the other scripts. A fresh reviewer's findings are fixed, each behaviour fix with a test shown failing first. Light and dark screenshots compared with the reference.

Not in this change

No wide-window screenshot (the test app has no resize command).

… a result

The page type is named Category, because Section is already a sidebar term in docs/CONTEXT.md.
The cursor stayed on the old section row, so Enter opened the wrong row after typing. Typing now puts the cursor on the first result, and clearing the search puts it back on the section.
Up and Down reached the list only, so typing a search and pressing Down did nothing. They are now handled before the search box sees them. The cursor row is also shown while the search box has text.
The page wrote General over the chosen section when the plugin left the list, so a reload left the person on General. The chosen section now stays stored, and the page shows General only while the plugin is gone. Decision 207 says so.
… reopening

These pin behaviour that already worked. Each was checked by breaking the code once: the jump scrolling to the top, and Settings resetting to General on open.
The old tests clicked or scrolled to a row that was already on screen, so a broken scroll still passed. The window is now short, the target is checked to be out of view first, and the click or scroll must bring it into view. Checked by breaking the page's overflow once: both tests fail.
The ring was a border that appeared only when focused, so a row grew and its text moved. Every row now has the border, transparent until it is the keyboard cursor. A mouse click shows no ring. The test checks the row height at rest against the height with the ring; it failed before the fix.
…t group

The block was always the first child, so with no question waiting the first group sat 48 px down instead of 24. The Questions block now appears only while a question waits, and the jump to a result counts it only when it is shown. Test: the first group starts one page gap below the top; it failed at 48 px before the fix.
The control box and the text column both grew, so each took half the row and every note wrapped early. Only the text grows now; the control keeps its own width. Test: a note takes more than 60% of its row; it was 283 of 630 px before the fix.
Plain rows used the 24 px section inset on every side, so three General rows took as much height as five rows do in bb. They now use the same 16 px across as the shortcut rows, and 12 px down. Test: the title sits 16 px in and 12 px down; it was 24 and 24 before the fix.
The title sat 24 px in and the search box 8 px in. The sidebar now starts at the same 24 px inset, and the title is observed so the test can read it. The test failed before the fix.
Appearance and Updates repeated their own name as the first heading. A heading now appears only where a section has more than one group. Test: Updates has no heading; it had one before the fix.
Screen readers and kg ui saw both as buttons. The list now keeps its id and its list role: the scrolling moved into an inner element, which had been replacing the id. The search box reports a text input with its value. Test: the list reports the list role; it reported none before the fix.
Cost: 68 lines, 71092 to 71160, recorded in decision 207.
…signed casts

Clippy caps a function at 100 lines, and the sidebar had grown to 111. The row loop is its own function, and the arrow keys compute the next row with unsigned arithmetic.
Cost: 4 more lines, 71160 to 71164, recorded in decision 207.
@aorumbayev
aorumbayev merged commit cee3d6d into main Nov 10, 2026
19 checks passed
@aorumbayev
aorumbayev deleted the feat/settings-sections branch November 10, 2026 11:03
aorumbayev added a commit that referenced this pull request Nov 10, 2026
…customize guide (#113)

Makes kagan's built-in skills shorter and easier for agents to pick, and
gives agents a map of plugin commands and of how to customize kagan.

## What changed
- **Trigger lines:** `kg-ui` and `kg-plugin-authoring` say "Use when…"
with the words a person says. `kg-cli`'s socket rules and `kg-threads`'s
`--environment` text are cut and point to their guide chapters.
`kg-skill-creator` gains a "Test it" step (trigger prompt, near-miss
prompt, with and without the skill).
- **Bundled skills carry files** (decision 207). Each bundled skill is a
folder; each read places it at `<dataDir>/agent/bundled/<hash>` (temp
folder, then rename; a lost race keeps the winner's folder). Each read
checks the folder against the binary; a damaged one is moved aside and
rebuilt. Leftover temp and broken folders older than an hour are swept.
- **Split:** `kg-plugin-authoring` 14.9 KB → 4.1 KB entry + 5
references. `kg-plugin-port` 22.5 KB → 3.8 KB entry + 6 references.
Nothing lost (checked line by line by script, twice).
- **`kg-plugin-commands`** (decision 208): generated from running
plugins' `cli` commands and their manifest `usage`; absent when none.
Manifest `cli` names and `usage` are now checked (one plain line, ≤200
chars, no backticks or control characters). The name is reserved from
plugins.
- **`kg guide customize` + `kg-customize`** (decision 209): themes,
keys, preferences (the one list now), `instructions.md` (which programs
get it), skill folders. The chapter lives in `docs/customize.md`. A test
runs every `kg …` command the chapter names against the CLI tree.

## Checked
fmt, clippy `-D warnings`, 1820 tests, size budget (71,013 of 71,092)
and the other scripts. A fresh reviewer's findings are fixed, each
behaviour fix with a test shown failing first.

## Note
#112 also adds decision 207 and touches the size budget; whichever
merges second renumbers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0