Skip to content

feat: update database schema for search history and repository metadata#369

Merged
rainxchzed merged 2 commits intomainfrom
fix-room-migration
Mar 28, 2026
Merged

feat: update database schema for search history and repository metadata#369
rainxchzed merged 2 commits intomainfrom
fix-room-migration

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented Mar 28, 2026

  • Implement MIGRATION_6_7 to create a new search_history table for storing search queries and timestamps.
  • Update MIGRATION_5_6 to include additional repository metadata in the seen_repos table, including name, owner info, description, language, and URL.
  • Register MIGRATION_6_7 in the database initialization logic.

Summary by CodeRabbit

  • Style

    • Adjusted tab item padding spacing for improved visual layout.
  • New Features

    • Added search history database storage capability with new schema tables and data columns to track repository information.

- Implement `MIGRATION_6_7` to create a new `search_history` table for storing search queries and timestamps.
- Update `MIGRATION_5_6` to include additional repository metadata in the `seen_repos` table, including name, owner info, description, language, and URL.
- Register `MIGRATION_6_7` in the database initialization logic.
- Reduce the `targetValue` for horizontal padding in both selected and unselected states within `BottomNavigation.kt`.
- Update selected padding from 20.dp to 14.dp and unselected padding from 14.dp to 10.dp.
@rainxchzed rainxchzed merged commit 1403bad into main Mar 28, 2026
@rainxchzed rainxchzed deleted the fix-room-migration branch March 28, 2026 12:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 28, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fa92fe31-b322-4618-a422-471d4989c0da

📥 Commits

Reviewing files that changed from the base of the PR and between fe68d44 and 807a45b.

📒 Files selected for processing (4)
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt
  • core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt
  • core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt
  • core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt

Walkthrough

Adds a new DB migration (6→7) that creates search_history, extends seen_repos schema with repository metadata, registers the new migration in database init, and tweaks the horizontal padding animation targets for LiquidGlassTabItem in the bottom navigation.

Changes

Cohort / File(s) Summary
Database Migrations
core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt, core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt
MIGRATION_5_6: extended seen_repos table schema with repoName, repoOwner, repoOwnerAvatarUrl, repoDescription, primaryLanguage, repoUrl. MIGRATION_6_7: new migration creating search_history(query TEXT PRIMARY KEY, searchedAt INTEGER).
Database Initialization
core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt
Inserted MIGRATION_6_7 into the .addMigrations(...) chain (placed before existing MIGRATION_7_8).
Navigation UI
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt
Adjusted LiquidGlassTabItem animated horizontal padding targets from 20.dp/14.dp (selected/unselected) to 14.dp/10.dp.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibble at schemas, plant a search seed,
New columns sprout where repos feed—
A gentle hop, tabs stretch and lean,
Padding trimmed for a sleeker scene. 🥕✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-room-migration

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.

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