Skip to content
Myr

Review fixes for 1212

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- Land a contents anchor's heading below the sticky bars: the scroll margin sat on the section, but the fragment targets the h2 that carries the id, so at 390 and 1440 every heading scrolled under the top or context bar. The margin now sits on the h2 (seen at 64 px clear in both widths). - Test added: each section's anchor target carries a scroll margin (red by assertion before the move). - The proposals limit read "0 takes none"; the policy schema's own words are that 0 turns proposals off, so the row says that (agent-kit, its test and the /agents.md golden; the plugin goldens do not move). - The /agents.md link in the page's head used a copy of the reference's running-text link class; it now uses the one constant.

authored by oscabriel · committed by oscabriel · parent 9fe2999 · Browse files · 6 files+30 added−13 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+30 added−13 removed

  • tests:+23 added−2 removed
  • other:+7 added−11 removed

6 files+30 added−13 removed

modified:apps/web/src/features/agents/reference.tsx+4 added-6 removed
modified:apps/web/src/features/agents/setup-page.tsx+2 added-4 removed
26 unmodified lines
27import { Workspace } from "../shared/shell/workspace.tsx";28import {29 Endpoints,30 Limits,31 LINK,32 ReferenceSection,33 Refusals,34 Synopsis,35} from "./reference.tsx";
84 unmodified lines
120 meta={121 <>122 Every way in reaches the same asks, claims and verdicts. As Markdown:{" "}123 {/* A server route, not a page of the app. */}123 <a124 className="text-foreground decoration-rule underline underline-offset-[0.2em] hover:decoration-current"125 href="/agents.md"126 >124 <a className={`text-foreground ${LINK}`} href="/agents.md">125 agents.md126 </a>127 </>128 }
21 unmodified lines
modified:apps/web/test/agents.test.tsx+21 added
125 unmodified lines
126 expect(anchors).toStrictEqual(SECTIONS.map(([id]) => id));127 })128 );129130 it.effect(131 "lands each anchor's heading below the sticky bars, not under them",132 () =>133 Effect.gen(function* () {134 const html = yield* page;135136 for (const [id] of SECTIONS) {137 // The element the fragment scrolls to is the one with the id: its138 // own scroll margin is the one the browser reads.139 const target = new RegExp(140 `<[a-z0-9]+\\b[^>]*\\bid="${id}"[^>]*>`,141 "u"142 )143 .exec(html)144 ?.at(0);145146 expect(target, `#${id}`).toMatch(/\bscroll-mt-\d+\b/u);147 }148 })149 );150151 it.effect("gives every command of the CLI a synopsis line, in mono", () =>152 Effect.gen(function* () {153 const synopsis = codeOf(sectionOf(yield* page, "synopsis"));154
124 unmodified lines
modified:packages/agent-kit/src/agent-setup.ts+1 added-1 removed
272 unmodified lines
273 value: `${caps.claimsPerPerson} by default`,274 },275 {276 limit: "Open proposals one person holds, in a project",277 value: `${caps.proposalsPerPerson} by default; 0 takes none`,277 value: `${caps.proposalsPerPerson} by default; 0 turns proposals off`,278 },279 {280 limit: "A claim without a push",281 value: `Warned after ${span(claims.warnAfterMs)}, lapses after ${span(claims.lapseAfterMs)}, by default`,
92 unmodified lines
modified:packages/agent-kit/test/golden/agent-setup.txt+1 added-1 removed
111 unmodified lines
112113| Limit | Value |114| --- | --- |115| Claims one person holds at once, in a project | 3 by default |116| Open proposals one person holds, in a project | 2 by default; 0 takes none |116| Open proposals one person holds, in a project | 2 by default; 0 turns proposals off |117| A claim without a push | Warned after 2 hours, lapses after 1 day, by default |118| Decisions a decider takes a day | 5 by default |119| A decision nobody takes | 2 weeks by default, then it takes its default |120| Claims, proposals and drafts across the platform, per person | A set number a minute; past it, CapReached says when to try again |
16 unmodified lines
modified:packages/agent-kit/test/agent-setup.test.ts+1 added-1 removed
244 unmodified lines
245 const values = agentLimits().map(({ value }) => value);246247 expect(values).toStrictEqual([248 "3 by default",249 "2 by default; 0 takes none",249 "2 by default; 0 turns proposals off",250 "Warned after 2 hours, lapses after 1 day, by default",251 "5 by default",252 "2 weeks by default, then it takes its default",253 "A set number a minute; past it, CapReached says when to try again",
30 unmodified lines