Skip to content

refactor(board): remove theme column from Board table#47

Merged
ryota-murakami merged 3 commits intomainfrom
refactor/remove-board-theme
Feb 4, 2026
Merged

refactor(board): remove theme column from Board table#47
ryota-murakami merged 3 commits intomainfrom
refactor/remove-board-theme

Conversation

@ryota-murakami
Copy link
Contributor

@ryota-murakami ryota-murakami commented Feb 4, 2026

Summary

  • テーマはサイドバーのThemeToggle(Redux)でグローバルに管理されるため、Board単位のthemeカラムを削除
  • 不要になったtheme関連のバリデーション、アクション、型定義を削除

Changes

Database

  • 20260204000000_drop_board_theme.sql マイグレーションを追加
    • check_theme 制約を削除
    • create_default_board() トリガー関数を更新
    • theme カラムを削除

Application Code

  • themeSchema, updateThemeFormSchemavalidations/board.ts から削除
  • updateBoardThemeAction, UpdateBoardThemeStateboard.ts から削除
  • 未使用の Theme 型を types.ts から削除
  • database.types.ts を再生成

Tests

  • board-theme.test.ts を削除
  • board.test.ts からtheme関連テストを削除
  • CreateBoardForm.test.tsx からtheme関連テストを削除

Test plan

  • TypeCheck: パス
  • Lint: パス
  • Unit Tests: 86ファイル / 1211テスト パス

Summary by CodeRabbit

  • Removed Features

    • Board theme selection and theme previews have been removed from the app.
  • Documentation

    • Added the "supabase start" command to the development setup instructions.
  • Chores

    • Database schema updated to remove theme and related fields; theme-related validations, UI, and tests were removed or simplified.

Theme is now managed globally via Sidebar ThemeToggle (Redux),
not per-board. This removes the unused board-specific theme feature.

Changes:
- Add migration to drop theme column, constraint, and update trigger
- Remove themeSchema and updateThemeFormSchema from validations
- Remove updateBoardThemeAction from board actions
- Remove unused Theme type from types.ts
- Update related tests and regenerate database types
@vercel
Copy link
Contributor

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
gitbox Ready Ready Preview, Comment Feb 4, 2026 5:50am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

This PR removes board theming end-to-end: theme UI and logic are deleted from the create form and stories, theme parameters and actions are removed from server code and validations, the theme column/constraint is dropped via migration and seed data updated, and related tests and types are removed or adjusted.

Changes

Cohort / File(s) Summary
Create Board UI
src/app/boards/new/CreateBoardForm.tsx, src/app/boards/new/CreateBoardForm.stories.tsx
Removed all theme state, preview UI, effects, helpers, and theme submission; form now only handles board name. Story container width changed (w-[600px] → w-150).
Server Actions & Business Logic
src/lib/actions/board.ts
Removed theme parameter and theme handling from createBoard and updateBoard; deleted updateBoardThemeAction and theme-related validation/logging; insertion no longer seeds theme.
Validations & Exports
src/lib/validations/board.ts, src/lib/validations/index.ts
Deleted themeSchema and updateThemeFormSchema and removed their re-exports.
Types / DB Schema Surface
src/lib/supabase/database.types.ts, src/lib/supabase/types.ts
Removed theme from board types and deleted local Theme type; removed __InternalSupabase metadata; added/modified several projectinfo fields; added user_link_presets table.
Database Migration & Seed
src/supabase/migrations/20260204000000_drop_board_theme.sql, src/supabase/seed.sql
Migration drops theme constraint/column and updates default-board trigger; seed inserts no longer include theme values.
Tests
src/tests/unit/components/CreateBoardForm.test.tsx, src/tests/unit/lib/actions/board-theme.test.ts, src/tests/unit/lib/validations/board.test.ts, e2e/logged-in/create-board.spec.ts
Removed theme-focused unit and e2e tests; pruned theme-related assertions and test blocks, retaining basic form and validation tests.
Docs
README.md
Added supabase start before pnpm dev in dev server instructions.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(220,230,241,0.5)
    participant User
    participant UI as CreateBoardForm
    participant Server as createBoard action
    participant DB as Database
  end

  User->>UI: fill name + submit
  UI->>Server: POST createBoard(name)
  Server->>DB: INSERT board(name, settings, ...)
  DB-->>Server: insert result (board id)
  Server-->>UI: redirect / return success
  UI-->>User: navigate to new board
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

✨ Themes set down their paintbrushes,
Migrations sweep the canvas clean,
Forms now whisper just one name,
Types and tests trimmed neat and lean;
A lighter board begins to gleam.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: removing the theme column from the Board table throughout the codebase and database.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/remove-board-theme

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 and usage tips.

@morph-subagents
Copy link

🤖 Morph Preview Test

Preview URL: https://gitbox-31v46vez8-laststance.vercel.app

AI Summary

Issues:

  • Access to the preview environment is blocked by Vercel authentication.

Verified:

  • None

Notes:

  • Encountered a Vercel login wall when attempting to access the application, which prevents verification of the theme removal changes.

Recording

Preview Recording

View full session →


Automated testing by Morph

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.72%. Comparing base (dc01dec) to head (736a36e).

Files with missing lines Patch % Lines
src/app/boards/new/CreateBoardForm.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   75.03%   74.72%   -0.31%     
==========================================
  Files         119      119              
  Lines        3825     3779      -46     
  Branches      990      981       -9     
==========================================
- Hits         2870     2824      -46     
  Misses        939      939              
  Partials       16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Theme column was dropped from board table in migration
20260204000000_drop_board_theme.sql, but seed.sql and E2E tests
still referenced it, causing CI failures.

Changes:
- Remove theme column from board INSERT statements in seed.sql
- Remove theme selection tests from create-board.spec.ts (9 tests)
@morph-subagents
Copy link

🤖 Morph Preview Test

Preview URL: https://gitbox-8szodvycm-laststance.vercel.app

AI Summary

Issues:

  • None found (Testing could not be performed)

Verified:

  • None

Notes:

  • Access to the preview URL is blocked by Vercel deployment protection. The site redirects to a login page, preventing any verification of the UI or functionality changes.

Recording

Preview Recording

View full session →


Automated testing by Morph

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

🧪 E2E Coverage Report (Sharded: 12 parallel jobs)

Metric Coverage
Lines 91.38%
Functions 16.55%
Branches 15.87%
Statements 28.44%

📊 Full report available in workflow artifacts

@ryota-murakami ryota-murakami merged commit 399fd88 into main Feb 4, 2026
20 checks passed
@ryota-murakami ryota-murakami deleted the refactor/remove-board-theme branch February 4, 2026 06:08
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.

2 participants