Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(customize): response config, shared comment renderer, batched save queue

3 months ago

b7633a6
Authored
grim7/21/2026, 6:09:20 AM
/:org/:repo/customize is the response leg: what tripwire says and does
when a verdict lands.

- contracts: comment render layer moved from forge-github (renderCommentBody,
  checkSummary, reviewBody, CHECK_NAME + copy constants) so the worker and
  the web preview share one function. full-mode golden snapshots moved
  verbatim — 5/5 byte-identical vs pre-move, plus a live equality test.
  new renderVerdictComment modes: full / one-liner-link / link-only / custom
  ({{ruleName}} resolves the catalog contributorLabel, {{runUrl}} renders
  the view button).
- response config: per-repo response_configs (drizzle 0013), zod-gated jsonb,
  member read / admin write server fns, worker gates comment+check per verdict.
  BEHAVIOR CHANGE: passing change requests get the check only by default,
  no comment (onSuccess: ci-check). a verdict transition always writes the
  comment so a stale "blocked" never outlives its verdict.
- customize ui: pill controls with progressive disclosure, single-verdict
  preview (comment + always-present check row) with selection link, inline
  template editor with insertable vars, mobile drawer on the analytics
  sheet pattern (in-flow push, 55dvh cap).
- save-queue unit (components/save-queue): keyed pending changes,
  noop-clearing, injected commit + isEqual, partial-failure via failedKeys,
  floating unsaved-changes bar, nav guard (armed by mounting the bar).
  adopted on customize (6 writers) and rules (first useSaveQueueField
  consumer; per-rule fan-out commit; held re-confirm is a queued intent).
  per-change toasts gone — one commit, one toast.

Parent61d03d9

43 files changed
  • DECISIONS.md+22−0
  • apps/web/src/components/analytics/analytics-metrics-sheet.tsx+7−4
  • apps/web/src/components/customize/check-state-mock.tsx+71−0
  • apps/web/src/components/customize/customize-page-skeleton.tsx+85−0
  • apps/web/src/components/customize/customize-page.tsx+319−0
  • apps/web/src/components/customize/github-comment-mock.tsx+176−0
  • apps/web/src/components/customize/response-config-form.tsx+191−0
  • apps/web/src/components/customize/template-editor.tsx+86−0
  • apps/web/src/components/customize/verdict-toggle.tsx+50−0
  • apps/web/src/components/layouts/dashboard-topbar.tsx+6−0
  • apps/web/src/components/layouts/mobile-footer.tsx+6−0
  • apps/web/src/components/rules/rule-card.test.tsx+10−2
  • apps/web/src/components/rules/rule-card.tsx+40−72
  • apps/web/src/components/rules/rules-page.tsx+182−53
  • apps/web/src/components/save-queue/index.ts+16−0
  • apps/web/src/components/save-queue/save-queue-context.tsx+220−0
  • apps/web/src/components/save-queue/save-queue.test.ts+93−0
  • apps/web/src/components/save-queue/unsaved-changes-bar.tsx+50−0
  • apps/web/src/lib/response.functions.ts+56−0
  • apps/web/src/lib/response.query.ts+18−0
  • apps/web/src/lib/server-fn-classification.ts+2−0
  • apps/web/src/routes/$org.$repo.customize.tsx+16−0
  • apps/worker/src/jobs/comment-reasons.ts+4−2
  • apps/worker/src/jobs/pr-surface.ts+64−36
  • apps/worker/src/rerun.integration.test.ts+5−1
  • packages/contracts/src/__snapshots__/comment-render.test.ts.snap+108−0
  • packages/contracts/src/comment-render.test.ts+313−0
  • packages/contracts/src/comment-render.ts+297−0
  • packages/contracts/src/index.ts+2−0
  • packages/contracts/src/response.ts+82−0
  • packages/contracts/src/rules.ts+35−1
  • packages/db/drizzle/0013_outgoing_satana.sql+9−0
  • packages/db/drizzle/meta/0013_snapshot.json+2156−0
  • packages/db/drizzle/meta/_journal.json+7−0
  • packages/db/src/schema/repos.ts+17−0
  • packages/db/src/services/repos.ts+43−1
  • packages/forge-github/src/actions/__snapshots__/actions.test.ts.snap+0−83
  • packages/forge-github/src/actions/actions.test.ts+10−120
  • packages/forge-github/src/actions/check.ts+1−3
  • packages/forge-github/src/actions/comment.ts+7−67
  • packages/forge-github/src/copy.ts+7−152
  • packages/forge-github/src/index.ts+18−14
  • packages/forge-github/src/webhook/normalize.ts+1−1