Skip to content

feat: description prompt, default port fix, v0.13.0#115

Merged
sdbondi merged 3 commits intomainfrom
metadata-fixes-iii
Apr 10, 2026
Merged

feat: description prompt, default port fix, v0.13.0#115
sdbondi merged 3 commits intomainfrom
metadata-fixes-iii

Conversation

@sdbondi
Copy link
Copy Markdown
Member

@sdbondi sdbondi commented Apr 10, 2026

Summary

  • feat: tari template init now prompts for description if [package].description is missing from Cargo.toml, and writes it there (also available as --description flag)
  • fix: Default walletd port updated from 9000 to 5100
  • docs: Updated CLI commands reference and config schema for v0.13
  • chore: Bump workspace version to 0.13.0

Test plan

  • cargo check passes
  • cargo test — all 7 tests pass
  • tari template init on a crate without description prompts for one
  • tari template init on a crate with description skips the prompt

🤖 Generated with Claude Code

sdbondi and others added 3 commits April 10, 2026 10:47
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When running `tari template init`, checks if [package].description
exists in Cargo.toml. If missing, prompts the user for one and writes
it to [package].description (where the metadata crate reads it from).

Also available as --description flag for non-interactive use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- tari template init now prompts for description if [package].description
  is missing and writes it there
- Updated CLI commands and config schema docs
- Default walletd port updated to 5100
- Bump workspace version to 0.13.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request bumps the project version to 0.13.0 and introduces a new description field for template metadata, which is now prompted during initialization and stored in Cargo.toml. Additionally, the default wallet daemon port has been updated from 9000 to 5100 across the CLI and documentation. Review feedback highlights inconsistencies in the documentation where configuration keys were changed to kebab-case, which would prevent them from being parsed correctly, and identifies a redundant synchronous file read in an asynchronous function that should be optimized.

Comment on lines +102 to +104
# default-account = "myaccount"
# metadata-server-url = "http://localhost:3000"
# template-address = "template_abc123..."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The configuration keys in the documentation are inconsistent with the code. The ProjectConfig struct in crates/cli/src/project/config.rs uses underscores for field names (e.g., default_account, metadata_server_url, template_address), and there is no rename_all attribute to convert them to kebab-case. Using hyphens in the configuration file will cause these settings to be ignored by the parser.

Suggested change
# default-account = "myaccount"
# metadata-server-url = "http://localhost:3000"
# template-address = "template_abc123..."
# default_account = "myaccount"
# metadata_server_url = "http://localhost:3000"
# template_address = "template_abc123..."

Comment on lines +119 to +121
| `default-account` | String | None | Default wallet account |
| `metadata-server-url` | URL | None | Metadata server URL |
| `template-address` | Address | None | Template address (saved automatically by `tari publish`) |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

These table entries should use underscores to match the field names in the ProjectConfig struct, ensuring that users who copy-paste from the documentation have a working configuration.

Suggested change
| `default-account` | String | None | Default wallet account |
| `metadata-server-url` | URL | None | Metadata server URL |
| `template-address` | Address | None | Template address (saved automatically by `tari publish`) |
| `default_account` | String | None | Default wallet account |
| `metadata_server_url` | URL | None | Metadata server URL |
| `template_address` | Address | None | Template address (saved automatically by `tari publish`) |

// Check if [package].description already exists
let cargo_toml_path = args.path.join("Cargo.toml");
let has_description = if cargo_toml_path.exists() {
let content = std::fs::read_to_string(&cargo_toml_path)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This line performs a redundant synchronous file read. The handle function (the caller) has already read the contents of Cargo.toml into cargo_toml_content at line 65. Additionally, using std::fs in an async context blocks the executor thread, which should be avoided. Consider passing the already-read content or a parsed DocumentMut to this function.

@sdbondi sdbondi merged commit 73a1382 into main Apr 10, 2026
4 of 6 checks passed
@sdbondi sdbondi deleted the metadata-fixes-iii branch April 10, 2026 10:39
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