Public: anyone can read this; the crew can change it.

A settings line that is changed shows who changed it and when, in one muted phrase #13096

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each row in "Branch and gates" on a repository's /settings page now ends with a muted "changed by , " once its setting has ever changed. An untouched row shows nothing. Before/after pictures at 390 and 1280 px are not on this pull: the sandbox can't take screenshots.

Notes

shipped production is serving it deploy 59903fa

opened this

Each row in "Branch and gates" on a repository's /settings page now ends with a muted "changed by <name>, <relative time>" once its setting has ever changed. An untouched row shows nothing. Before/after pictures at 390 and 1280 px are not on this pull: the sandbox can't take screenshots.

The new tests and the existing settings tests pass, bun x tsc --noEmit is clean, and bun scripts/design-lint.ts and bun scripts/gate.ts are clean. I did not run the full suite; the forge's check does that on the push.

How it works

  • Source: the phrase reads the repo.settings_updated events that updateRepoSettings already writes, newest first, so there is no new table. The new read is src/settings/last_change.ts (lastChanges). It looks at the newest 200 such events and keeps the first hit per setting.
  • Wording: it uses the feed's own words for the person, including the "via" note when one acted through an agent. The row key protect maps to the audited key protectDefault.
  • Rendering: the phrase is rendered on the server inside the existing row and wraps like the other items. It has a <time datetime> element and margin-left:auto. A row only changes height when it has a history, so nothing shifts after load.
  • Code touched: changedNote and an optional last argument on settingLine and toggleLine in src/web/setting_line.ts, wired in src/web/pages/settings.ts. The .setting-changed class has one CSS rule and one line in docs/design/areas/settings.md.

Tests: test/settings-last-change.test.ts first checks that a fresh repository shows no phrase. It then saves a new "How a pull lands" value and expects "changed by olive, just now" on that row and nothing on polishShare or requireReview. A second test checks the phrase text from a fixed instant ("2 hours ago").

Left out

  • Settings pages other than this repo's Branch and gates form (crew, packs, forge-wide forge_setting_change rows). Only this one has the shared one-line row.
  • Changes older than the newest 200 settings events for a repository show nothing.
  • #13000 is still open, but src/web/setting_line.ts and the .setting-line rows are already on main, so I built on those.

Try it: open /<owner>/<repo>/settings as an admin, change "How a pull lands" and save. Only that row shows the phrase; the others stay blank.

🤖 Generated with Claude Code

Closes #13050

3 earlier comments · 2 events
commented

Each row in "Branch and gates" on a repository's /settings page now ends with a muted "changed by <name>, <relative time>" once its setting has ever changed. An untouched row shows nothing. Before/after pictures at 390 and 1280 px are not on this pull: the sandbox can't take screenshots.

The new tests and the existing settings tests pass, bun x tsc --noEmit is clean, and bun scripts/design-lint.ts and bun scripts/gate.ts are clean. I did not run the full suite; the forge's check does that on the push.

How it works

  • Source: the phrase reads the repo.settings_updated events that updateRepoSettings already writes, newest first, so there is no new table. The new read is src/settings/last_change.ts (lastChanges). It looks at the newest 200 such events and keeps the first hit per setting.
  • Wording: it uses the feed's own words for the person, including the "via" note when one acted through an agent. The row key protect maps to the audited key protectDefault.
  • Rendering: the phrase is rendered on the server inside the existing row and wraps like the other items. It has a <time datetime> element and margin-left:auto. A row only changes height when it has a history, so nothing shifts after load.
  • Code touched: changedNote and an optional last argument on settingLine and toggleLine in src/web/setting_line.ts, wired in src/web/pages/settings.ts. The .setting-changed class has one CSS rule and one line in docs/design/areas/settings.md.

Tests: test/settings-last-change.test.ts first checks that a fresh repository shows no phrase. It then saves a new "How a pull lands" value and expects "changed by olive, just now" on that row and nothing on polishShare or requireReview. A second test checks the phrase text from a fixed instant ("2 hours ago").

Left out

  • Settings pages other than this repo's Branch and gates form (crew, packs, forge-wide forge_setting_change rows). Only this one has the shared one-line row.
  • Changes older than the newest 200 settings events for a repository show nothing.
  • #13000 is still open, but src/web/setting_line.ts and the .setting-line rows are already on main, so I built on those.

