Downloaded markdown reports use internal lowercase keys instead of display labels for programming languages
Maintainer thường phản hồi trong vòng 1 ngày
@SkyDrive2 đang làm issue này rồi.
Từ ngày 9/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Di chuyển hàm trợ giúp languageLabel từ web/app.js sang web/lib.js và export hàm này để có thể dùng lại giữa các module. Tiếp theo, cập nhật các hàm downloadSavedReport trong web/app.js và buildMarkdown trong web/interview.js để bọc các giá trị language bằng languageLabel() trước khi truyền chúng vào reportMarkdown. Xác minh bản sửa bằng cách tải báo cáo Markdown từ giao diện web và xác nhận tiêu đề phần mã cuối cùng sử dụng nhãn ngôn ngữ đã được định dạng (ví dụ: ## Final code (Python) thay vì ## Final code (python)).
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- In
web/app.js(around line 1232) insidedownloadSavedReport(), the code passeslanguage: attempt.languagetoreportMarkdown(). - Similarly, in
web/interview.js(around line 2942) insidebuildMarkdown(), the code passeslanguage: 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
- Move the
languageLabelfunction fromweb/app.jstoweb/lib.jsand export it, so it can be shared across modules. - Wrap the
languagevariable withlanguageLabel()inside bothdownloadSavedReport(web/app.js) andbuildMarkdown(web/interview.js) before passing it toreportMarkdown.
I have already verified this fix locally and can submit a pull request if this direction is acceptable.
Reproduction
- Open the CodeTrial web UI and navigate to the lobby (Past attempts).
- Click the "Download report (.md)" button for any completed interview.
- Open the downloaded
.mdfile in a text editor. - 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.
- Ngôn ngữ chính
- Rust
- Star
- 160
- Fork
- 64
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 112
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/codetrial
-
Four problem loader browser tests fail on WindowsCó thể đã có người làm @Patriciaath999 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
sysprog21/codetrial#318 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sysprog21/codetrial#317 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Highlight the active line in the code editorCó thể đã có người làm @ArthurArthurArthur0817 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sysprog21/codetrial#247 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sysprog21/codetrial
Issue tương tự
-
Expose the dot grid colourĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nannou-org/egui_graph#92 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
tursodatabase/turso#10002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
topgrade-rs/topgrade#2419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midagedev/bloomery#318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày