Skip to content

chore: Add explicit Python CLI release workflow - #767

Merged
ilyabo merged 13 commits into
mainfrom
add-python-cli-release-workflow
Jun 23, 2026
Merged

ilyabo merged 13 commits into
mainfrom
add-python-cli-release-workflow

Conversation

@ilyabo

@ilyabo ilyabo commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add dedicated cli:version, cli:publish, and cli:publish:dry entrypoints for the Python CLI release flow
  • Split versioning from publishing so releases require an intentional version step before upload
  • Document the new release workflow in the Python CLI README, including target selection and dependency floor updates
  • Keep the legacy publish-cli commands working through the new wrappers

Testing

  • Not run (not requested)

Summary by CodeRabbit

  • Documentation
    • Updated Python CLI release workflow instructions and smoke-test guidance.
    • Documented the sqlrooms --version flag in the Python README.
  • New Features
    • Added an eager --version option to the Python CLI.
    • Renamed/added the Web UI artifact type to “App Builder” (replacing “App”).
  • Bug Fixes
    • Updated runtime WebSocket URLs to use a same-origin proxy.
  • Tests
    • Added/expanded tests for --version output and WebSocket proxy URL behavior.
  • Chores
    • Improved CLI publishing scripts with target selection, versioning, dry-run, and ordered publish.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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

scripts/publish-sqlrooms-cli.mjs is refactored from a single-purpose publish script into a two-command CLI (version, publish) with dependency-ordered target handling, semver bump logic, and pyproject.toml dependency-floor updates. package.json gains three new named scripts. The Python CLI adds a --version flag with release workflow documentation and version bump. WebSocket connections are routed through a same-origin proxy endpoint. The "App" artifact type label is updated to "App Builder".

Changes

Release Workflow Infrastructure

Layer / File(s) Summary
Publish script core: command structure, versioning, and publishing
scripts/publish-sqlrooms-cli.mjs
Replaces the previous publish-only script with a dependency-aware multi-command CLI. Adds per-target package metadata (sqlrooms-server, sqlrooms) with working directories and upload arguments, argument parsing for version/publish commands plus --target, --bump, --set, --dry-run, and --check-only flags, semver validation and bump computation, package.json read/write helpers, and pyproject.toml dependency-floor rewriting. Implements run() wrapper around spawnSync with inherited stdio and process exit on error, versionPackages() to compute and persist versions per dependency order and update pyproject.toml when sqlrooms-server changes, publishPackages() to run pnpm prerelease and pnpm build per target then conditionally upload via uvx, and entrypoint dispatch to route commands.
package.json script wiring
package.json
Adds cli:publish, cli:publish:dry, and cli:version script entries delegating to publish-sqlrooms-cli.mjs with the corresponding commands. Removes the previous publish-cli and publish-cli:check direct invocations.
Python CLI --version option
python/sqlrooms/sqlrooms/cli.py
Adds importlib.metadata imports. Implements _get_cli_version() to read the installed package version with fallback to parsing package.json, returning "unknown" on failure. Adds _version_callback() to print sqlrooms <version> and exit. Wires --version as an eager Typer option on main().
Python CLI tests for --version
python/sqlrooms/tests/test_cli.py
Updates test_cli_help to assert the help output includes --version. Adds test_cli_version_exits_without_database_path to verify --version exits with code 0, prints the version to stdout, and does not emit the missing-DuckDB-project error to stderr.
Release workflow documentation, Python CLI docs, and version bump
python/sqlrooms/README.md, apps/sqlrooms-cli-ui/README.md, python/sqlrooms/package.json
Adds a "Python CLI release workflow" section describing target selection, explicit versioning with pnpm cli:version and --bump/--set examples, dry-run validation with pnpm cli:publish:dry, the final publish step with pnpm cli:publish, and the automatic sqlrooms-server>=... dependency-floor update in pyproject.toml. Documents the new --version flag in the CLI usage section. Updates CLI smoke test commands and release verification steps to use /tmp/sqlrooms-smoke.duckdb and correct workspace paths. Bumps python/sqlrooms/package.json version from 0.1.0 to 0.1.3.

