Skip to content

chore: auto-install dev tools and unify terminal styling#63

Merged
mohamedmansour merged 1 commit intomainfrom
mmansour/dx-auto-install-and-styled-output
Mar 4, 2026
Merged

chore: auto-install dev tools and unify terminal styling#63
mohamedmansour merged 1 commit intomainfrom
mmansour/dx-auto-install-and-styled-output

Conversation

@mohamedmansour
Copy link
Copy Markdown
Contributor

  • Add ensure_cargo_install, ensure_rustup_component, and ensure_rustup_target helpers in xtask/src/util.rs to auto-install missing Rust tools (cargo-deny, wasm-pack, clippy, rustfmt, wasm32-unknown-unknown target) on first run of cargo xtask check.
  • Replace Printer structs in both xtask and webui-cli with console::style() free functions for consistent terminal colors.
  • Style all previously plain eprintln! output (step runner, build examples, dev mode, file watcher) with colored symbols.
  • Make cargo xtask and webui with no subcommand exit 0 instead of failing.
  • Enable clap color feature for colored help output.
  • Update copilot-instructions.md with terminal styling and auto-install conventions.
  • Update quality-gate SKILL.md to document auto-install behavior.

- Add ensure_cargo_install, ensure_rustup_component, and
  ensure_rustup_target helpers in xtask/src/util.rs to auto-install
  missing Rust tools (cargo-deny, wasm-pack, clippy, rustfmt,
  wasm32-unknown-unknown target) on first run of cargo xtask check.
- Replace Printer structs in both xtask and webui-cli with
  console::style() free functions for consistent terminal colors.
- Style all previously plain eprintln! output (step runner, build
  examples, dev mode, file watcher) with colored symbols.
- Make cargo xtask and webui with no subcommand exit 0 instead of
  failing.
- Enable clap color feature for colored help output.
- Update copilot-instructions.md with terminal styling and
  auto-install conventions.
- Update quality-gate SKILL.md to document auto-install behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mohamedmansour mohamedmansour requested review from a team, akroshg and janechu March 4, 2026 20:23
Copy link
Copy Markdown
Contributor

@akroshg akroshg left a comment

Choose a reason for hiding this comment

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

LGTM.

@mohamedmansour mohamedmansour merged commit 8b7d952 into main Mar 4, 2026
10 checks passed
@mohamedmansour mohamedmansour deleted the mmansour/dx-auto-install-and-styled-output branch March 4, 2026 22:20
mohamedmansour added a commit that referenced this pull request Mar 4, 2026
Add realistic, real-world benchmark suites for all performance-critical
crates in the workspace, modeled after actual WebUI template patterns
from the example apps.

Parser benchmarks (webui-parser):
- Add 4 realistic template builders: todo-app root page, shadow-DOM
  component, text-heavy article, and mixed-directive dashboard.
- Add parser_realistic and parser_text_vs_directive benchmark groups.
- Keep all 5 existing synthetic benchmark groups for regression tracking.

Handler benchmarks (webui-handler):
- Add handler_loop_scaling: vary array size from 10 to 2000 items.
- Add handler_condition_variety: identifier, predicate, negation, and
  compound AND/OR conditions with true/false/mixed state.
- Add handler_nested_components: 3-level component hierarchy (root, app,
  item) with 50 loop iterations.
- Add handler_state_depth: flat through 5-level nested state lookups.

Protocol benchmarks (webui-protocol):
- Add medium protocol (6-fragment todo-app equivalent).
- Add parametric large protocol generator (dashboard with N panels).
- Add protocol_size_sweep: serialize/deserialize at 5, 15, 30, 50
  panel counts to measure scaling.

Expression benchmarks (webui-expressions) — NEW:
- Benchmark evaluate() across identifiers, predicates (string equality,
  numeric comparison, variable-vs-variable), compound AND/OR with
  short-circuit evaluation, negation, and realistic patterns (admin
  check, auth guard, item state check).

State benchmarks (webui-state) — NEW:
- Benchmark find_value_by_dotted_path across path depths (1-8 levels),
  value types (string/number/boolean/array/object clone cost), .length
  pseudo-property, missing-path early exit, large object (100 keys)
  lookup, and loop simulation (100-item batch lookups).

Process management refactor (xtask):
- Extract child-process lifecycle logic from dev.rs into a dedicated
  process.rs module with cross-platform support.
- Add graceful shutdown via SIGTERM (Unix) and CTRL_BREAK_EVENT (Windows)
  with a timed fallback to a forced stop.
- Spawn children in their own process groups for clean signalling.
- Replace Printer struct with direct console::style() calls, aligning
  with upstream terminal styling changes from #63.

Xtask bench command:
- Add bench subcommand supporting parser, handler, protocol,
  expressions, state, and all targets.

Dependencies:
- Add criterion as a workspace dev-dependency for expressions and state.
- Add libc as a unix-only dependency for xtask (process groups).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohamedmansour added a commit that referenced this pull request Mar 5, 2026
)

* feat: add comprehensive criterion benchmarks across all core crates

Add realistic, real-world benchmark suites for all performance-critical
crates in the workspace, modeled after actual WebUI template patterns
from the example apps.

Parser benchmarks (webui-parser):
- Add 4 realistic template builders: todo-app root page, shadow-DOM
  component, text-heavy article, and mixed-directive dashboard.
- Add parser_realistic and parser_text_vs_directive benchmark groups.
- Keep all 5 existing synthetic benchmark groups for regression tracking.

Handler benchmarks (webui-handler):
- Add handler_loop_scaling: vary array size from 10 to 2000 items.
- Add handler_condition_variety: identifier, predicate, negation, and
  compound AND/OR conditions with true/false/mixed state.
- Add handler_nested_components: 3-level component hierarchy (root, app,
  item) with 50 loop iterations.
- Add handler_state_depth: flat through 5-level nested state lookups.

Protocol benchmarks (webui-protocol):
- Add medium protocol (6-fragment todo-app equivalent).
- Add parametric large protocol generator (dashboard with N panels).
- Add protocol_size_sweep: serialize/deserialize at 5, 15, 30, 50
  panel counts to measure scaling.

Expression benchmarks (webui-expressions) — NEW:
- Benchmark evaluate() across identifiers, predicates (string equality,
  numeric comparison, variable-vs-variable), compound AND/OR with
  short-circuit evaluation, negation, and realistic patterns (admin
  check, auth guard, item state check).

State benchmarks (webui-state) — NEW:
- Benchmark find_value_by_dotted_path across path depths (1-8 levels),
  value types (string/number/boolean/array/object clone cost), .length
  pseudo-property, missing-path early exit, large object (100 keys)
  lookup, and loop simulation (100-item batch lookups).

Process management refactor (xtask):
- Extract child-process lifecycle logic from dev.rs into a dedicated
  process.rs module with cross-platform support.
- Add graceful shutdown via SIGTERM (Unix) and CTRL_BREAK_EVENT (Windows)
  with a timed fallback to a forced stop.
- Spawn children in their own process groups for clean signalling.
- Replace Printer struct with direct console::style() calls, aligning
  with upstream terminal styling changes from #63.

Xtask bench command:
- Add bench subcommand supporting parser, handler, protocol,
  expressions, state, and all targets.

Dependencies:
- Add criterion as a workspace dev-dependency for expressions and state.
- Add libc as a unix-only dependency for xtask (process groups).
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.

2 participants