Skip to content

feat(dystopia): open post details in a sheet and fade tab content - #1545

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

panicboat merged 10 commits into
feat/dystopia-karte-screensfrom
feat/dystopia-post-screens

Conversation

@panicboat

Copy link
Copy Markdown
Owner

Why

#1517 のモックの「詳細は右からスライドするシートで開く」を、投稿詳細に当てます。第 4 段(カルテ以外の画面)を 4 つに分けたうちの 4a(投稿まわり)です。stack: #1521 → #1542 → #1544 → 本 PR。

Decisions

  • 投稿詳細は、アプリ内では右からのシートで開き、/posts/[id] を直接開いたときはページで出す。中身(投稿・コメント入力・コメント一覧)は 1 つの部品をシートとページで使う
  • 開くのは、修飾キーのない左クリックのときだけ。Ctrl・⌘・Shift・Alt 付きや中クリックは今までどおりリンクとして動く(新しいタブで開ける)
  • 投稿カードは多くの一覧に出るため、シートは AppShell に 1 つだけ置き、小さな store から開く
  • シートの中のリンクは、第 1 段の規則どおり router.replace で移動し、今のページへのリンクならシートを閉じるだけにする
  • ホームと検索のタブ切り替えをフェードさせ、ホームのカルテ・レビュータブの説明文、検索の見出し、ブックマークが空のときの文言をモックに合わせる

Bug fix found while verifying

シートやページで書いたコメントが、一覧を作り直すまで出ませんでした。コメントの追加・削除のあとの取り直しが SWR の全体 mutate にキーを絞る関数を渡す形で、swr 2.5.1 はこの形で useSWRInfinite のキーを対象から外すためです(4a より前からある不具合)。一覧と同じキーを unstable_serialize で作って取り直す形に直しました。返信の一覧と削除も同じです。

Known limitations

  • シートでコメントしたあと、裏の一覧のカードのコメント数は、一覧を取り直すまで古いまま(以前はページへ移って戻ると取り直されていた)
  • 2 ページ目以降のコメントを削除しても、一覧から消えない(SWR の無限スクロールは全体の取り直しで 1 ページ目しか取り直さない)
  • /search のようにパスが同じでクエリだけ違う移動(シート内のハッシュタグ)では、シートが開いたまま残る。次の PR(4b)で直す

Verification

  • frontend: pnpm exec vitest run → 171 files / 741 tests passed、pnpm exec tsc --noEmit エラーなし、pnpm exec next build 成功
  • 実機(使い捨て DB + bin/grpc + next dev、puppeteer): 14 項目通過
    • ホームでコメントアイコン・本文を押すとシートが開き、URL は変わらない。戻る操作で閉じる
    • シートでコメントを書くと一覧に出る
    • ⌘ クリックはシートを開かず新しいタブで開く。/posts/<id> を直接開くとページで出る
    • プロフィールの返信タブから元の投稿をシートで開ける
    • シート内のリンクで別のページへ移るとシートが閉じ、戻る 1 回で元のページに戻る。今のページへのリンクではシートが閉じる
    • ホームのカルテ・レビュータブの説明文、検索の見出し
    • サーバーに ERROR なし

Docs

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

Refs #1517

🤖 Generated with Claude Code

https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5

…on a plain click

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…nd as a page by URL

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…bookmark copy to the mock

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

useSWRInfinite cache keys are skipped by matcher-form mutate in swr 2.5.1, so the lists never refreshed. Mutate the serialized infinite keys instead.

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
Pass the parent comment id so the delete mutates the reply list it belongs to.

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…nk inside the post sheet

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
…ve profile changes

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
… search tab fade

Claude-Session: https://claude.ai/code/session_01DA9qTtJtm2tPquKk7hyPR5
Signed-off-by: panicboat <panicboat@gmail.com>
@panicboat
panicboat added this pull request to stack #1543 October 16, 2026 12:26
@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: e9db14ae-38af-4378-8656-6e5ddb1ce87f
  • 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 the deploy:frontend Auto-generated deployment label label Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Kustomize Diff

Service: frontend
Environment: production

No changes

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant