Skip to content

Commit 7e9e02b

Browse files
0.2.3
1 parent d6dbf1c commit 7e9e02b

23 files changed

+2334
-104
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ chrono = { version = "0.4", features = ["serde"] }
3636
fuzzy-matcher = "0.3"
3737

3838
# Validation system dependencies
39-
raz-validation = { path = "raz-validation", version = "0.2.2" }
39+
raz-validation = { path = "raz-validation", version = "0.2.3" }
4040

4141
[profile.release]
4242
opt-level = 3

raz-adapters/cli/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "raz-cli"
3-
version = "0.2.2"
3+
version = "0.2.3"
44
edition = "2024"
55
description = "Universal command runner for Rust - Run any Rust file from anywhere with cursor-aware test targeting and override persistence"
66
license = "MIT"
@@ -18,10 +18,10 @@ name = "raz"
1818
path = "src/main.rs"
1919

2020
[dependencies]
21-
raz-common = { path = "../../raz-common", version = "0.2.2" }
22-
raz-core = { path = "../../raz-core", version = "0.2.2" }
23-
raz-config = { path = "../../raz-config", version = "0.2.2" }
24-
raz-override = { path = "../../raz-override", version = "0.2.2" }
21+
raz-common = { path = "../../raz-common", version = "0.2.3" }
22+
raz-core = { path = "../../raz-core", version = "0.2.3" }
23+
raz-config = { path = "../../raz-config", version = "0.2.3" }
24+
raz-override = { path = "../../raz-override", version = "0.2.3" }
2525
clap = { workspace = true }
2626
tokio = { workspace = true }
2727
serde_json = { workspace = true }

