Skip to content

fix(db): remove app version placeholders#2301

Merged
riderx merged 4 commits into
mainfrom
codex/remove-app-version-placeholders
May 20, 2026
Merged

fix(db): remove app version placeholders#2301
riderx merged 4 commits into
mainfrom
codex/remove-app-version-placeholders

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented May 19, 2026

Summary

AI-Generated: Codex prepared this section.

  • Remove the unknown and builtin placeholder rows from app_versions.
  • Store the native/builtin channel state as channels.version = NULL with ON DELETE SET NULL.
  • Update backend hot paths, CLI flows, frontend screens, seed data, and tests so those placeholders are not recreated.

Motivation

AI-Generated: Codex prepared this section.

The placeholder rows were coming back from several writers: app creation, stats fallback, CLI/frontend unlink flows, demo app creation, seed helpers, and legacy SQL helpers. This PR removes those writers and migrates existing references away from placeholder rows.

Business Impact

AI-Generated: Codex prepared this section.

This keeps customer bundle lists and app version history clean, avoids confusing unknown / builtin entries reappearing after cleanup, and preserves native rollback behavior through a nullable channel version instead of fake bundle rows.

Test Plan

AI-Generated: Codex prepared this section.

  • bun lint
  • bun lint:backend
  • bun run cli:lint
  • bun typecheck
  • bunx vitest run tests/channel-post.unit.test.ts
  • bun run supabase:db:reset
  • bun run supabase:with-env -- bunx vitest run tests/updates.test.ts tests/stats.test.ts tests/bundle.test.ts tests/cli-channel.test.ts
  • bun test:backend
  • Local DB check: zero app_versions rows named unknown or builtin after reset
  • Local DB check: rollback helper returns NULL and no placeholder rows are recreated

Summary by CodeRabbit

  • New Features

    • Channels can be unlinked by setting their version to null; UI and APIs accept nullable channel versions.
  • Bug Fixes

    • UI and dialogs now safely handle missing channel versions and show "builtin" as a fallback.
    • Revert/unlink and stats flows handle missing versions consistently.
  • Refactoring

    • Removed synthetic placeholder versions; DB, services, and tests updated to treat builtin/native as null.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR makes channels.version nullable, removes synthetic builtin/unknown app_versions, updates DB schema/types/migrations, adjusts backend queries and handlers to treat missing versions as null, normalizes missing versions client-side, and updates seeds and tests.

Changes

Nullable channel versions and builtin normalization

