Repository navigation
chore: remove publish-workflow.sh scaffold - #10
Merged
Merged
Conversation
…tabase scoping Pass database= to client.execute_sql() so queries are scoped to a managed database via the X-Database-Id header (hotdata-runtime>=0.2.1). - HotdataMarimoEngine: add default_database= constructor param, pass to execute() - SqlEditor: add database= constructor param, pass to both execute_sql calls - ManagedDatabaseWriter: use description= kwarg matching ManagedDatabase v0.2.0 API - Fix test_databases_marimo.py syntax error and update assertions
…remove dead code - table_browser: extract _set_table_pick() replacing duplicate _init/_rebuild methods; _sync_table_catalog returns bool so ui drops _rebuilt_table_pick_this_run flag; standardize _active_connection_id to use 'or None' consistently - sql_engine: unregister now restores original engine_to_data_source_connection and resets sentinel so register/unregister/register round-trip works correctly - sql_editor: remove dead 'or ""' on _cached_sql (already guarded by None check above) - workspace_selector: cache HotdataClient, only reconstruct when workspace_id changes
…t param
When options is a dict {label: value}, Marimo validates value= against the
dict keys (labels), not the values. _rebuild_database_pick was passing a
database ID (dict value) which raised ValueError on startup. Now resolves
the label key corresponding to the previously-selected ID instead.
| return | ||
| options = {db.name: db.name for db in dbs} | ||
| value = current if current in options else next(iter(options)) | ||
| options = {db.description or db.id: db.id for db in dbs} |
There was a problem hiding this comment.
nit: (not blocking) Building the options dict directly with {db.description or db.id: db.id for db in dbs} silently collapses entries when two managed databases share a description. Unlike the old name field, description is free-form user text, so collisions are plausible — and the affected database becomes unreachable from this widget.
The repo already has unique_label_options for exactly this case (see connection_options in _options.py:47 and the workspace picker in workspace_selector.py:44-48). Consider:
from hotdata_marimo._options import unique_label_options
...
pairs = [(db.description or db.id, db.id) for db in dbs]
options = unique_label_options(
pairs,
disambiguate=lambda label, value, count: f"{label} ({value})",
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
publish-workflow.sh is a one-time scaffold that generates publish.yml — that workflow already exists in every repo, so the script has no ongoing purpose.