WebSocket Proxy Routing

Layer / File(s) Summary
WebSocket proxy implementation in launcher
python/sqlrooms/sqlrooms/web/launcher.py
Adds _ws_proxy_url() method to SqlroomsHttpServer to build a same-origin websocket URL pointing to /ws/duckdb on the HTTP server port. Updates _runtime_config() to prefer external_ws_url when set, derive from external_url, and fall back to _ws_proxy_url() instead of the direct _ws_url() endpoint for wsUrl and crdtWsUrl.
WebSocket proxy tests
python/sqlrooms/tests/test_launcher.py
Replaces the previous loopback normalization test with test_api_config_uses_same_origin_ws_proxy, which verifies that /api/config returns a same-origin proxy URL (ws://127.0.0.1:4173/ws/duckdb) derived from the HTTP server's fixed port.

UI Artifact Type Update

Layer / File(s) Summary
App artifact type renamed to app-builder
apps/sqlrooms-cli-ui/src/artifactTypeIds.ts, apps/sqlrooms-cli-ui/src/artifactTypes.tsx, apps/sqlrooms-cli-ui/src/createDashboardCommands.ts
Updates CLI_ARTIFACT_TYPES constant from 'app' to 'app-builder'. Updates artifact stability configuration to mark app-builder as experimental. Changes appDefinition display label and defaultTitle from "App" to "App Builder". Updates defineArtifactTypes mapping to register the artifact under 'app-builder' key. Updates ARTIFACT_CREATE_COMMANDS array to create app-builder artifacts instead of app artifacts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • sqlrooms/sqlrooms#754: Both PRs modify python/sqlrooms/sqlrooms/web/launcher.py's SqlroomsHttpServer._runtime_config websocket URL computation and proxy behavior.
  • sqlrooms/sqlrooms#747: Main PR updates the CLI artifact type set ('app' → 'app-builder') and associated create-command wiring, which directly affects the retrieved PR's artifact chat handoff logic that filters target changes based on CLI_ARTIFACT_TYPES.
  • sqlrooms/sqlrooms#616: Both PRs modify apps/sqlrooms-cli-ui/src/createDashboardCommands.ts's artifact creation command wiring—main swaps app→app-builder, while the other changes the artifact creation flow by generating unique titles.

Suggested reviewers

  • dmitriy-kostianetskiy

Poem

🐇 Two commands now take the stage—
Version bumps, then publish plays—
With dry-run safe and semver blessed,
Dependency order passes every test!
Websocket proxies route so clean,
App Builder takes its rightful scene! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% 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 The title accurately captures the main objective: introducing an explicit Python CLI release workflow with new versioning and publishing entrypoints, which is the core focus of the changeset.
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 add-python-cli-release-workflow

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8690f2b2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


for (const packageTarget of targets) {
const pkg = packagesByTarget[packageTarget];
run(pkg.label, pkg.cwd, 'uvx', pkg.uploadArgs);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Build packages before uploading releases

When the target includes sqlrooms-server, this upload now runs after only pnpm prerelease; in python/sqlrooms-server/package.json that prerelease script runs tests/ruff/format but does not run uv build, while the previous release script did pnpm run build immediately before twine upload. A server-only or all publish can therefore upload a stale wheel/sdist left in python/dist (or fail if none exists) instead of the just-versioned package.

Useful? React with 👍 / 👎.

@ilyabo ilyabo changed the title Add explicit Python CLI release workflow chore: Add explicit Python CLI release workflow Jun 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@scripts/publish-sqlrooms-cli.mjs`:
- Around line 203-216: The publish flow runs pnpm prerelease for all targets and
then immediately uploads via uvx, but for python/sqlrooms-server the prerelease
script does not build artifacts, causing potentially stale or missing
distributions to be uploaded. Add an explicit build step between the prerelease
loop (lines 203-205) and the upload loop (lines 213-216) that iterates through
targets again and runs a build command (such as pnpm build) for each package
before the upload attempt to ensure fresh artifacts are created.
🪄 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: 1a563bc0-ca1a-4738-9b39-25285dfacf64

📥 Commits

Reviewing files that changed from the base of the PR and between 213239f and c8690f2.

📒 Files selected for processing (3)
  • package.json
  • python/sqlrooms/README.md
  • scripts/publish-sqlrooms-cli.mjs

Comment thread scripts/publish-sqlrooms-cli.mjs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f781139c7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/publish-sqlrooms-cli.mjs Outdated
}
};

const publishPackages = ({target, dryRun}) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject version flags during publish

When a release operator runs pnpm cli:publish --target sqlrooms --bump patch or --set ..., parseArgs accepts those flags but this function only consumes target and dryRun, so publishing proceeds with the existing package.json versions. Because uploads use --skip-existing, this can appear to succeed while no intended new release was produced; fail fast on versioning flags for the publish command so the required explicit cli:version step cannot be silently skipped.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
python/sqlrooms/tests/test_launcher.py (1)

54-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider verifying crdtWsUrl as well.

The test correctly validates that wsUrl uses the same-origin proxy format. Since crdtWsUrl also uses the same proxy URL (as shown in line 715 of launcher.py), consider adding an assertion to verify it matches the expected proxy URL as well.

✅ Suggested assertion to add
 assert response.status_code == 200
 assert response.json()["wsUrl"] == "ws://127.0.0.1:4173/ws/duckdb"
+assert response.json()["crdtWsUrl"] == "ws://127.0.0.1:4173/ws/duckdb"
🤖 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 `@python/sqlrooms/tests/test_launcher.py` around lines 54 - 67, The
test_api_config_uses_same_origin_ws_proxy function currently only verifies that
the wsUrl field in the API response uses the same-origin proxy format, but it
should also validate crdtWsUrl since it uses the same proxy URL according to
launcher.py. Add an additional assertion after the existing wsUrl assertion to
verify that response.json()["crdtWsUrl"] equals the expected proxy URL
"ws://127.0.0.1:4173/ws/duckdb", matching the expected format for wsUrl.
apps/sqlrooms-cli-ui/README.md (1)

79-82: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the working directory assumption.

The node -p "require('./python/sqlrooms/package.json').version" command assumes the current working directory is the repository root. Consider adding a brief note or changing the command to be explicit about the expected working directory.

📝 Suggested clarification

Add a note before the code block:

+From the repository root:
+
 ```bash
 SQLROOMS_VERSION=$(node -p "require('./python/sqlrooms/package.json').version")

Or make the path absolute from repo root:

-SQLROOMS_VERSION=$(node -p "require('./python/sqlrooms/package.json').version")
+SQLROOMS_VERSION=$(node -p "require(process.cwd() + '/python/sqlrooms/package.json').version")
🤖 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 `@apps/sqlrooms-cli-ui/README.md` around lines 79 - 82, The README section
containing the SQLROOMS_VERSION command and subsequent installation/execution
steps does not document that these commands must be run from the repository root
directory. Add a brief note before this code block clarifying that all commands
should be executed from the repository root, or alternatively modify the
relative path in the node command to be explicit about the expected working
directory context.
🤖 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 `@apps/sqlrooms-cli-ui/src/artifactTypes.tsx`:
- Around line 177-178: The create command for the app artifact type in
createDashboardCommands.ts is passing 'App' as the label to
createArtifactCommand(), but the artifact type definition in artifactTypes.tsx
now specifies 'App Builder' as the label. Find the line where
createArtifactCommand is called with artifactType 'app' and the label 'App', and
change the label parameter from 'App' to 'App Builder' to match the artifact
type definition and ensure consistent labeling across the application.

---

Nitpick comments:
In `@apps/sqlrooms-cli-ui/README.md`:
- Around line 79-82: The README section containing the SQLROOMS_VERSION command
and subsequent installation/execution steps does not document that these
commands must be run from the repository root directory. Add a brief note before
this code block clarifying that all commands should be executed from the
repository root, or alternatively modify the relative path in the node command
to be explicit about the expected working directory context.

In `@python/sqlrooms/tests/test_launcher.py`:
- Around line 54-67: The test_api_config_uses_same_origin_ws_proxy function
currently only verifies that the wsUrl field in the API response uses the
same-origin proxy format, but it should also validate crdtWsUrl since it uses
the same proxy URL according to launcher.py. Add an additional assertion after
the existing wsUrl assertion to verify that response.json()["crdtWsUrl"] equals
the expected proxy URL "ws://127.0.0.1:4173/ws/duckdb", matching the expected
format for wsUrl.
🪄 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: 617c11c8-6136-4e42-93a4-a8b5b0d7d828

📥 Commits

Reviewing files that changed from the base of the PR and between e22a21b and 8b9ee9d.

📒 Files selected for processing (7)
  • apps/sqlrooms-cli-ui/README.md
  • apps/sqlrooms-cli-ui/src/artifactTypes.tsx
  • python/sqlrooms/README.md
  • python/sqlrooms/package.json
  • python/sqlrooms/sqlrooms/cli.py
  • python/sqlrooms/sqlrooms/web/launcher.py
  • python/sqlrooms/tests/test_launcher.py
💤 Files with no reviewable changes (1)
  • python/sqlrooms/README.md
✅ Files skipped from review due to trivial changes (1)
  • python/sqlrooms/package.json

Comment thread apps/sqlrooms-cli-ui/src/artifactTypes.tsx

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62b7719804

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/sqlrooms-cli-ui/src/artifactTypes.tsx
Comment thread package.json

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62b7719804

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

),
canvas: withStability('canvas', canvasDefinition, experimentalEnabled),
app: withStability('app', appDefinition, experimentalEnabled),
'app-builder': withStability(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve legacy app artifact rendering

For projects that already contain the experimental App Builder artifact, persisted metadata still has type: "app"; after this change only app-builder is registered, and SelectedCliArtifactContent resolves artifactTypes[artifact.type] then returns null when there is no component, so those saved artifacts open as blank content. Please add a migration or keep an app alias alongside the new ID before dropping the old key.

Useful? React with 👍 / 👎.

Comment thread package.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@apps/sqlrooms-cli-ui/src/artifactTypes.tsx`:
- Around line 228-232: The removal of the legacy 'app' artifact type
registration breaks backward compatibility with existing persisted artifacts
that have artifact.type === 'app', causing them to fall out of CLI handling and
become inaccessible. Add a temporary legacy alias or migration mapping in the
artifactTypes structure that routes 'app' type artifacts to 'app-builder' to
ensure existing artifacts remain compatible after the upgrade.

In `@apps/sqlrooms-cli-ui/src/createDashboardCommands.ts`:
- Around line 234-237: The createDashboardCommands.ts file has been updated to
change the command registration from 'app' to 'app-builder' in the object where
createArtifactCommand is called with 'app-builder' and 'App Builder', but no
corresponding test updates have been included. Add or update tests in the
appropriate test file to verify that the 'app-builder' command is properly
registered and can be invoked with the correct artifactType and display name.
Additionally, consider whether any legacy 'app' command handling should be
tested or if you need to add tests to ensure the renamed command works as
expected in the command registration layer.
🪄 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: 51742f27-7de9-4055-90ba-b9b940bb9090

📥 Commits

Reviewing files that changed from the base of the PR and between 8b9ee9d and 5daacb0.

📒 Files selected for processing (7)
  • apps/sqlrooms-cli-ui/README.md
  • apps/sqlrooms-cli-ui/src/artifactTypeIds.ts
  • apps/sqlrooms-cli-ui/src/artifactTypes.tsx
  • apps/sqlrooms-cli-ui/src/createDashboardCommands.ts
  • python/sqlrooms/package.json
  • python/sqlrooms/tests/test_launcher.py
  • scripts/publish-sqlrooms-cli.mjs
✅ Files skipped from review due to trivial changes (2)
  • python/sqlrooms/package.json
  • apps/sqlrooms-cli-ui/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • python/sqlrooms/tests/test_launcher.py
  • scripts/publish-sqlrooms-cli.mjs

Comment on lines +228 to +232
'app-builder': withStability(
'app-builder',
appDefinition,
experimentalEnabled,
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve compatibility for legacy app artifact records.

Line 228 removes the legacy app registration path. Existing persisted artifacts with artifact.type === 'app' can fall out of CLI handling (for example, sidebar filtering depends on CliArtifactType membership), which risks making older artifacts inaccessible after upgrade. Please add a migration on load or a temporary legacy alias (app -> app-builder) before fully removing app.

💡 Minimal compatibility shim example
diff --git a/apps/sqlrooms-cli-ui/src/artifactTypeIds.ts b/apps/sqlrooms-cli-ui/src/artifactTypeIds.ts
@@
   'python',
   'canvas',
+  'app', // legacy persisted type (temporary compatibility)
   'app-builder',
 ] as const;
diff --git a/apps/sqlrooms-cli-ui/src/artifactTypes.tsx b/apps/sqlrooms-cli-ui/src/artifactTypes.tsx
@@
   canvas: 'experimental',
+  app: 'experimental',
   'app-builder': 'experimental',
@@
     canvas: withStability('canvas', canvasDefinition, experimentalEnabled),
+    app: {
+      ...withStability('app', appDefinition, experimentalEnabled),
+      canCreate: false, // legacy only; keep command surface on app-builder
+    },
     'app-builder': withStability(
       'app-builder',
       appDefinition,
       experimentalEnabled,
     ),
🤖 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 `@apps/sqlrooms-cli-ui/src/artifactTypes.tsx` around lines 228 - 232, The
removal of the legacy 'app' artifact type registration breaks backward
compatibility with existing persisted artifacts that have artifact.type ===
'app', causing them to fall out of CLI handling and become inaccessible. Add a
temporary legacy alias or migration mapping in the artifactTypes structure that
routes 'app' type artifacts to 'app-builder' to ensure existing artifacts remain
compatible after the upgrade.

Comment on lines +234 to +237
{
artifactType: 'app-builder',
command: () => createArtifactCommand('app-builder', 'App Builder'),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add regression coverage for the renamed create command.

This changes command behavior/public surface from app to app-builder, but no related test update is included in this layer. Please add/adjust tests for command registration and invocation using app-builder (and any intended legacy handling).

As per coding guidelines, "Add or update tests when changing behavior or public API, when practical."

🤖 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 `@apps/sqlrooms-cli-ui/src/createDashboardCommands.ts` around lines 234 - 237,
The createDashboardCommands.ts file has been updated to change the command
registration from 'app' to 'app-builder' in the object where
createArtifactCommand is called with 'app-builder' and 'App Builder', but no
corresponding test updates have been included. Add or update tests in the
appropriate test file to verify that the 'app-builder' command is properly
registered and can be invoked with the correct artifactType and display name.
Additionally, consider whether any legacy 'app' command handling should be
tested or if you need to add tests to ensure the renamed command works as
expected in the command registration layer.

Source: Coding guidelines

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5daacb0810

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

else None
)
ws_url = self.external_ws_url or derived_ws_url or self._ws_url()
ws_url = self.external_ws_url or derived_ws_url or self._ws_proxy_url()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require auth before advertising the DuckDB proxy

When the HTTP server is bound to a non-loopback address, e.g. --host 192.168.1.10, this fallback now advertises the FastAPI /ws/duckdb proxy instead of the direct local-only backend. I checked the proxy route and it does not call _require_api_auth, while _run_duckdb_server starts the upstream with auth_token=None, so any client that can reach the HTTP port can open the advertised WebSocket and issue DuckDB websocket commands despite the backend being started as local-only. Please either keep the direct local-only URL unless an external proxy is explicitly configured, or require the session token on this proxy before making it the default.

Useful? React with 👍 / 👎.

@ilyabo
ilyabo merged commit ca8286f into main Jun 23, 2026
4 checks passed
@ilyabo
ilyabo deleted the add-python-cli-release-workflow branch June 23, 2026 20:44
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