raz-adapters/cli/src/main.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ enum OverrideCommands {
113113
/// Force clear without confirmation
114114
#[arg(short, long)]
115115
force: bool,
116+
/// Clear overrides for a specific file
117+
#[arg(long)]
118+
file: Option<PathBuf>,
116119
},
117120
/// Migrate legacy overrides to new format
118121
Migrate {
@@ -1156,6 +1159,7 @@ fn detect_project_template(working_dir: &Path) -> String {
11561159

11571160
/// Handle override subcommands
11581161
fn handle_override_command(working_dir: &Path, cmd: OverrideCommands) -> anyhow::Result<()> {
1162+
// Use config hierarchy to find the appropriate storage location
11591163
let cli = OverrideCli::new(working_dir);
11601164

11611165
match cmd {
@@ -1184,8 +1188,12 @@ fn handle_override_command(working_dir: &Path, cmd: OverrideCommands) -> anyhow:
11841188
OverrideCommands::Delete { key } => {
11851189
cli.delete(&key)?;
11861190
}
1187-
OverrideCommands::Clear { force } => {
1188-
cli.clear_all(force)?;
1191+
OverrideCommands::Clear { force, file } => {
1192+
if let Some(file_path) = file {
1193+
cli.clear_by_file(&file_path, force)?;
1194+
} else {
1195+
cli.clear_all(force)?;
1196+
}
11891197
}
11901198
OverrideCommands::Migrate {
11911199
file,
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# RAZ VS Code Extension - Installation Guide
2+
3+
## Quick Installation
4+
5+
The RAZ VS Code extension has been packaged with a simplified, cleaner UI for better user experience.
6+
7+
### Installation Steps
8+
9+
1. **Install the VSIX file:**
10+
```bash
11+
code --install-extension raz-vscode-0.2.2.vsix
12+
```
13+
14+
2. **Restart VS Code** to ensure the extension loads properly.
15+
16+
3. **Open a Rust project** to activate the extension.
17+
18+
## What's New & Fixed
19+
20+
### Override Commands
21+
-**List All Overrides** - Shows picker to select project when multiple .raz directories exist
22+
-**Show Override Statistics** - Properly detects project context from active file or shows picker
23+
-**Clear Saved Overrides** - Shows picker to select which project to clear overrides from
24+
25+
### Simplified Tree View
26+
-**Cleaner UI** - Less nesting, shows only what matters
27+
-**Direct Function Names** - Shows just the function name without file details
28+
-**One-Line Override Display** - Shows `▶ -- --test-threads=1` format
29+
-**Simple Interactions**:
30+
- **Click** the item to run with the override
31+
- **Right-click** → Edit to modify the override
32+
-**Workspace Aggregation** - Workspaces show all member crate overrides directly
33+
34+
## Using the Simplified UI
35+
36+
### Tree View Structure
37+
```
38+
⚡ RAZ: OVERRIDES
39+
taxman (2 overrides) ← Workspace total count, not expandable
40+
> taxman-domain (1 override) ← Member crate, expandable
41+
v taxman (1 override) ← Member crate, expandable
42+
v test_create_transaction_simple
43+
▶ -- --test-threads=1
44+
```
45+
46+
### How to Use
47+
1. Click the ⚡ (RAZ) icon in the activity bar
48+
2. Expand projects to see function overrides
49+
3. Expand functions to see their override settings
50+
4. **Click** `▶ -- --test-threads=1` to run
51+
5. **Right-click** → Edit to modify the override
52+
53+
### Key Improvements
54+
- **Flattened workspace structure** - Workspace shows total count, member crates as siblings
55+
- **No duplicate nesting** - Clean hierarchy without redundant folders
56+
- **Clean function names** - Just shows the function name
57+
- **Single action line** - Play button and args in one line
58+
- **Direct execution** - Click to run, right-click to edit
59+
60+
## Configuration Hierarchy
61+
62+
The extension supports hierarchical configuration:
63+
- **Project** (.raz in project root) - Highest priority
64+
- **Workspace** (.raz in workspace root) - Medium priority
65+
- **Global** (~/.raz) - Lowest priority
66+
67+
## Tips
68+
69+
- The `` indicates a runnable override
70+
- Hover over items to see tooltips with full details
71+
- The tree automatically refreshes when override files change
72+
73+
## Troubleshooting
74+
75+
If you don't see your overrides:
76+
1. Make sure you're in a Rust project with saved overrides
77+
2. Check that `.raz/overrides.toml` exists in your project
78+
3. Try refreshing the tree view with the refresh button
79+
4. Check the Output panel (View → Output → RAZ) for any errors
80+
81+
## Need Help?
82+
83+
- Check the [README](readme.md) for detailed usage instructions
84+
- Report issues at: https://github.com/codeitlikemiley/raz/issues

raz-adapters/vscode/package-lock.json

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

raz-adapters/vscode/package.json

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Uriah Galang <[email protected]>",
66
"icon": "images/raz-logo.gif",
77
"license": "MIT",
8-
"version": "0.2.2",
8+
"version": "0.2.3",
99
"repository": {
1010
"type": "git",
1111
"url": "https://github.com/codeitlikemiley/raz"
@@ -15,7 +15,10 @@
1515
"color": "#0a0a0a",
1616
"theme": "dark"
1717
},
18-
"categories": ["Programming Languages", "Other"],
18+
"categories": [
19+
"Programming Languages",
20+
"Other"
21+
],
1922
"keywords": [
2023
"rust",
2124
"command",
@@ -72,7 +75,7 @@
7275
},
7376
{
7477
"command": "raz.overrideStats",
75-
"title": "Show Override Statistics",
78+
"title": "Show Project Override Statistics",
7679
"category": "RAZ"
7780
},
7881
{
@@ -104,6 +107,47 @@
104107
"command": "raz.resetBinary",
105108
"title": "Reset RAZ Binary (Clean Install)",
106109
"category": "RAZ"
110+
},
111+
{
112+
"command": "raz.init",
113+
"title": "Initialize RAZ Configuration",
114+
"category": "RAZ"
115+
},
116+
{
117+
"command": "raz.listOverridesForFile",
118+
"title": "List Overrides for Current File",
119+
"category": "RAZ"
120+
},
121+
{
122+
"command": "raz.showStatsForFile",
123+
"title": "Show Override Statistics for Current File",
124+
"category": "RAZ"
125+
},
126+
{
127+
"command": "raz.clearOverridesForFile",
128+
"title": "Clear Overrides for Current File",
129+
"category": "RAZ"
130+
},
131+
{
132+
"command": "raz.refreshOverrides",
133+
"title": "Refresh Overrides",
134+
"category": "RAZ",
135+
"icon": "$(refresh)"
136+
},
137+
{
138+
"command": "raz.editOverride",
139+
"title": "Edit Override",
140+
"category": "RAZ"
141+
},
142+
{
143+
"command": "raz.editAllOverrideOptions",
144+
"title": "Edit All Override Options",
145+
"category": "RAZ"
146+
},
147+
{
148+
"command": "raz.runSpecificOverride",
149+
"title": "Run Specific Override",
150+
"category": "RAZ"
107151
}
108152
],
109153
"keybindings": [
@@ -120,6 +164,41 @@
120164
"when": "editorTextFocus && resourceExtname == .rs"
121165
}
122166
],
167+
"menus": {
168+
"view/title": [
169+
{
170+
"command": "raz.refreshOverrides",
171+
"when": "view == razOverrides",
172+
"group": "navigation"
173+
}
174+
],
175+
"view/item/context": [
176+
{
177+
"command": "raz.editAllOverrideOptions",
178+
"when": "view == razOverrides && viewItem == razOverrideRunnable",
179+
"group": "navigation"
180+
}
181+
]
182+
},
183+
"views": {
184+
"raz": [
185+
{
186+
"id": "razOverrides",
187+
"name": "Overrides",
188+
"icon": "$(settings-gear)",
189+
"contextualTitle": "RAZ Overrides"
190+
}
191+
]
192+
},
193+
"viewsContainers": {
194+
"activitybar": [
195+
{
196+
"id": "raz",
197+
"title": "RAZ",
198+
"icon": "$(zap)"
199+
}
200+
]
201+
},
123202
"configuration": {
124203
"title": "RAZ",
125204
"properties": {
@@ -147,7 +226,8 @@
147226
}
148227
},
149228
"dependencies": {
150-
"tar": "^7.4.3"
229+
"tar": "^7.4.3",
230+
"toml": "^3.0.0"
151231
},
152232
"devDependencies": {
153233
"@eslint/js": "^9.13.0",
@@ -171,4 +251,4 @@
171251
"build": "npm run compile && npm run package-ext",
172252
"bundle": "npm run compile && npm run package"
173253
}
174-
}
254+
}

0 commit comments

Comments
 (0)