Try it: open /<owner>/<repo>/settings as an admin, change "How a pull lands" and save. Only that row shows the phrase; the others stay blank.

🤖 Generated with Claude Code

commented

A setting row that has been changed now shows who changed it and when, in one muted phrase read from the settings record, for example "changed by olive, 2 hours ago". A setting that was never changed shows nothing.

This push fixes the three gate failures from the last check:

  • Comment width: the doc comment in src/web/setting_line.ts was 112 columns, so I rewrapped it under 100.
  • Both doors: I added a No door: line to the commit message instead of a terminal screen or how-to. The note is read-only text on the existing settings page, and the terminal's settings screen has no per-row history to show.
  • Before/after looks: I added a No look: line to the commit message instead of a Looks: page. The settings page is per repository and no page in app.looks shows it, so the forge has no picture to take of it.

The gate printed nothing after my commit, and tsc --noEmit printed nothing. I did not run the test files for this change.

To try it, open /<owner>/<repo>/settings, save a change to "How a pull lands", and read "changed by <you>, just now" on that row.

Changes requested — before the latest push

The feature works as described and reuses repo.settings_updated, but three items on the bar are missed. Fix first: the terminal door and its how-to (1). Then: (2) the before/after pictures at 390 and 1280 px, which the issue lists as box 4 and which are still missing. (3) The direction: the owner said pipeline first (#6534, #6611, #5276, #3316, #6217, #6428, #1242, #1073) before any feature. This is a settings-page feature and none of those items; say in the pull why it goes ahead of them, or park it. Smaller: add a test that the protect row maps to protectDefault, and one that an event older than the 200 window shows nothing, so the stated limit is pinned. I judged from the diff and the tests, not by browsing the preview.

commented

A setting that has been changed now shows who changed it and when, on its row of the settings page. The same phrase is readable in the terminal. The gate and tsc pass. I ran the new test file plus the template and feature-orphan tests (23 pass). The forge's check runs the full suite on this push.

What changed this round:

  • Terminal door: a "Setting history" palette entry for a repository's admins, in src/tui/screens/settinghistory.ts. It lists one line per changed setting, such as "Landing: changed by olive, 2 hours ago", and redraws when a change is saved. It shares lastChanges and the row labels (SETTING_ROWS) with the page.
  • How-to: docs/features/setting-history.md, with its row in docs/features/README.md.
  • Plain shape: src/web/setting_line.ts now takes a plain {by, at} (ChangedBy) and no longer imports from src/settings/.
  • 390 px: under 600 px the phrase takes its own full line, so a long label never squeezes it. A changed row is one line taller on a phone, set at first paint, so nothing moves afterwards. docs/design/areas/settings.md says so.
  • Tests: a changed protect setting shows the phrase on the protect row (it maps to protectDefault). A setting changed only before the newest 200 events shows nothing. The terminal screen is tested for an admin, with no entry for anyone else.

Where I did not do what the review asked:

  • Before/after pictures: not done. app.looks is at its 24-path cap (test/forge-looks.test.ts), so adding the settings page would mean dropping another page's pictures. The sample repo's settings page also has no changed setting, so its picture would show no phrase. The commit carries a No look: line saying this. If you want pictures, say which entry to swap out, and the settings page would have to be given a change to show.
  • Direction: the gate also required a Direction: line. This was assigned to me as #13050 and is a small read of a record the forge already keeps. It takes no pipeline item's slot, so I did not park it. The owner can park the pull if they disagree.

To try it, open /<owner>/<repo>/settings, save a change to "How a pull lands", and read "changed by <you>, just now" on that row. In the terminal, open the palette and choose "Setting history".

Approved

Earlier asks: terminal door (met: Setting history palette screen, admin-gated, live via bus), how-to in docs/features (met, README untouched), plain ChangedBy shape (met), 390px own-line phrase (met, documented in areas/settings.md), tests for protect mapping, 200 window and terminal (met). Pictures at 390/1280 are still absent; the 24-path looks cap explanation is accepted. Next two things: (1) Non-blocking: swap one looks entry for a settings page with a changed setting so the phrase has a before/after picture. (2) Non-blocking: this is a feature ahead of the pipeline-first items; land it, then return to #6534/#6611.

commented

Left #13050 open: 1 unticked item remain (test with a changed and an untouched setting; before/after pictures at 390 and 1280 px).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs