Skip to content

デザイン刷新: 案「ふたり」を全画面に適用 - #21

Merged
yamk12nfu merged 3 commits into
mainfrom
feature/design-renewal
Aug 2, 2026
Merged

yamk12nfu merged 3 commits into
mainfrom
feature/design-renewal

Conversation

@yamk12nfu

@yamk12nfu yamk12nfu commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

概要

ワイヤーフレーム状態だったUIを、デザイン案「ふたり」(メンバー2色で貸し借りを描く)で全画面刷新する。

  • デザイントークン: globals.css に色・影のトークンを定義(ライト/ダーク両対応)。自分=青緑(--me)、パートナー=菫(--partner)をアプリ全体で固定
  • フォント: Zen Maru Gothic(丸ゴシック)を next/font で導入。金額は tabular-nums で桁を揃える
  • 天秤バー: ホームの差額カードに、未精算の支払い合計をメンバー色で分けたバーを追加。多く払っている側へわずかに傾く。比率算出のため settlements.currentBalance に paidBySelf / paidByPartner を追加(既存の member スコープ内での集計のみ)
  • メンバー色の一貫適用: 支出一覧の行の左縁=支払者色、負担区分チップ(折半は2色グラデーション)、詳細画面の仕分け内訳のドット
  • 共通化: 各画面に散っていた見た目クラスを lib/ui.ts に集約

確認

  • tsc --noEmit(編集ごとのhookで実施)
  • npm run lint: エラーなし(既存warningのみ)
  • npm test: 214件パス
  • ログイン画面をライト/ダークで実機確認
  • 認証後の画面(ホーム・登録・精算など)はプレビューデプロイでの確認をお願いします

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新機能

    • ホーム画面に、支払額の比率を視覚化する天秤バーを追加しました。
    • 支出一覧で、支払者を色付きの表示で識別できるようになりました。
    • 精算情報に、自分と相手それぞれの支払額を表示できるようになりました。
  • スタイル

    • アプリ全体のテーマ、配色、カード、ボタン、入力欄などを統一しました。
    • ライト/ダークテーマに対応したデザインを強化しました。
    • アプリ全体のフォントを変更し、ログイン画面のレイアウトも改善しました。

メンバー2色(自分=青緑/相手=菫)を情報設計の軸にしたデザインへ刷新する。

- globals.css にデザイントークンを定義(ライト/ダーク両対応)、
  フォントを Zen Maru Gothic に変更
- 共通の見た目クラスを lib/ui.ts に集約
- ホームの差額カードに天秤バー(支払い比率をメンバー色で表示)を追加。
  比率算出のため settlements.currentBalance に paidBySelf /
  paidByPartner を追加
- 支出一覧の行に支払者色の左縁、負担区分チップ・仕分け内訳にも
  メンバー色を適用(折半は2色グラデーション)
- 全画面のカード・ボタン・バッジ・リンクを新トークンに置き換え

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
warikapp Ignored Ignored Preview Aug 2, 2026 3:24pm

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

aro guard: policies 違反を検出しました

kind path 内容
too_many_files - 変更ファイル数が上限を超えています: 17 > 10
too_many_added_lines - 追加行数の合計が上限を超えています: 414 > 400

検証ルールは base 側の .ai/project.yaml と適用 policy から読まれます(PR 内の変更では緩められません)。詳細: docs/guard.md

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yamk12nfu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e083270-4498-47b5-b78f-cebe72235ce1

📥 Commits

Reviewing files that changed from the base of the PR and between 6c35c39 and 57da8fa.

📒 Files selected for processing (12)
  • app/(app)/expenses/[id]/expense-detail-client.tsx
  • app/(app)/expenses/new/receipt/receipt-client.tsx
  • app/(app)/home-client.tsx
  • app/(app)/settings/settings-client.tsx
  • app/(app)/settlement/settlement-client.tsx
  • app/(app)/settlements/settlements-client.tsx
  • app/(app)/setup/setup-client.tsx
  • app/globals.css
  • components/ExpenseEditor.tsx
  • components/InviteCodeCard.tsx
  • convex/settlements.test.ts
  • lib/ui.ts

Walkthrough

デザイントークンと共通UIクラスを追加し、画面全体の配色、フォント、レイアウトを更新しました。確定済み支出の支払者別集計を追加し、ホーム画面に未精算額の天秤表示を追加しました。開発サーバーの起動構成も追加しました。

Changes

テーマ基盤と共通UI

Layer / File(s) Summary
テーマ基盤と共通UI
app/globals.css, app/layout.tsx, lib/ui.ts
ライト/ダークテーマ用トークン、共通UIクラス、Zen_Maru_Gothicフォントを追加しました。

支払額集計とホーム表示

Layer / File(s) Summary
支払額集計とホーム表示
convex/settlements.ts, app/(app)/home-client.tsx
paidBySelfとpaidByPartnerを集計し、ホーム画面に未精算額の天秤バーと支払者別表示を追加しました。

支出画面と入力UI

Layer / File(s) Summary
支出画面と入力UI
app/(app)/expenses/..., app/(app)/expenses/new/..., components/ExpenseEditor.tsx, components/InviteCodeCard.tsx
支出詳細、編集、登録、招待コード、入力部品をテーマ用クラスへ更新しました。負担区分チップに自分と相手の色分けを追加しました。

設定・セットアップ・精算画面

Layer / File(s) Summary
設定・セットアップ・精算画面
app/(app)/settings/..., app/(app)/setup/..., app/(app)/settlement/..., app/(app)/settlements/...
設定、セットアップ、精算、精算履歴の色、境界線、角丸、ボタン、状態表示をテーマ用クラスへ更新しました。

ログイン画面レイアウト

Layer / File(s) Summary
ログイン画面レイアウト
app/login/[[...rest]]/page.tsx
ログイン画面にブランド名と説明文を追加し、縦方向のレイアウトへ変更しました。

開発サーバー起動構成

Layer / File(s) Summary
開発サーバー起動構成
.claude/launch.json
npm run devをポート3000で実行する起動構成を追加しました。

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant 利用者
  participant HomeClient
  participant ConvexSettlements
  利用者->>HomeClient: ホーム画面を表示
  HomeClient->>ConvexSettlements: currentBalance または pending を取得
  ConvexSettlements-->>HomeClient: paidBySelf、paidByPartner、currentBalance
  HomeClient-->>利用者: 未精算額と天秤バーを表示
Loading

Possibly related PRs

Poem

うさぎが跳ねる、テーマの道
色と影が画面を彩る
天秤バーが支払額を示し
ふたりの精算をそっと支える
にんじん色のUI、完成です 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、デザイン案「ふたり」を全画面へ適用する主要な変更内容を明確かつ簡潔に示しています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/design-renewal

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.

フロントが先に新しくなり、Convex側がまだ旧関数(paidBySelf /
paidByPartner を返さない)の間、formatYen(undefined) で
ホームが落ちていた。?? 0 で防御する(デプロイ順に依存しない)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

aro guard: policies 違反を検出しました

kind path 内容
too_many_files - 変更ファイル数が上限を超えています: 17 > 10
too_many_added_lines - 追加行数の合計が上限を超えています: 413 > 400

検証ルールは base 側の .ai/project.yaml と適用 policy から読まれます(PR 内の変更では緩められません)。詳細: docs/guard.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
convex/settlements.ts (1)

89-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

支払者別合計の期待値をテストしてください。

currentBalance の既存テストは amount と方向を検証しますが、paidBySelf と paidByPartner を検証しません。支払い比率バーはこの 2 値に依存します。

