Let candidates choose a report improvement as the next practice focus

Offen
#580 3 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Hsieh-HC arbeitet bereits daran.

Seit 04.11.2026.

  • #593 von @Hsieh-HC — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
74/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
Rust
Sterne
228
Forks
150
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
230

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sysprog21/codetrial

Alle Issues in sysprog21/codetrial

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.