Skip to content

feat(databases): show created_at in list and show commands - #217

Merged
eddietejeda merged 2 commits into
mainfrom
feat/database-timestamps
Jul 10, 2026
Merged

eddietejeda merged 2 commits into
mainfrom
feat/database-timestamps

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

Summary

  • Adds a CREATED column to hotdata databases list
  • Adds a created_at: row to hotdata databases show
  • Updates SDK dependency from 0.8.0 to 0.8.1 (which adds created_at to DatabaseSummary and DatabaseDetailResponse)

Timestamps formatted via the existing util::format_date helper. Databases created before runtimedb PR #909 already have real timestamps — the column existed with NOT NULL DEFAULT CURRENT_TIMESTAMP since the table was introduced.

Test plan

  • hotdata databases list shows CREATED column with formatted timestamps
  • hotdata databases show shows created_at row
  • Databases with no name still show - in NAME and a real timestamp in CREATED

Adds a CREATED column to `databases list` and a created_at row to
`databases show`. Uses the updated SDK models from sdk-rust
feat/database-timestamps (PR #909 in runtimedb).

Cargo.toml temporarily points to local sdk-rust path; update to
published version once sdk-rust feat/database-timestamps is released.
Comment thread src/commands/databases.rs
/// common first command against an idle workspace.
fn list_database_summaries(api: &Api) -> Result<Vec<DatabaseSummary>, ApiError> {
block_with_wakeup(api, "Loading databases…", api.client().databases().list())
block_with_wakeup(api, "Loading databases...", api.client().databases().list())

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.

super nit: this swaps the Unicode ellipsis … for three dots ..., which is unrelated to the created_at feature and introduces inconsistency within this file — other spinners here still use … (e.g. line 1317 "Deleting database…"). Suggest keeping … to match the surrounding code. (not blocking)

Comment thread src/commands/databases.rs

impl From<hotdata::models::DatabaseSummary> for DatabaseSummary {
/// Map the SDK's typed summary into the CLI's list-row output shape.
fn from(s: hotdata::models::DatabaseSummary) -> Self {

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.

super nit: this drops the existing doc comment /// Map the SDK's typed summary into the CLI's list-row output shape. for no apparent reason. The sibling From<DatabaseDetailResponse> impl above still keeps its doc comment, so removing this one makes the two inconsistent. (not blocking)

@claude claude 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.

Feature looks correct — created_at flows through both output shapes and From impls consistently, and the table/show rendering reuses util::format_date. Left two non-blocking super nits on unrelated changes bundled in.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/commands/databases.rs 20.00% 12 Missing ⚠️

📢 Thoughts on this report? Let us know!

@eddietejeda
eddietejeda merged commit 260b3e5 into main Jul 10, 2026
14 checks passed
@eddietejeda
eddietejeda deleted the feat/database-timestamps branch July 10, 2026 01:35
eddietejeda added a commit that referenced this pull request Jul 10, 2026
* feat(databases): show created_at in list and show commands

Adds a CREATED column to `databases list` and a created_at row to
`databases show`. Uses the updated SDK models from sdk-rust
feat/database-timestamps (PR #909 in runtimedb).

Cargo.toml temporarily points to local sdk-rust path; update to
published version once sdk-rust feat/database-timestamps is released.

* chore: update hotdata SDK to v0.8.1 (created_at on databases)

---------

Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>
eddietejeda added a commit that referenced this pull request Jul 10, 2026
* feat(cli): loading indicators for indexes list and usage

Both commands sat silent while fetching. `indexes list` gets one spinner
over the whole fetch - the unscoped path is a whole-workspace scan
(connections enumeration + managed-DB discovery + per-table index reads)
that can take seconds. The database discovery inside the scan
(databases::list_database_ids) drops its nested "Loading databases..."
wakeup spinner so two indicatif bars never fight over the same line;
`databases list` itself keeps the wakeup-hint spinner. `usage` gets a
plain spinner around its single request.

* feat(databases): show created_at in list and show commands (#217)

* feat(databases): show created_at in list and show commands

Adds a CREATED column to `databases list` and a created_at row to
`databases show`. Uses the updated SDK models from sdk-rust
feat/database-timestamps (PR #909 in runtimedb).

Cargo.toml temporarily points to local sdk-rust path; update to
published version once sdk-rust feat/database-timestamps is released.

* chore: update hotdata SDK to v0.8.1 (created_at on databases)

---------

Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>

* feat(ingest): rename the catalog verb connectors -> datasources (#216)

'hotdata ingest datasources' now browses the catalog of available
datasource types; 'connectors' stays as a hidden alias. Help, error
hints, README, and the skill follow.

Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>

* fix(indexes): clear spinner before exiting on API error

The fetch helpers called e.exit() (process::exit) internally, leaving
the indicatif spinner live on the terminal when any API call failed.
Convert list_one_table, list_one_table_scan, collect_tables,
connection_lookup, managed_db_connection_ids, workspace_scan_targets,
and collect_connection_wide to return Result<_, ApiError>, then
finish_and_clear() the spinner in list() before unwrap_or_else(|e|
e.exit()) -- matching the usage.rs pattern.

* style: cargo fmt

---------

Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>
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