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

/security shows a status word and glyph per control and drops its explanatory paragraphs #13015

opened this

Merged 21d 3h ago, live in production

Each control on /settings/security/controls is now one row: a state badge with a glyph, the control's name, and when it was last checked. I did not take before/after pictures at 390 and 1280 px, light and dark, so the pull has none.

Notes

opened this

Each control on /settings/security/controls is now one row: a state badge with a glyph, the control's name, and when it was last checked. I did not take before/after pictures at 390 and 1280 px, light and dark, so the pull has none. The type check, bun scripts/design-lint.ts, test/security-controls.test.ts and test/mcp-size.test.ts pass. I did not run scripts/gate.ts or any other test file.

What changed (src/web/pages/security_controls.ts)

  • The badge is "Passing ✓", "Failed ✗", "Out of date !" or "No check recorded ·". It is a word and a glyph, never colour alone. "Passing" is new wording for a check that is fine; before, such a control showed only its time.
  • What the control holds and the test that keeps it now sit in a fold on the row, closed by default. Before, they were a hover title.
  • The "Each safeguard, and when it was last tested" paragraph is gone; only the back link remains.

Tests (test/security-controls.test.ts)

  • One row and one fold for each control in CONTROLS, so none can disappear.
  • The removed paragraph stays removed.
  • A passing control says "Passing" with its checked time.

What I did not do

  • I left /settings/security itself as it was. The intent was about controls, and the controls list is the page that has one row per control. That page's status rows still have their sentences ("No backup off the machine is known yet."). Trimming those is a separate change if you want it.
  • I added no MCP tool. The terminal rows are unchanged.

Try it: sign in as an admin, open /settings/security/controls, and open any row.

Closes #13001

7 earlier comments
commented

Each control on /settings/security/controls is now one row: a state badge with a glyph, the control's name, and when it was last checked. I did not take before/after pictures at 390 and 1280 px, light and dark, so the pull has none. The type check, bun scripts/design-lint.ts, test/security-controls.test.ts and test/mcp-size.test.ts pass. I did not run scripts/gate.ts or any other test file.

What changed (src/web/pages/security_controls.ts)

  • The badge is "Passing ✓", "Failed ✗", "Out of date !" or "No check recorded ·". It is a word and a glyph, never colour alone. "Passing" is new wording for a check that is fine; before, such a control showed only its time.
  • What the control holds and the test that keeps it now sit in a fold on the row, closed by default. Before, they were a hover title.
  • The "Each safeguard, and when it was last tested" paragraph is gone; only the back link remains.

Tests (test/security-controls.test.ts)

  • One row and one fold for each control in CONTROLS, so none can disappear.
  • The removed paragraph stays removed.
  • A passing control says "Passing" with its checked time.

What I did not do

  • I left /settings/security itself as it was. The intent was about controls, and the controls list is the page that has one row per control. That page's status rows still have their sentences ("No backup off the machine is known yet."). Trimming those is a separate change if you want it.
  • I added no MCP tool. The terminal rows are unchanged.

Try it: sign in as an admin, open /settings/security/controls, and open any row.

commented

Each control on /settings/security/controls is now one row: a state badge with a glyph, the control's name, and when it was last checked. The before/after pictures are still not on the pull: this page is admin-only and in none of the app.looks pages in forge.json. I did not add it to that list.

What changed

  • Badge: "Passing ✓", "Failed ✗", "Out of date !" or "No check recorded ·". It is a word and a glyph, never colour alone. "Passing" is new wording for a check that is fine; before, such a control showed only its time.
  • Fold: what the control holds and the test that keeps it now sit in a fold on each row, closed by default. Before, they were a hover title.
  • Prose: the "Each safeguard, and when it was last tested" paragraph is gone. Only the back link remains.

Why the check failed: the gate wants a Looks: or No look: line in a commit message for any pull that changes a page. I pushed an empty commit with a No look: line giving the reason above. I did not re-run the gate here, so the forge's check on this push is the test of it.

Tests (test/security-controls.test.ts)

  • Each control in CONTROLS gets exactly one row and one fold, so none can disappear.
  • The removed paragraph stays removed.
  • A passing control says "Passing" with its checked time.

Checks: the type check, bun scripts/design-lint.ts, test/security-controls.test.ts and test/mcp-size.test.ts pass. I did not run scripts/gate.ts or any other test file.

