Skip to content

refactor(project): remove space fields from Project and schema - #748

Merged
haiphucnguyen merged 2 commits into
mainfrom
feature/improvements
Oct 3, 2026
Merged

haiphucnguyen merged 2 commits into
mainfrom
feature/improvements

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Summary

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

  • Eliminate spaceId and spaceName from Project data class to simplify the domain model.
  • Drop related database columns via new migration 62 to keep the schema in sync.
  • Update repository logic and UI imports to match the revised Project structure.
  • Add a dev‑mode guard in Analytics to skip tracking for developers.
  • Adjust NetworkSettingsSection package and styling to reflect the new layout.

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • [] I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- Eliminate spaceId and spaceName from Project data class to simplify the domain model.
- Drop related database columns via new migration 62 to keep the schema in sync.
- Update repository logic and UI imports to match the revised Project structure.
- Add a dev‑mode guard in Analytics to skip tracking for developers.
- Adjust NetworkSettingsSection package and styling to reflect the new layout.

BREAKING CHANGE: Project no longer exposes spaceId and spaceName; consumers must remove references and adjust any persisted data accordingly.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 23:25

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Migration failures are suppressed while the database version still advances, potentially leaving a permanently incomplete schema migration.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Removes obsolete Project space metadata while aligning persistence, analytics, and settings UI code.

Changes:

  • Removes space fields from Project and database operations.
  • Adds schema migration 62.
  • Updates analytics developer guard and network settings styling/package.
File Description
shared/​src/​main/​sqldelight/​migrations/​62.sqm Registers migration 62.
shared/​src/​main/​sqldelight/​io/​askimo/​core/​db/​sqldelight/​Projects.sq Removes space columns and query parameters.
shared/​src/​main/​kotlin/​io/​askimo/​core/​db/​SqlDelightSchemaMigrations.kt Drops obsolete columns.
shared/​src/​main/​kotlin/​io/​askimo/​core/​config/​AppConfig.kt Removes obsolete timeout-update logic.
shared/​src/​main/​kotlin/​io/​askimo/​core/​chat/​repository/​ProjectRepository.kt Adapts persistence mappings.
shared/​src/​main/​kotlin/​io/​askimo/​core/​chat/​domain/​Project.kt Removes space properties.
shared/​src/​main/​kotlin/​io/​askimo/​core/​analytics/​Analytics.kt Skips install pings in developer mode.
desktop/​src/​main/​kotlin/​io/​askimo/​desktop/​settings/​SettingsView.kt Imports relocated network settings UI.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​settings/​NetworkSettingsSection.kt Relocates package and updates styling.
cli/​src/​test/​kotlin/​io/​askimo/​core/​config/​AppConfigTest.kt Cleans test formatting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +94 to +95
dropColumnIfExists(d, "projects", "space_id")
dropColumnIfExists(d, "projects", "space_name")
@haiphucnguyen
haiphucnguyen merged commit 9b8c86c into main Oct 3, 2026
8 of 10 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/improvements branch October 3, 2026 23:31
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