Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CLI: extract a shared engine-inventory row renderer (legend is shared, rows aren't)

Aperta Adatta ai principianti
#772 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Leggi i due cicli sulle righe in apps/rocm/src/main.rs intorno alle righe 4991 e 5183, quindi confronta render_engine_inventory_text in apps/rocm/src/engines_cmd.rs con la sezione “Shared UI components” in AGENTS.md. Decidi se la formattazione del renderer può usare lo stesso helper; aggiorna entrambe le copie di main.rs e il terzo renderer se sono compatibili. Il lavoro è completato quando l’helper condiviso per le righe viene usato nei punti applicabili e documentato in AGENTS.md.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement ux-opportunities

apps/rocm/src/main.rs has two engine-inventory listings that already share a de-duplicated legend helper, write_default_engine_legend (around main.rs:4939), with a comment explicitly noting it exists so the two copies can't drift apart on that one line. But the per-row rendering directly below each legend — a {marker} {name:10} {note}-shaped loop — is still duplicated: once around main.rs:4991-4997 and again near main.rs:5183. A third, differently-structured renderer for the same underlying data exists in apps/rocm/src/engines_cmd.rs (render_engine_inventory_text, around line 56).

The legend extraction stopped one step short of closing the real duplication. Suggest a small shared helper, something like write_marked_rows(output: &mut impl Write, rows: &[(&str, &str)], marker_for: impl Fn(&str) -> &str), used by all three sites (or, if engines_cmd.rs's renderer has genuinely different formatting needs, at least the two main.rs copies).

This is one of a handful of shared-component opportunities surfaced in an audit of the CLI's output layer (see AGENTS.md's "Shared UI components" section) — filed as a standalone, scoped follow-up rather than bundled with unrelated changes.

Documentation: once this lands, add a bullet for the new row-rendering helper to AGENTS.md's "Shared UI components" section (CLI group), alongside cli_report.rs::ActionReport.

Lingua principale
Rust
Stelle
49
Fork
14
Merge medio
3g 6h
PR unite (30g)
183

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ROCm/rocm-cli

Tutte le issue di ROCm/rocm-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.