Layer / File(s) Summary
Database schema and migration
supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql, supabase/functions/_backend/utils/postgres_schema.ts
Make channels.version nullable with ON DELETE SET NULL, migrate channels referencing builtin/unknown to NULL, and delete placeholder app_versions rows.
Supabase TypeScript typings
cli/src/types/supabase.types.ts, src/types/supabase.types.ts, supabase/functions/_backend/utils/supabase.types.ts
Update channels.version Row/Insert/Update to `number
Postgres query utils & triggers
supabase/functions/_backend/utils/pg.ts, supabase/functions/_backend/triggers/cron_clear_versions.ts, supabase/functions/_backend/triggers/on_app_create.ts
Switch joins to LEFT JOIN, add null-aware where logic, compute fallback name = 'builtin', remove ensurePlaceholderVersions, and clear channels.version to NULL for missing bundles; on-app-create no longer inserts placeholder versions.
Backend handlers and plugins
supabase/functions/_backend/public/channel/post.ts, supabase/functions/_backend/plugins/stats.ts, supabase/functions/_backend/files/preview.ts
Initialize channel.version = null, resolve versions only for non-internal names, return version_not_found instead of creating placeholders, and validate nullable preview version ids.
Client-side builtin helpers
src/services/versions.ts
Add createBuiltinChannelVersion() and withBuiltinChannelVersion() to synthesize displayable builtin version rows when channel.version is null; reuse isInternalVersionName().
Frontend component updates
src/pages/..., src/components/tables/*
Components normalize channel.version with withBuiltinChannelVersion, accept version: null in save/unlink flows, use optional chaining and 'builtin' fallbacks, and tighten validation to reject undefined for version.
CLI & service utils
cli/src/api/channels.ts, cli/src/channel/add.ts, cli/src/utils.ts, src/services/supabase.ts
Remove findUnknownVersion, create channels with version: null, and defensively handle missing version.native_packages.
Seed data & tests / i18n
supabase/seed.sql, supabase/tests/*, tests/*, messages/en.json
Remove builtin/unknown seed rows; tests updated to set channels.version = NULL and to expect version_not_found/NULL where placeholder flows were previously used; add channel-builtin i18n key.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • Cap-go/capgo#2267: Both PRs modify supabase/functions/_backend/plugins/stats.ts to change how /stats handles missing versions and remove usage of the unknown placeholder.

Poem

🐰 I unlink the ghosts from their versioned lair,
Channels now point to null, light as air.
Builtin blooms on the client side—no fright,
Seeds and tests updated to sleep tight.
Hooray, fewer placeholders tonight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% 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
Title check ✅ Passed The title 'fix(db): remove app version placeholders' is concise, specific, and accurately reflects the main change—removing synthetic builtin/unknown app version rows and using NULL channels.version instead.
Description check ✅ Passed The PR description provides Summary, Test Plan sections, and a comprehensive checklist; it matches the template structure and covers changes, motivation, and business impact thoroughly.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-app-version-placeholders

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented May 19, 2026

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/remove-app-version-placeholders (474d942) with main (7712cd5)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 8f64418 to 3c6b9ca Compare May 19, 2026 20:34
@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 3c6b9ca to ff0b574 Compare May 19, 2026 20:53
@riderx riderx marked this pull request as ready for review May 19, 2026 21:02
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/stats.test.ts (1)

186-186: ⚡ Quick win

Use it.concurrent for this new isolated test case.

This test uses a unique app ID (${APP_NAME}.deleted.unknown.${randomUUID().split('-')[0]}) and explicit cleanup in the finally block, making it safe for concurrent execution and aligning with the parallel-test guideline.

♻️ Proposed change
-  it('does not recreate unknown placeholder rows for missing versions', async () => {
+  it.concurrent('does not recreate unknown placeholder rows for missing versions', async () => {
🤖 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 `@tests/stats.test.ts` at line 186, Replace the non-concurrent test declaration
with a concurrent one: change the test block that begins with "it('does not
recreate unknown placeholder rows for missing versions'" to use
it.concurrent(...) so the isolated test (which uses the unique app ID and has
its own cleanup in finally) runs in parallel safely; keep the async signature
and existing finally cleanup intact when making the swap.
🤖 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.

Nitpick comments:
In `@tests/stats.test.ts`:
- Line 186: Replace the non-concurrent test declaration with a concurrent one:
change the test block that begins with "it('does not recreate unknown
placeholder rows for missing versions'" to use it.concurrent(...) so the
isolated test (which uses the unique app ID and has its own cleanup in finally)
runs in parallel safely; keep the async signature and existing finally cleanup
intact when making the swap.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6ba123f1-0b22-474b-8f0b-b1d97d9ca59d

📥 Commits

Reviewing files that changed from the base of the PR and between 7632d62 and ff0b574.

📒 Files selected for processing (31)
  • cli/src/api/channels.ts
  • cli/src/channel/add.ts
  • cli/src/types/supabase.types.ts
  • cli/src/utils.ts
  • src/components/tables/BundleTable.vue
  • src/components/tables/ChannelTable.vue
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].device.[device].vue
  • src/services/supabase.ts
  • src/services/versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/public/app/demo.ts
  • supabase/functions/_backend/public/channel/post.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/triggers/on_app_create.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/bundle.test.ts
  • tests/channel-post.unit.test.ts
  • tests/cli-channel.test.ts
  • tests/stats.test.ts
  • tests/updates.test.ts
💤 Files with no reviewable changes (2)
  • src/pages/app/[app].device.[device].vue
  • supabase/functions/_backend/triggers/on_app_create.ts

@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from ff0b574 to 575dfde Compare May 19, 2026 21:09
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@src/pages/app/`[app].channel.[channel].vue:
- Around line 280-282: The handler (the dialog action that calls
saveChannelChange('version', null)) is missing an await; update the anonymous
async handler to await saveChannelChange('version', null) so the save finishes
before the dialog resolves—mirror how handleRevert awaits saveChannelChange to
ensure consistency and reliable ordering (look for saveChannelChange and the
handleRevert handler for reference).
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76e9d738-c6e5-4250-b7a1-fa7dc14f94a3

📥 Commits

Reviewing files that changed from the base of the PR and between ff0b574 and 575dfde.

📒 Files selected for processing (31)
  • cli/src/api/channels.ts
  • cli/src/channel/add.ts
  • cli/src/types/supabase.types.ts
  • cli/src/utils.ts
  • src/components/tables/BundleTable.vue
  • src/components/tables/ChannelTable.vue
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].device.[device].vue
  • src/services/supabase.ts
  • src/services/versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/public/app/demo.ts
  • supabase/functions/_backend/public/channel/post.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/triggers/on_app_create.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/bundle.test.ts
  • tests/channel-post.unit.test.ts
  • tests/cli-channel.test.ts
  • tests/stats.test.ts
  • tests/updates.test.ts
💤 Files with no reviewable changes (2)
  • src/pages/app/[app].device.[device].vue
  • supabase/functions/_backend/triggers/on_app_create.ts
✅ Files skipped from review due to trivial changes (2)
  • supabase/tests/33_test_rbac_phase1.sql
  • src/types/supabase.types.ts
🚧 Files skipped from review as they are similar to previous changes (24)
  • supabase/functions/_backend/plugins/stats.ts
  • tests/cli-channel.test.ts
  • src/services/supabase.ts
  • tests/bundle.test.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • cli/src/channel/add.ts
  • tests/stats.test.ts
  • tests/channel-post.unit.test.ts
  • cli/src/utils.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • supabase/functions/_backend/public/app/demo.ts
  • cli/src/types/supabase.types.ts
  • cli/src/api/channels.ts
  • supabase/functions/_backend/public/channel/post.ts
  • tests/updates.test.ts
  • supabase/functions/_backend/files/preview.ts
  • src/services/versions.ts
  • src/components/tables/BundleTable.vue
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • src/components/tables/ChannelTable.vue
  • supabase/seed.sql

Comment thread src/pages/app/[app].channel.[channel].vue
@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 575dfde to 560d9c9 Compare May 19, 2026 21:22
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/pages/app/[app].bundle.[bundle].vue (1)

224-247: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make setChannel() throw on failed updates.

This returns the raw Supabase mutation without error propagation, so DB failures resolve silently instead of hitting the catch blocks. Callers at lines ~335 and ~395 show success toasts even when the channel update fails.

In @supabase/supabase-js v2, .update(...).eq(...) resolves with { data, error } and does not reject by default; add .throwOnError() to enable proper error handling.

Suggested fix
 async function setChannel(channel: Database['public']['Tables']['channels']['Row'], id: number | null) {
   if (!canPromoteChannel(channel.id)) {
     toast.error(t('no-permission'))
     return Promise.reject(new Error('No permission'))
   }
@@
   return supabase
     .from('channels')
     .update({
       version: id,
     })
     .eq('id', channel.id)
+    .throwOnError()
 }
🤖 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 `@src/pages/app/`[app].bundle.[bundle].vue around lines 224 - 247, The
setChannel function currently returns the raw Supabase update promise which
resolves to {data, error} and won’t throw on DB failures, causing callers (e.g.,
where setChannel is invoked around the success-toasts) to miss errors; update
the supabase call in setChannel (the chain starting with
supabase.from('channels').update({version: id}).eq('id', channel.id)) to use
.throwOnError() so that failed updates throw and propagate to the callers' catch
blocks, ensuring errors trigger the existing error handling paths.
🤖 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.

Outside diff comments:
In `@src/pages/app/`[app].bundle.[bundle].vue:
- Around line 224-247: The setChannel function currently returns the raw
Supabase update promise which resolves to {data, error} and won’t throw on DB
failures, causing callers (e.g., where setChannel is invoked around the
success-toasts) to miss errors; update the supabase call in setChannel (the
chain starting with supabase.from('channels').update({version: id}).eq('id',
channel.id)) to use .throwOnError() so that failed updates throw and propagate
to the callers' catch blocks, ensuring errors trigger the existing error
handling paths.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f277bf9e-a311-4bd5-9528-ca6fb164af65

📥 Commits

Reviewing files that changed from the base of the PR and between 575dfde and 560d9c9.

📒 Files selected for processing (31)
  • cli/src/api/channels.ts
  • cli/src/channel/add.ts
  • cli/src/types/supabase.types.ts
  • cli/src/utils.ts
  • src/components/tables/BundleTable.vue
  • src/components/tables/ChannelTable.vue
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].device.[device].vue
  • src/services/supabase.ts
  • src/services/versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/public/app/demo.ts
  • supabase/functions/_backend/public/channel/post.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/triggers/on_app_create.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/bundle.test.ts
  • tests/channel-post.unit.test.ts
  • tests/cli-channel.test.ts
  • tests/stats.test.ts
  • tests/updates.test.ts
