Downloaded markdown reports use internal lowercase keys instead of display labels for programming languages
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
ヘルパー関数 languageLabel を web/app.js から web/lib.js に移動し、モジュール間で再利用できるようにエクスポートしてください。次に、web/app.js の downloadSavedReport 関数と web/interview.js の buildMarkdown 関数を更新し、reportMarkdown に渡す前に、それぞれの language の値を languageLabel() でラップしてください。Web UI から Markdown レポートをダウンロードし、最終コードセクションの見出しに整形された言語ラベルが使われていること(例:## Final code (python) ではなく ## Final code (Python))を確認して、修正を検証してください。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 160
- フォーク
- 64
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 103
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sysprog21/codetrial のほかの issue
-
Progress difficulty filter lists Hard before Medium対応中かも @Pandamachi が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sysprog21/codetrial#281 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Highlight the active line in the code editor対応中かも @ArthurArthurArthur0817 が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sysprog21/codetrial#247 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
sysprog21/codetrial#291 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
Visualize attempt score trends in the progress view対応中かも @onepch が 2 日前に担当しました。 オープン
sysprog21/codetrial#275 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
sysprog21/codetrial の issue をすべて見る
似ている issue
-
Add Mimirオープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
slavakurilyak/awesome-ai-agents#759 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9272 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
pop-os/cosmic-files#2117 ·
メンテナーはふだん 2 日以内に返信
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dependabot/dependabot-core#16547 ·
メンテナーはふだん 1 日以内に返信
-
bug status:ready-for-test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
UniClipboard/UniClipboard#1985 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信