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

Downloaded markdown reports use internal lowercase keys instead of display labels for programming languages

Aperta Adatta ai principianti
#246 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@SkyDrive2 ci sta già lavorando.

Dal 9/10/2026.

  • #1 di @SkyDrive2 — integrata
  • #260 di @SkyDrive2 — aperta

Valutazione

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

Direzione di ricerca

Sposta la funzione helper languageLabel da web/app.js a web/lib.js ed esportala per riutilizzarla tra i moduli. Poi aggiorna le funzioni downloadSavedReport in web/app.js e buildMarkdown in web/interview.js in modo che racchiudano i rispettivi valori language con languageLabel() prima di passarli a reportMarkdown. Verifica la correzione scaricando un report Markdown dall’interfaccia web e confermando che l’intestazione della sezione del codice finale usa l’etichetta della lingua formattata (ad es. ## Final code (Python) invece di ## Final code (python)).

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

Descrizione

Observed behavior

When downloading an interview report as a .md file, the heading for the final code section displays the raw, lowercase internal language key (e.g., ## Final code (python) or ## Final code (cpp)).

However, in the web UI (such as the Past attempts history panel), the language is correctly formatted and displays as Python or C++.

Root Cause Analysis

The inconsistency occurs because the Markdown generator receives the raw language key instead of the formatted label:

  1. In web/app.js (around line 1232) inside downloadSavedReport(), the code passes language: attempt.language to reportMarkdown().
  2. Similarly, in web/interview.js (around line 2942) inside buildMarkdown(), the code passes language: state.language.

The formatting helper function languageLabel(value) is currently defined locally in web/app.js (around line 1371), which makes it inaccessible to web/interview.js and missed during the download serialization.

Expected behavior

The downloaded markdown report should be consistent with the web UI and use the proper human-readable label (e.g., ## Final code (Python)), rather than the internal data key.

Proposal
  1. Move the languageLabel function from web/app.js to web/lib.js and export it, so it can be shared across modules.
  2. Wrap the language variable with languageLabel() inside both downloadSavedReport (web/app.js) and buildMarkdown (web/interview.js) before passing it to reportMarkdown.

I have already verified this fix locally and can submit a pull request if this direction is acceptable.

Reproduction
  1. Open the CodeTrial web UI and navigate to the lobby (Past attempts).
  2. Click the "Download report (.md)" button for any completed interview.
  3. Open the downloaded .md file in a text editor.
  4. Scroll to the bottom and observe the heading: ## Final code (python) instead of ## Final code (Python).
    (The exact same issue occurs when downloading the report immediately after a session ends).
CodeTrial version

Built from source (commit 3c8fccd)

Environment

OS: All
Browser: All
Language: Any
Interview loop: N/A
Problem: N/A
REACTO or STAR step: Post-interview (Report Download)
Reconnect: N/A

Sanitized evidence

Downloaded markdown file contains:
## Final code (python)

Expected:
## Final code (Python)

Public data confirmation
  • I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
Lingua principale
Rust
Stelle
144
Fork
41
Merge medio
1g 7h
PR unite (30g)
93

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.