Skip to content

feat(dystopia): rebuild the karte screens around summary cards and a detail sheet - #1544

Merged
panicboat merged 10 commits into
feat/dystopia-karte-lifecyclefrom
feat/dystopia-karte-screens
Oct 17, 2026
Merged

panicboat merged 10 commits into
feat/dystopia-karte-lifecyclefrom
feat/dystopia-karte-screens

Conversation

@panicboat

Copy link
Copy Markdown
Owner

Why

#1517 のモックと #1519 のカルテ画面に合わせて、カルテの画面を作り直します。キャストがゲストから連絡を受けたときに、平均評価ですぐ判断でき、少ない操作で記録できるようにするためです(#1519 §11)。

4 段の stack の第 3 段です(第 1 段 #1521、第 2 段 #1542)。

Decisions

  • カードは要約だけを出し、追記・出来事の編集と削除・星・完了と再オープン・削除は、右から出る詳細シートにまとめる
  • 一覧ごとに開いているカルテの id を持つ。操作のあとは、表示中のカルテの一覧と詳細をすべて取り直す。SWR の全体 mutate に関数でキーを渡すと useSWRInfinite のキーが対象から外れるため、hook が取り直し関数を登録する形にした
  • 自分のカルテに件数(全体・記録中・完了)を出す。ListMyKartes の最初のページの応答に件数を足した
  • 並び順: 自分のカルテとプロフィールは最後の動き(作成・追記・完了・再オープン)の新しい順、ホームは最新の出来事の発生日の新しい順。出来事の編集と星の変更では順番を動かさない
  • 旧カルテ 3 表の削除は第 4 段で行う(第 2 段と同じ deploy に入れない)

Deploy impact

karte.kartes に last_activity_at・last_occurred_on の 2 列を足し、既存の行を埋める migration が流れます。列には既定値があるので、migration の後でアプリが入れ替わるまでの間も第 2 段のアプリは動きます。

Verification

  • monolith: HANAMI_ENV=test bundle exec rspec → 774 examples, 0 failures
  • frontend: pnpm exec vitest run → 162 files / 712 tests passed、pnpm exec tsc --noEmit エラーなし、pnpm exec next build 成功
  • migration: 既存の行を入れた test DB に流し、last_activity_at が updated_at、last_occurred_on が出来事の発生日の最大値になることを確かめた
  • 実機(使い捨て DB + bin/grpc + next dev、puppeteer): 25 項目通過
    • プロフィールの「このゲストのカルテを書く」から、ゲストを選ばずに作成できる
    • 補足が必須の対応結果は、補足を入れるまで追記できない。出来事の編集ができる
    • 星 4 で完了すると、シートを開いたまま「完了」になり、平均が「4.0」「1人が評価 · 1件」になる。再オープンで「—」に戻る
    • 別のキャストには詳細シートの操作が出ない
    • 自分のカルテの件数が作成・削除で変わり、追記したカルテが一覧の先頭に上がる
    • ホームのカードからゲストのプロフィールへ移動できる。削除するとシートが閉じる。ゲストにはカルテの入口が出ない
    • 削除のあとにサーバーの ERROR が出ない
    • 取り直しの GET を止めても、星と完了の結果がその場でシートに出る

Docs

  • spec: docs/superpowers/specs/2026-10-16-dystopia-karte-screens-design.md
  • plan: docs/superpowers/plans/2026-10-16-dystopia-karte-screens.md

Refs #1517
Refs #1519

🤖 Generated with Claude Code

https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c6c4a99-0091-40c3-bd51-d5f96b7024ac
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@panicboat-github-workflow-bot panicboat-github-workflow-bot Bot added deploy:frontend Auto-generated deployment label deploy:monolith Auto-generated deployment label labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Kustomize Diff

Service: monolith
Environment: production

No changes

@github-actions

Copy link
Copy Markdown
Contributor

Kustomize Diff

Service: frontend
Environment: production

No changes

…h registered hooks

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…feed by the latest event date

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…very karte view after a change

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
… and reliability header

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…ery author operation

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…heet on every karte screen

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…stop reading a deleted karte

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…nd polish list states

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
@panicboat
panicboat force-pushed the feat/dystopia-karte-screens branch from 7f33801 to 72c43fe Compare October 16, 2026 09:04
@panicboat
panicboat added this pull request to stack #1543 October 16, 2026 09:04
@panicboat-github-workflow-bot panicboat-github-workflow-bot Bot added deploy:frontend Auto-generated deployment label deploy:monolith Auto-generated deployment label and removed deploy:monolith Auto-generated deployment label deploy:frontend Auto-generated deployment label labels Oct 16, 2026
@panicboat
panicboat marked this pull request as ready for review October 17, 2026 01:44
@panicboat
panicboat merged commit 6a607a0 into main Oct 17, 2026
24 of 26 checks passed
@panicboat
panicboat deleted the feat/dystopia-karte-screens branch October 17, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy:frontend Auto-generated deployment label deploy:monolith Auto-generated deployment label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant