Let candidates choose a report improvement as the next practice focus

Aperta
#580 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Hsieh-HC ci sta già lavorando.

Dal 4/11/2026.

  • #593 di @Hsieh-HC — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Start by reading web/render.js::reportMarkup() and the practice-focus flow in web/problem-picker.js and web/app.js. Trace how a selected item can reach the lobby without changing the existing automatic Carry forward behavior or the separate sharing opt-in, then add browser regression coverage for both paths. Done means the exact item is selected, sharing remains unchecked, and the listed interview settings and downloadable Markdown report remain unchanged.

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

Descrizione

Problem

A report may recommend several different improvements, such as problem restatement and edge-case enumeration. When a candidate prepares another practice session or uses Try again, CodeTrial currently derives the practice focus from saved reports automatically. The candidate cannot explicitly choose which improvement item should become that focus.

Current behavior

The existing practice-focus flow was introduced as part of #38, including commit 26410f7 (Let a candidate share a practice focus).

I reviewed current main at revision 8f5ad5c.

  • web/render.js::reportMarkup() renders every improvementPlan item under Practice next, including its phase, drill, duration, success criterion, and self-review checks.
  • web/problem-picker.js::practiceFocus() derives one focus from saved reports. A weakness repeated across reports wins, while ties preserve the newer report and plan ordering.
  • The derived focus contains the weakness, drill, success criterion, and occurrence count. It does not change problem selection or become new assessment evidence.
  • web/app.js displays the derived focus in the lobby as Carry forward and lets the candidate explicitly choose whether to share it with Jim.
  • web/interview.js consumes the shared focus from session storage.
  • src/agent/prompts.rs allows the shared practice focus to guide at most one neutral follow-up. It does not change the problem, expected solution, rubric, score, or correctness decision.
  • The existing Try again action selects the previous problem and restores related interview settings, but it does not select a particular improvementPlan item from that report.

The existing path therefore supports carrying an automatically selected practice focus into another interview, but it does not let the candidate choose a specific improvement item from the report.

Desired outcome

Each improvement item in the web report has a Practice this action. Pressing it carries that specific improvement item into the lobby as the selected practice focus.
For example, if the candidate chooses an edge-case enumeration item, the existing practice-focus area could show:

Selected practice focus · Test
Drill: Enumerate boundary and edge cases before running tests.
Success: Identify the relevant boundary cases before execution.

The existing Share this focus with Jim checkbox remains below the selected focus and stays unchecked until the candidate explicitly opts in. If the candidate does not press Practice this, the current automatically derived Carry forward behavior remains unchanged.

Image

Proposed scope

  1. Add a Practice this action to each valid improvementPlan item in the web report.
  2. Carry the selected item's phase, weakness, drill, and success criterion into the lobby.
  3. Let the explicitly selected item take precedence over practiceFocus(reports) for that lobby session.
  4. Render the selected item in the existing practice-focus area above Share this focus with Jim.
  5. Keep sharing the focus with Jim as a separate explicit opt-in.

Acceptance criteria

  • Each valid Practice next item in the web report offers Practice this.
  • Pressing Practice this makes that exact improvement item the selected practice focus in the lobby.
  • The explicitly selected item takes precedence over the automatically derived recurring focus for that lobby session.
  • Share this focus with Jim remains unchecked after selecting an item.
  • If no improvement item is explicitly selected, the existing practiceFocus() behavior remains unchanged.
  • Selecting a practice focus does not change the selected problem, difficulty, session length, interview format, or editor settings.
  • The downloadable Markdown report remains unchanged.
  • Browser regression coverage verifies that Practice this carries the exact selected item into the lobby, leaves sharing with Jim unchecked, and preserves the existing automatic Carry forward behavior when no item is selected.
Lingua principale
Rust
Stelle
223
Fork
148
Merge medio
1g 11h
PR unite (30g)
224

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 sysprog21/codetrial

Tutte le issue di sysprog21/codetrial

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.