What I did not do

  • I left /settings/security itself unchanged. The issue's per-control rows are on the controls page, and that page's status rows still carry their sentences ("No backup off the machine is known yet."). Trimming those would be a separate change.
  • I added no MCP tool, and the terminal rows are unchanged.

Try it: sign in as an admin, open /settings/security/controls, and open any row.

commented

All four points from the review are addressed in one commit on this branch. The gate, tsc --noEmit, design-lint and test/security-controls.test.ts are green, and I did not view the page itself.

  • Terminal words: controlRows in src/tui/screens/controls.ts now gives a passing control "Passing, checked <date>". Failed and Out of date read the same way, and a control with no check says "No check recorded". The header comment and palette hint now say "its state" instead of "last tested". A new test in test/security-controls.test.ts checks the Passing, Failed and Out of date rows and fails without the change.
  • Docs: docs/features/security-controls.md now lists the four states, says the terminal uses the same words, and describes the fold instead of the hover title.
  • Pictures: /settings/security/controls is added to app.looks and app.looksAsOwner in forge.json, so the forge takes the 390 px and 1280 px light and dark shots on this push. I attached none myself.
  • Second way back: I removed the "Back to Security" paragraph. The settings layout's Security section nav already links back to Security.

I left the /settings/security status-row sentences alone, as you suggested.

commented

The preview deploy failed because adding /settings/security/controls to app.looks took the list to 25 paths, and the forge allows at most 24. I removed /settings/crew?help from app.looks, which brings it back to 24, and pushed.

I picked that path because it only adds the help variant of /settings/crew, which is still in the list. It stays in looksAsOwner, which is 17 paths. Nothing else in the pull changed.

I ran scripts/gate.ts after the edit and it printed nothing. I did not re-run tsc or the tests, since only forge.json changed, and I haven't seen the preview deploy since the push.

commented

The deploy failed because I left /settings/crew?help in looksAsOwner after removing it from looks, and every owner path must also be in looks. I removed it from looksAsOwner too and pushed.

looks now has 24 paths and looksAsOwner has 16, with none missing from looks. scripts/gate.ts printed nothing after the edit. Only forge.json changed, so I did not re-run tsc or the tests. I haven't seen the preview deploy since the push.

The pull now drops the /settings/crew?help look entirely, to make room for /settings/security/controls.

commented

Three of the four failing tests are fixed and pushed. I did not touch the fourth, the slow "stranger claims a small child" test. I ran the rest locally: forge-looks, palette-roster, security-controls, looks-owner and preview-looks pass, and tsc and gate are clean.

  • palette-roster: my change to the terminal palette hint broke this test, which pins the roster text. I updated its expected line to "each safeguard, its state, and when it was last checked".
  • forge-looks: the "below the top level" test only allowed /settings/crew and the preview seed's pages. I added /settings/security/controls to that list. The ?help test failed because I had wrongly removed /settings/crew?help earlier, so I put it back.
  • The 24-path cap: the cap forced a different trade. /feed is no longer pictured; it is in NOT_A_PAGE with a reason, as /pricing and /data were before it. The looks-owner test pins /preview-admin/sample/space, so it stays too. looksAsOwner is a subset of looks.
  • stranger claims a small child: this took 151 s and is a memory and timing test in a different area from this pull. I did not run it here, so a re-run of the check will show whether it was a flake.
  • looks.test.ts: its real-chromium capture test fails here because the sandbox has no browser. It fails the same way without my changes.
commented

I merged main into the branch, resolved the two conflicts and pushed (14c680374). The gate and tsc --noEmit are clean. I ran only the four test files that cover the change (forge-looks, looks-owner, home-frame, security-controls) and all 44 tests pass. I did not run the full suite; the forge's check does that on the push.

  • forge.json: main gave /feed's slot to /docs, and this pull had given it to /settings/security/controls. Both pages now keep a look, which put the list at 25 against the cap of 24, so /front loses its picture. looksAsOwner still names only paths that looks names.
  • test/forge-looks.test.ts: /feed now says its slot went to /docs. There is a new NOT_A_PAGE entry saying /front's slot went to the security controls.

Decision for review: I dropped /front because the open-help test pins /settings/crew?help, which the earlier commit on this branch had tried to drop. If you'd rather keep /front's picture, another look has to give up its slot instead.

commented

Left #13001 open: 1 unticked item remain (before/after pictures at 390 and 1280 px, light and dark, are on the pull).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs