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

A repository's Settings › Prompts speaks the home page's language #9839

opened this

Merged 24d 9h ago, live in production

Settings › Prompts no longer uses boxed cards, and it is pushed. One test in test/prompts.test.ts was already failing on main and still fails. I did not call keepplan; I don't have it in this session.

Notes

opened this

Settings › Prompts no longer uses boxed cards, and it is pushed. One test in test/prompts.test.ts was already failing on main and still fails. I did not call keep_plan; I don't have it in this session.

What changed

  • src/web/pages/prompts.ts now builds the page from two plain settings-block sections, with no card( or card-body.
    • Instagram: the connected account is a row() in a setting-list, with the Fetch now and Remove forms in its trail. With no account, it is one sentence plus the add form.
    • Getting a token: the Meta steps, with the text unchanged.
  • The form action paths are unchanged (/settings/prompts, /:id/run, /:id/delete), and so are the same-origin POST handlers.
  • No new class. I added one paragraph to docs/design/areas/settings.md describing the shape.
  • New test/prompts-language.test.ts fetches the page as an admin, once with no source and once with one. Inside <main> it checks one <h1>, no class="card or card-body, the add form, and the run and delete forms for the seeded source. It fails on the old page and passes now.

Checks

  • The gate, tsc, design-lint, test/prompts-etag.test.ts and the new test pass.
  • test/prompts.test.ts has one failing test, "nothing before the hour; once after it; not again the same day". It fails the same way on main with my change stashed (the tell's issue body lacks its title line). I did not touch it. The settings-page test in that file passes.

Not done: I did not run the full suite; the forge's check does that on the push.

Closes #9825

3 earlier comments
commented

Settings › Prompts no longer uses boxed cards, and it is pushed. One test in test/prompts.test.ts was already failing on main and still fails. I did not call keep_plan; I don't have it in this session.

What changed

  • src/web/pages/prompts.ts now builds the page from two plain settings-block sections, with no card( or card-body.
    • Instagram: the connected account is a row() in a setting-list, with the Fetch now and Remove forms in its trail. With no account, it is one sentence plus the add form.
    • Getting a token: the Meta steps, with the text unchanged.
  • The form action paths are unchanged (/settings/prompts, /:id/run, /:id/delete), and so are the same-origin POST handlers.
  • No new class. I added one paragraph to docs/design/areas/settings.md describing the shape.
  • New test/prompts-language.test.ts fetches the page as an admin, once with no source and once with one. Inside <main> it checks one <h1>, no class="card or card-body, the add form, and the run and delete forms for the seeded source. It fails on the old page and passes now.

Checks

  • The gate, tsc, design-lint, test/prompts-etag.test.ts and the new test pass.
  • test/prompts.test.ts has one failing test, "nothing before the hour; once after it; not again the same day". It fails the same way on main with my change stashed (the tell's issue body lacks its title line). I did not touch it. The settings-page test in that file passes.

Not done: I did not run the full suite; the forge's check does that on the push.

commented

Settings › Prompts now drops its boxed cards for two plain sections, and the branch is pushed again with the commit the check wanted. I haven't seen the check's verdict on the new push. Locally bun scripts/gate.ts printed nothing and the push went through.

The failure was only the missing "Try:" line. I added an empty commit with Try: open /<owner>/<repo>/settings/prompts on the preview as an admin.

What changed

  • src/web/pages/prompts.ts builds the page from two settings-block sections, with no card( or card-body.
    • Instagram: the connected account is a row with its Fetch now and Remove forms. With no account, it shows one sentence and the add form.
    • Getting a token: the Meta steps, with the text unchanged.
  • Every form's action path and same-origin POST handler is unchanged.
  • No new class. docs/design/areas/settings.md gets one paragraph describing the shape.
  • New test/prompts-language.test.ts fetches the page as an admin, once with no source and once with one. It checks one <h1> inside <main>, no class="card or card-body, the add form, and the run and delete forms. It fails on the old page and passes now.

Checks

  • tsc, design-lint, test/prompts-etag.test.ts and the new test passed on the first push.
  • test/prompts.test.ts has one failing test, "nothing before the hour; once after it; not again the same day". It fails the same way on main with my change stashed, and I did not touch it. If that fails the check, it is not from this change.

Not done: I did not run the full suite; the forge's check does that.

Try: open /<owner>/<repo>/settings/prompts on the preview as a repository admin. With no account you see the sentence and the add form. With one connected you see its row with Fetch now and Remove.

commented

I merged main into this branch and pushed it. The only conflict was in docs/design/areas/settings.md, and I kept both sides there.

Both sides had added a paragraph at the same spot. One is the Settings › Prompts paragraph from this pull. The other is the Settings › Hooks paragraph that came in from main (#9762). They now sit one after the other with a blank line between them, and no wording changed.

I ran scripts/gate.ts, bun x tsc --noEmit and scripts/design-lint.ts. All three passed. I ran only the two tests that cover this change and the merged docs, test/prompts-language.test.ts and test/hooks-rows.test.ts, and they passed (4 tests). I did not run the full suite here, since the forge runs it on the push.

commented

Left #9825 open: 1 unticked item remain (A new test/prompts-language.test.ts fetches the page as an admin of a seeded repository, once with no source and once with one, and asserts inside <main> one <h1>, no class="card and no card-body, the add form posting to /:owner/:name/settings/prompts, and the run and delete forms for the seeded source. It fails on main today.).

Sign in to join this conversation.

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

Keyboard shortcuts

Docs