最初の 5,000 円と 2,000 円のケースで、paidBySelf: 5000 と paidByPartner: 2000 を toMatchObject に追加してください。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@convex/settlements.ts` around lines 89 - 121, Update the existing
currentBalance test for the initial 5,000-yen and 2,000-yen expense case to
include paidBySelf and paidByPartner in its toMatchObject expectations,
verifying values of 5000 and 2000 respectively.
app/(app)/expenses/[id]/expense-detail-client.tsx (1)

17-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

共有クラスを lib/ui.ts から利用してください。

Line [18] の badgeClass は lib/ui.ts の Line [32-33] と同一です。Line [187] と Line [216] の金額スタイルも、lib/ui.ts の amountClass と重複します。

ローカル定義を削除し、@/lib/ui から badgeClass と amountClass を import してください。テーマ変更時の表示分岐を防止できます。

Also applies to: 187-188, 216-217

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/`(app)/expenses/[id]/expense-detail-client.tsx around lines 17 - 18,
Remove the local badgeClass and amount-style definitions in the expense detail
component, and import the shared badgeClass and amountClass from "`@/lib/ui`"
instead. Update the usages near the expense detail styling, including the amount
styles around lines 187 and 216, while preserving the existing rendered
behavior.
app/(app)/settings/settings-client.tsx (1)

12-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

lib/ui.ts の共通クラスを各画面で再利用してください。

各画面が inputClass または linkClass の文字列を複製しています。共通定数をimportし、画面固有のクラスだけを追加してください。

  • app/(app)/settings/settings-client.tsx#L12-L13: inputClassのローカル定義を共通定数に置き換えてください。
  • app/(app)/settings/settings-client.tsx#L96-L96: ホームリンクでlinkClassを使用してください。
  • app/(app)/setup/setup-client.tsx#L18-L19: inputClassのローカル定義を共通定数に置き換えてください。
  • app/(app)/settlement/settlement-client.tsx#L104-L106: ホームリンクでlinkClassを使用してください。
  • app/(app)/settlement/settlement-client.tsx#L189-L190: メモ入力欄でinputClassを使用し、追加クラスだけを連結してください。
  • app/(app)/settlements/settlements-client.tsx#L111-L113: ホームリンクでlinkClassを使用してください。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/`(app)/settings/settings-client.tsx around lines 12 - 13,
各画面で重複している入力欄・リンク用クラスをlib/ui.tsの共通定数から再利用する。app/(app)/settings/settings-client.tsxの12-13行ではローカルinputClassを共通定数に置き換え、96行ではホームリンクにlinkClassを適用する。app/(app)/setup/setup-client.tsxの18-19行でもinputClassを共通定数へ置き換える。app/(app)/settlement/settlement-client.tsxの104-106行ではlinkClassを、189-190行ではinputClassに画面固有の追加クラスだけを連結して使用する。app/(app)/settlements/settlements-client.tsxの111-113行ではホームリンクにlinkClassを使用する。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/globals.css`:
- Around line 8-22: ライトテーマのCSS変数 --muted を、--background
に対して通常サイズの文字でもコントラスト比4.5:1以上になる、より濃い色へ更新してください。その他のテーマ変数や利用箇所は変更せず、既存の muted
テキスト用途を維持してください。

In `@lib/ui.ts`:
- Around line 12-13: Update primaryButtonClass to use dedicated theme-aware
action color tokens instead of fixed bg-me and text-white classes. Add or
reference --me-action for the button background and --on-me-action for its
foreground, while preserving --me as the member-identification color.

---

Nitpick comments:
In `@app/`(app)/expenses/[id]/expense-detail-client.tsx:
- Around line 17-18: Remove the local badgeClass and amount-style definitions in
the expense detail component, and import the shared badgeClass and amountClass
from "`@/lib/ui`" instead. Update the usages near the expense detail styling,
including the amount styles around lines 187 and 216, while preserving the
existing rendered behavior.

In `@app/`(app)/settings/settings-client.tsx:
- Around line 12-13:
各画面で重複している入力欄・リンク用クラスをlib/ui.tsの共通定数から再利用する。app/(app)/settings/settings-client.tsxの12-13行ではローカルinputClassを共通定数に置き換え、96行ではホームリンクにlinkClassを適用する。app/(app)/setup/setup-client.tsxの18-19行でもinputClassを共通定数へ置き換える。app/(app)/settlement/settlement-client.tsxの104-106行ではlinkClassを、189-190行ではinputClassに画面固有の追加クラスだけを連結して使用する。app/(app)/settlements/settlements-client.tsxの111-113行ではホームリンクにlinkClassを使用する。

In `@convex/settlements.ts`:
- Around line 89-121: Update the existing currentBalance test for the initial
5,000-yen and 2,000-yen expense case to include paidBySelf and paidByPartner in
its toMatchObject expectations, verifying values of 5000 and 2000 respectively.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab7eb021-0ac6-46ea-9a31-c33129ae7487

📥 Commits

Reviewing files that changed from the base of the PR and between 774d3c8 and 6c35c39.

📒 Files selected for processing (17)
  • .claude/launch.json
  • app/(app)/expenses/[id]/edit/expense-edit-client.tsx
  • app/(app)/expenses/[id]/expense-detail-client.tsx
  • app/(app)/expenses/new/manual/manual-client.tsx
  • app/(app)/expenses/new/receipt/receipt-client.tsx
  • app/(app)/home-client.tsx
  • app/(app)/settings/settings-client.tsx
  • app/(app)/settlement/settlement-client.tsx
  • app/(app)/settlements/settlements-client.tsx
  • app/(app)/setup/setup-client.tsx
  • app/globals.css
  • app/layout.tsx
  • app/login/[[...rest]]/page.tsx
  • components/ExpenseEditor.tsx
  • components/InviteCodeCard.tsx
  • convex/settlements.ts
  • lib/ui.ts

Comment thread app/globals.css
Comment thread lib/ui.ts Outdated
Comment on lines +12 to +13
export const primaryButtonClass =
"rounded-full bg-me px-4 py-3 text-center text-sm font-bold text-white disabled:opacity-50";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

主要ボタンの前景色と背景色をテーマごとに定義してください。

Line 13 は bg-me text-white を固定しています。ライトテーマでは約 3.8:1、ダークテーマでは約 2.5:1 です。通常サイズのボタン文字に必要な 4.5:1 を満たしません。

--me はメンバー識別色として維持してください。主要操作には --me-action と --on-me-action のような専用トークンを追加してください。

修正例
--- app/globals.css
 :root {
+  --me-action: `#0b6e63`;
+  --on-me-action: `#ffffff`;
 }
 `@media` (prefers-color-scheme: dark) {
   :root {
+    --me-action: `#6fd3c6`;
+    --on-me-action: `#1c1a17`;
   }
 }
 `@theme` inline {
+  --color-me-action: var(--me-action);
+  --color-on-me-action: var(--on-me-action);
 }

--- lib/ui.ts
 export const primaryButtonClass =
-  "rounded-full bg-me px-4 py-3 text-center text-sm font-bold text-white disabled:opacity-50";
+  "rounded-full bg-me-action px-4 py-3 text-center text-sm font-bold text-on-me-action disabled:opacity-50";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/ui.ts` around lines 12 - 13, Update primaryButtonClass to use dedicated
theme-aware action color tokens instead of fixed bg-me and text-white classes.
Add or reference --me-action for the button background and --on-me-action for
its foreground, while preserving --me as the member-identification color.

- 色トークンをWCAG AA基準(文字4.5:1・UI輪郭3:1)まで再調整。
  ダークモードのメンバー色ボタンは白文字だと2.5:1しかないため、
  --on-accent(ライト=白/ダーク=濃色)を導入して文字色を切り替える
- 区切り線(--line)と入力欄・ボタン輪郭(--edge)のトークンを分離。
  輪郭が1.2:1でほぼ見えなかった問題を修正
- lib/ui.ts の未使用クラスを削除し、重複していたローカル定義を
  共通クラスのimportへ置き換え。cardClassのpadding重複も解消
- currentBalance の paidBySelf / paidByPartner にテストを追加
  (視点の反転・ドラフト除外・精算後のリセット)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

aro guard: policies 違反を検出しました

kind path 内容
too_many_files - 変更ファイル数が上限を超えています: 18 > 10
too_many_added_lines - 追加行数の合計が上限を超えています: 472 > 400

検証ルールは base 側の .ai/project.yaml と適用 policy から読まれます(PR 内の変更では緩められません)。詳細: docs/guard.md

@yamk12nfu
yamk12nfu merged commit d0566f5 into main Aug 2, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant