diff --git a/.claude/skills/steward/SKILL.md b/.claude/skills/steward/SKILL.md index 62707db0..2286cfcf 100644 --- a/.claude/skills/steward/SKILL.md +++ b/.claude/skills/steward/SKILL.md @@ -46,6 +46,16 @@ If you are awake when the PR goes green, merge it yourself rather than waiting f Merge with **squash**, keeping the PR title and number as the commit subject, and pin the merge to the head SHA you just checked (`expectedHeadSha`, or `gh pr merge --match-head-commit`) so a later push cannot slip in. Treat the merge call's result as a diagnostic: confirm with a separate read that the PR is merged at that SHA before telling James, in one line, and never retry a merge on the call's result alone. See `docs/verification-commands.md` **Pull request integration is a two-phase contract**. +## Deploy database migrations + +If the merged PR added or changed files under `supabase/migrations/`, the change is not live until the production database workflow runs. Run it yourself right after confirming the merge, without asking James. The PR request already covers it (`docs/migration-release.md` **4. Deploy through GitHub Actions**). + +- Confirm `origin/main` is the merge commit or a descendant of it, then dispatch `deploy-production-database.yml` on `main` with `confirmation=DEPLOY`. +- The run's completion does not wake you. Check it a few minutes later; it usually takes about two minutes. +- On success, confirm the new migration version is applied (the run's **Verify migration history** step, or a read-only migration list), and tell James in one line together with the merge. +- On failure, do not re-run. Read the failing step's log and tell James what failed. +- Never apply migration SQL to production any other way. + ## Update local main After confirming the merge (yours, or the workflow's when you next wake), bring James's local `main` up to date with `origin/main`. Fast-forward only, and never discard local work: diff --git a/AGENTS.md b/AGENTS.md index f77a98b9..edc1d3ff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ This block is written and re-added by `next dev` — verify at `node_modules/nex - **Domain language:** Before naming or changing a product concept, read `CONTEXT.md`. Deck Aggregate compatibility work also requires `docs/adr/0001-preserve-deck-aggregate-during-relational-cutover.md`; Deck List ownership, Deck Strategy association, or Tournament snapshot work also requires `docs/adr/0002-first-class-deck-lists-and-tournament-snapshots.md`. - **Notion issues:** Before reading, creating, triaging, or updating an issue or specification, read `docs/agents/issue-tracker.md`. -- **Database migrations:** Before authoring, reviewing, or releasing a Supabase schema change, read `docs/migration-release.md`. Local hooks validate; only the controlled production workflow deploys. +- **Database migrations:** Before authoring, reviewing, or releasing a Supabase schema change, read `docs/migration-release.md`. Local hooks validate; only the controlled production workflow deploys, and the session that merges a migration dispatches it. - **Reference data:** Before changing a catalog or cached reference dataset, read `docs/agents/reference-data.md`. - **Battle Replay:** Before changing Battle Replay reconstruction, display, card information or its tests, read `docs/agents/battle-replay-rules.md`. It is James's authoritative game-rule contract and overrides any earlier "never infer" guidance, including the prototype's productisation note. Measure success against real saved logs, never invented log wording. - **Deck-list ordering:** Before changing a deck-list sort, snapshot, share, or `sortedCards` path, read `docs/agents/deck-list-ordering.md`. diff --git a/README.md b/README.md index 76ad1462..bb59a93e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ cp .env.example .env - For a new Supabase project, apply [`schema.sql`](./schema.sql). It is the complete schema snapshot; do not replay the historical incremental SQL over it. - For an existing environment, inspect migration history and the target schema before applying anything. [`supabase/migrations`](./supabase/migrations) is the release authority. [`sql`](./sql) is historical reference material, not a fresh-install sequence or a destination for new migrations. -- Local Git hooks validate database changes without deploying them. Production migrations run only through the manually dispatched `Deploy production database` workflow after merge to `main`; see [`docs/migration-release.md`](./docs/migration-release.md). +- Local Git hooks validate database changes without deploying them. Production migrations run only through the `Deploy production database` workflow, which the merging session dispatches after merge to `main`; see [`docs/migration-release.md`](./docs/migration-release.md). 5. Configure Supabase Auth redirect URLs for each environment: diff --git a/app/(app)/tournaments/[id]/page.tsx b/app/(app)/tournaments/[id]/page.tsx index 0fd2984e..4ae22a13 100644 --- a/app/(app)/tournaments/[id]/page.tsx +++ b/app/(app)/tournaments/[id]/page.tsx @@ -257,23 +257,23 @@ export default async function TournamentDetailPage({ params }: TournamentDetailP
-
+
{isJudge ? ( ) : ( )} -
-
+
+
{isJudge ? getTournamentJudgeRoleLabel(tournament.judgeRole) : stackDeckName(tournamentDeckName)}
-
+
{isJudge ? null : resolvedTournamentDeckList ? ( -
+
) : ( -
+