Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ 初心者向け
#246 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@SkyDrive2 がすでに取り組んでいます。

2026年10月9日 から。

  • #1 @SkyDrive2 による — マージ済み
  • #260 @SkyDrive2 による — オープン

評価

難易度
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:

  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.
主要言語
Rust
スター
160
フォーク
64
平均マージ
1日 9時間
マージ済み PR(30日)
103

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。