💤 Files with no reviewable changes (2)
  • src/pages/app/[app].device.[device].vue
  • supabase/functions/_backend/triggers/on_app_create.ts
✅ Files skipped from review due to trivial changes (1)
  • cli/src/types/supabase.types.ts
🚧 Files skipped from review as they are similar to previous changes (26)
  • tests/channel-post.unit.test.ts
  • supabase/tests/33_test_rbac_phase1.sql
  • supabase/functions/_backend/plugins/stats.ts
  • cli/src/utils.ts
  • supabase/functions/_backend/public/channel/post.ts
  • src/services/supabase.ts
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/functions/_backend/files/preview.ts
  • tests/updates.test.ts
  • tests/stats.test.ts
  • supabase/functions/_backend/public/app/demo.ts
  • tests/bundle.test.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • cli/src/channel/add.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • src/components/tables/BundleTable.vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/services/versions.ts
  • src/components/tables/ChannelTable.vue
  • supabase/seed.sql
  • cli/src/api/channels.ts
  • supabase/functions/_backend/utils/pg.ts
  • src/pages/app/[app].channel.[channel].vue
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql

@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 560d9c9 to 85e4e2b Compare May 19, 2026 21:32
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@src/components/tables/ChannelTable.vue`:
- Line 301: Replace the hardcoded fallback string 'builtin' in the
displayFunction (the arrow function named displayFunction in ChannelTable.vue)
with a translation key lookup (e.g., use the component's i18n
t('channels.builtin') call) so the table uses localized text; add the
corresponding key "channels.builtin" to your locale messages (messages/en.json)
and do not use an inline fallback string as a second argument to t().
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 595b4b61-0c01-46d0-951c-560acbd20f6a

📥 Commits

Reviewing files that changed from the base of the PR and between 560d9c9 and 85e4e2b.

📒 Files selected for processing (31)
  • cli/src/api/channels.ts
  • cli/src/channel/add.ts
  • cli/src/types/supabase.types.ts
  • cli/src/utils.ts
  • src/components/tables/BundleTable.vue
  • src/components/tables/ChannelTable.vue
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].device.[device].vue
  • src/services/supabase.ts
  • src/services/versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/public/app/demo.ts
  • supabase/functions/_backend/public/channel/post.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/triggers/on_app_create.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/bundle.test.ts
  • tests/channel-post.unit.test.ts
  • tests/cli-channel.test.ts
  • tests/stats.test.ts
  • tests/updates.test.ts
💤 Files with no reviewable changes (2)
  • src/pages/app/[app].device.[device].vue
  • supabase/functions/_backend/triggers/on_app_create.ts
🚧 Files skipped from review as they are similar to previous changes (26)
  • tests/cli-channel.test.ts
  • cli/src/utils.ts
  • supabase/tests/18_test_utility_functions_extended.sql
  • tests/channel-post.unit.test.ts
  • supabase/functions/_backend/plugins/stats.ts
  • src/services/supabase.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/tests/33_test_rbac_phase1.sql
  • src/types/supabase.types.ts
  • tests/bundle.test.ts
  • cli/src/channel/add.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/public/app/demo.ts
  • src/components/tables/BundleTable.vue
  • supabase/functions/_backend/public/channel/post.ts
  • src/services/versions.ts
  • src/pages/app/[app].channel.[channel].devices.vue
  • cli/src/types/supabase.types.ts
  • cli/src/api/channels.ts
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].bundle.[bundle].vue
  • supabase/functions/_backend/utils/pg.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql

Comment thread src/components/tables/ChannelTable.vue Outdated
@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 85e4e2b to 63c4cbe Compare May 19, 2026 21:44
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/pages/app/[app].bundle.[bundle].vue (1)

744-744: 💤 Low value

Localize the 'builtin' fallback for i18n consistency.

The hardcoded 'builtin' string in the dialog description bypasses localization. For consistency with ChannelTable.vue (which uses t('channel-builtin')), this should also use a translation key.

Proposed fix
-          channels: channelFound.map((ch: any) => `${ch.name} (${ch.version?.name ?? 'builtin'})`).join(', '),
+          channels: channelFound.map((ch: any) => `${ch.name} (${ch.version?.name ?? t('channel-builtin')})`).join(', '),
🤖 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 `@src/pages/app/`[app].bundle.[bundle].vue at line 744, Replace the hardcoded
fallback 'builtin' in the channels mapping with the i18n translation (e.g.
t('channel-builtin')), i.e. change `${ch.name} (${ch.version?.name ??
'builtin'})` to use the translator; ensure the component provides a t function
(import/use useI18n and call t(...) in setup or use this.$t(...) in options API)
so the mapping becomes `${ch.name} (${ch.version?.name ??
t('channel-builtin')})`, referencing the existing channelFound variable and the
channels property in this component.
🤖 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.

Nitpick comments:
In `@src/pages/app/`[app].bundle.[bundle].vue:
- Line 744: Replace the hardcoded fallback 'builtin' in the channels mapping
with the i18n translation (e.g. t('channel-builtin')), i.e. change `${ch.name}
(${ch.version?.name ?? 'builtin'})` to use the translator; ensure the component
provides a t function (import/use useI18n and call t(...) in setup or use
this.$t(...) in options API) so the mapping becomes `${ch.name}
(${ch.version?.name ?? t('channel-builtin')})`, referencing the existing
channelFound variable and the channels property in this component.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e075038e-8ef8-45b9-b547-570c354f2eb8

📥 Commits

Reviewing files that changed from the base of the PR and between 85e4e2b and 63c4cbe.

📒 Files selected for processing (32)
  • cli/src/api/channels.ts
  • cli/src/channel/add.ts
  • cli/src/types/supabase.types.ts
  • cli/src/utils.ts
  • messages/en.json
  • src/components/tables/BundleTable.vue
  • src/components/tables/ChannelTable.vue
  • src/pages/app/[app].bundle.[bundle].vue
  • src/pages/app/[app].channel.[channel].devices.vue
  • src/pages/app/[app].channel.[channel].vue
  • src/pages/app/[app].device.[device].vue
  • src/services/supabase.ts
  • src/services/versions.ts
  • src/types/supabase.types.ts
  • supabase/functions/_backend/files/preview.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/public/app/demo.ts
  • supabase/functions/_backend/public/channel/post.ts
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/triggers/on_app_create.ts
  • supabase/functions/_backend/utils/pg.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/bundle.test.ts
  • tests/channel-post.unit.test.ts
  • tests/cli-channel.test.ts
  • tests/stats.test.ts
  • tests/updates.test.ts
💤 Files with no reviewable changes (2)
  • src/pages/app/[app].device.[device].vue
  • supabase/functions/_backend/triggers/on_app_create.ts
✅ Files skipped from review due to trivial changes (1)
  • messages/en.json
🚧 Files skipped from review as they are similar to previous changes (26)
  • supabase/tests/33_test_rbac_phase1.sql
  • tests/cli-channel.test.ts
  • cli/src/utils.ts
  • supabase/tests/18_test_utility_functions_extended.sql
  • supabase/functions/_backend/triggers/cron_clear_versions.ts
  • supabase/functions/_backend/plugins/stats.ts
  • supabase/functions/_backend/utils/postgres_schema.ts
  • supabase/functions/_backend/public/app/demo.ts
  • tests/channel-post.unit.test.ts
  • src/components/tables/BundleTable.vue
  • supabase/functions/_backend/files/preview.ts
  • src/types/supabase.types.ts
  • cli/src/types/supabase.types.ts
  • src/services/versions.ts
  • supabase/functions/_backend/utils/supabase.types.ts
  • cli/src/channel/add.ts
  • cli/src/api/channels.ts
  • tests/updates.test.ts
  • supabase/functions/_backend/public/channel/post.ts
  • src/pages/app/[app].channel.[channel].devices.vue
  • supabase/functions/_backend/utils/pg.ts
  • tests/bundle.test.ts
  • src/pages/app/[app].channel.[channel].vue
  • tests/stats.test.ts
  • supabase/migrations/20260519151250_remove_builtin_unknown_app_versions.sql
  • supabase/seed.sql

@riderx riderx force-pushed the codex/remove-app-version-placeholders branch from 63c4cbe to a2af008 Compare May 19, 2026 21:55
…ion-placeholders

# Conflicts:
#	supabase/functions/_backend/public/app/demo.ts
@sonarqubecloud
Copy link
Copy Markdown

@riderx riderx merged commit bd2e88f into main May 20, 2026
44 checks passed
@riderx riderx deleted the codex/remove-app-version-placeholders branch May 20, 2026 13:35
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