Skip to content

Polish Sidemantic terminal workflows#268

Merged
nicosuave merged 10 commits into
mainfrom
t3-cli-polish
Jul 19, 2026
Merged

Polish Sidemantic terminal workflows#268
nicosuave merged 10 commits into
mainfrom
t3-cli-polish

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Adds recovery guidance, next steps, terminal documentation, TTY-aware paging, richer completion, and a documented deprecation lifecycle.

@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: 7e8172a19c

ℹ️ 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 on lines +171 to +172
result = super().invoke(ctx)
self._emit_deprecations(ctx)

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 Emit legacy warnings before blocking commands

Because deprecations are emitted only after super().invoke(ctx) returns, legacy aliases whose command bodies start a server (serve, api-serve, and mcp-serve call start_server, start_api_server, or mcp.run) do not show the documented deprecation warning until the server stops, which is effectively never for normal use. This makes the new lifecycle notice invisible exactly when users invoke those deprecated entry points; emit the queued warning before invoking the selected command (or from the command body) for these blocking aliases.

Useful? React with 👍 / 👎.

@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: 1e84de93ee

ℹ️ 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 on lines +171 to +172
result = super().invoke(ctx)
self._emit_deprecations(ctx)

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 Emit the tree deprecation before launching workbench

The remaining legacy tree alias is still affected by this after-return emission path: tree is queued as deprecated, but its body calls run_workbench(...) in sidemantic/cli.py, which starts the interactive TUI and normally does not return until the user exits. The fresh evidence is that the server aliases now call emit_pending_deprecation(...), while tree still does not, so users invoking the deprecated workbench alias will not see its removal warning until after leaving the UI.

Useful? React with 👍 / 👎.

@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: 8203827f6f

ℹ️ 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".

return value.model_dump(mode="json", exclude_none=True)
if hasattr(value, "to_dict"):
return value.to_dict()
raise TypeError(f"Object of type {type(value).__name__} is not JSON serializable")

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 Convert Decimal/date results before JSON dumping

When a query result contains common database scalar types such as Decimal, date, or datetime (for example a DuckDB SUM() over a DECIMAL amount), table/CSV rendering reaches this JSON default through _record_value and raises TypeError instead of printing the row; the new path therefore breaks default sidemantic query output for monetary/time metrics that the previous csv.writer path stringified successfully. Add conversions for these DB scalar values before falling through here.

Useful? React with 👍 / 👎.

Comment thread sidemantic/cli.py Outdated
debug=bool(debug),
quiet=bool(quiet) if quiet is not None else bool(configured and configured.quiet),
verbose=bool(verbose) if verbose is not None else bool(configured and configured.verbose),
requested_format=output_format if output_format is not None else (configured.format if configured else None),

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 Let --json override configured formats

If a project sets cli.format: csv (similarly for other non-JSON defaults), this stores the config default as requested_format, so an explicit command flag like sidemantic info --json later fails with --json cannot be combined with a non-JSON --format. That violates the documented flag-over-config precedence and makes the legacy --json alias unusable until users edit their config; keep config defaults distinguishable from an explicit --format so command flags can override them.

Useful? React with 👍 / 👎.

@nicosuave
nicosuave force-pushed the t2-cli-contract branch 4 times, most recently from 6f73e1e to 78390a2 Compare July 19, 2026 06:52

@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: b1685a5f99

ℹ️ 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 docs/rust-runtime.md Outdated
```bash
sidemantic export-native ./adapter-project --output sidemantic.yml --validate-rust
sidemantic convert ./adapter-project --to sidemantic --output sidemantic.yml
sidemantic validate sidemantic.yml --engine rust

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 Point Rust validation at a directory

For users following this new Rust-runtime workflow, the second command validates a single sidemantic.yml file with --engine rust, but the CLI still routes Rust validation through load_graph_from_directory_with_rust(directory) and the Rust loader rejects non-directories (Path is not a directory). This means the documented replacement fails immediately after the preceding convert --output sidemantic.yml; either document validating the containing directory or update the CLI to dispatch file inputs through the Rust YAML/SQL file loaders.

Useful? React with 👍 / 👎.

@nicosuave
nicosuave force-pushed the t3-cli-polish branch 3 times, most recently from e560b5e to fb3c596 Compare July 19, 2026 14:40

@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: fb3c5968d6

ℹ️ 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 sidemantic/cli_polish.py
Comment on lines +74 to +75
raise click.UsageError(
f"{exc.message}\nDid you mean '{suggestion}'?\n"

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 Match deprecated commands by full path

Because every nested Typer app also uses this group, recording only the leaf name makes supported subcommands collide with top-level legacy aliases. In particular, sidemantic dashboard serve resolves the child name serve, queues the top-level serve deprecation, and can later warn users to use server postgres even though dashboard serve is the supported dashboard workflow; restrict this check to the root group or store/compare full command paths.

Useful? React with 👍 / 👎.

@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: 92ba3daf7e

ℹ️ 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 sidemantic/manpage.py Outdated
for param in command.params:
if not isinstance(param, click.Argument):
continue
metavar = param.make_metavar(ctx)

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 Keep manpage rendering compatible with Click 8.1

In environments that satisfy the declared dependency range (click>=8.0.0), Click 8.0/8.1 expose make_metavar() without the ctx argument, so running the documented scripts/generate_man_page.py or calling render_manpage() raises TypeError before producing the man page. Either raise the Click minimum to the version whose API this uses or call make_metavar through a compatibility shim for older allowed Click versions.

Useful? React with 👍 / 👎.

Base automatically changed from t2-cli-contract to main July 19, 2026 16:19
@nicosuave
nicosuave merged commit 3daead1 into main Jul 19, 2026
14 of 16 checks passed
@nicosuave
nicosuave deleted the t3-cli-polish branch July 19, 2026 16:21
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