Skip to content

Add Function Composition solution files#274

Merged
myoshi2891 merged 7 commits into
mainfrom
dev-from-macmini
Feb 19, 2026
Merged

Add Function Composition solution files#274
myoshi2891 merged 7 commits into
mainfrom
dev-from-macmini

Conversation

@myoshi2891

@myoshi2891 myoshi2891 commented Feb 19, 2026

Copy link
Copy Markdown
Owner

'Apply Round 5 and Emergency Fixes: Remove Tailwind SRI (fix styles), Fix Copy Button CSS, Update CLAUDE.md' (hash 49675f3).

The fixes address:

Tailwind CSS Styles: Removed integrity attribute from the CDN link to resolve loading issues.
Copy Button Positioning: Added position: absolute and hover effects to correctly place the button.
Documentation: Updated CLAUDE.md matrix and model names as planned in Round 5.
Helper Script: Updated calc_sri_fix.sh to remove redundant cleanup and handle set -e gracefully.
All tasks for Function Composition fixes are complete.

Accessibility: Added aria-live regions to

README_react.html
for better screen reader support.
Code Cleanup: Removed unreachable code in useEffect.
UI: Fixed code copy button positioning.

Updated walkthrough to include Round 2 fixes: CSS adjustment for code copy button and useEffect optimization for Prism highlighting.

FunctionComposition_TS.ipynb
: Converted markdown to runnable code cell and updated metadata.
README_react.html
: Improved Prism highlighting, fixed init state value, added missing example, used production scripts, and enhanced accessibility.
README.md
: Corrected anchor links and simplified flowchart logic.

@coderabbitai

coderabbitai Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

右から左へ関数を合成するTypeScriptユーティリティの追加、詳細なREADMEとReactベースの自己完結型可視化HTMLの追加、プロジェクト方針を書いたCLAUDE.mdの追加、およびCDNリソースのSRI計算スクリプト更新が行われました。

Changes

Cohort / File(s) Summary
TypeScript 実装
JavaScript/2629. Function Composition/Claude Code Sonnet 4.6 extended/FunctionComposition_TS.ipynb
型エイリアス F = (x: number) => number と公開関数 compose(functions: readonly F[]): F を追加。reduceRight による右→左合成、空配列での恒等動作、明示的な型注釈と使用例を含む。
ドキュメント (Markdown / HTML)
JavaScript/2629. Function Composition/Claude Code Sonnet 4.6 extended/README.md, JavaScript/2629. Function Composition/Claude Code Sonnet 4.6 extended/README_react.html
README.md にアルゴリズム説明、正当性、複雑度、エッジケース、最適化等を追加。README_react.html はフローチャート、TypeScript コード掲載、React ベースのインタラクティブ可視化(StepViz コンポーネント、再生/前/次/リセット制御)を追加。
プロジェクト方針ドキュメント
CLAUDE.md
プロジェクトのガイドライン、ディレクトリ構成、ドキュメンテーション方針、コーディング/依存方針などを新規追加(コード変更なし)。
SRI スクリプト
calc_sri_fix.sh
複数の外部CDNリソース用に calculate_sri 呼び出しを追加(React, React DOM, Babel, Tailwind, Prism 等)。既存の Prism toolbar 呼び出しを削除し、リソース集合と順序を変更。

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as User
  participant Browser as Browser UI
  participant Viz as StepViz
  participant Composer as ComposeFn
  participant Fn as UnaryFn

  User->>Browser: click Play / Next / Reset
  Browser->>Viz: update step state
  Viz->>Composer: request evaluation for current step
  Composer->>Fn: invoke functions in reverse order
  Fn-->>Composer: return intermediate result
  Composer-->>Viz: return step result
  Viz-->>Browser: render visualization frame
  Browser-->>User: display updated animation
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰✨ 右へ左へくるりと回し、
小さな関数が列をなす、
reduceRightが紡ぐ道、
ステップごとに光る画面、
うさぎは跳ねて祝うコード。

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: adding new solution files for Function Composition (a LeetCode 2629 problem implementation with TypeScript, documentation, and interactive HTML components).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description check ✅ Passed プルリクエストの説明は提供されたファイルの変更内容と一致しており、Tailwind CSSスタイル修正、コピーボタンのCSS調整、ドキュメント更新、アクセシビリティ改善などの具体的な変更内容が説明されている。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/FunctionComposition_TS.ipynb:
- Around line 1-109: The notebook currently only has markdown; convert the
implementation shown (the compose function and its example tests using the F
type and reduceRight) from the markdown block into a runnable TypeScript code
cell so the kernel can execute it: create a code cell containing the type alias
F, the function compose(functions: readonly F[]): F { ... } implementation and a
few sample calls (e.g., compose([x=>x+1, x=>2*x])(4)) to verify behavior; ensure
the cell uses the notebook's TypeScript kernel so the function and tests run
interactively.
- Around line 94-108: The notebook metadata field language_info.version is set
to "5.3.3" but must match the project's TypeScript version 5.9.3; update the
metadata object (metadata.language_info.version) in the notebook JSON to "5.9.3"
so the kernel/language_info reflects the correct TypeScript version.

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 810-811: Prism.highlightAll() を固定 300ms の setTimeout に頼らず、React
のレンダリング完了を待って呼び出すよう修正してください — 具体的には現在の setTimeout(..., 300) を削除して、該当コンポーネント内で
useEffect を使い(参照されている useState/useEffect/useRef を活用)、レンダリング後に
Prism.highlightAll() を呼ぶ(必要なら requestAnimationFrame や
Promise.resolve().then(...) で次のマクロタスク/フレームを待つ)ように変更してください。現在の呼び出し箇所は
Prism.highlightAll() と setTimeout(..., 300) を探して置き換えてください。
- Around line 1094-1131: The init state is rendering a hardcoded "4" instead of
using the dynamic accumulator; update the SVG text element in the block gated by
"type === 'init'" to render the current accumulator value from the data source
(use stepsData.acc or the local variable acc used elsewhere) so it matches the
other branches that reference {acc} and {result}; locate the <g> under the init
conditional and replace the static "4" text node with the JSX expression that
outputs the acc value.
- Around line 170-178: The displayed examples skip a number — the div showing
"Example 3" (the element with class text-xs and content "Example 3") should be
corrected so numbering is sequential; either change the label to "Example 2" or
insert the missing Example 2 block above it. Update the inner text node "Example
3" (and any related aria/ids if present) to "Example 2" or add the full Example
2 markup matching the surrounding structure (mono text, input lines, and Output
line) to keep example numbering consistent.
- Around line 7-10: The HTML currently pulls development builds of React and
Tailwind; replace the dev UMD scripts src ("react.development.js" and
"react-dom.development.js") with the production UMD builds (e.g.
"react.production.min.js" and "react-dom.production.min.js" from unpkg for
React@18) and stop using the runtime dev CDN "https://cdn.tailwindcss.com" by
instead linking a production-built Tailwind CSS file (a compiled/minified
stylesheet you build or host) so the demo uses minified production assets and
avoids dev warnings and large payloads.
- Around line 884-1133: The SVG returned in the StepVisualization component
lacks accessibility attributes; update the top-level SVG element in the
StepVisualization render to include role="img" and a descriptive aria-label (or
aria-labelledby pointing to a <title id="...">) that summarizes the
visualization (e.g., use the existing label/type/acc/result values to build the
description). Locate the SVG in the StepVisualization return (the element that
contains the defs and maps over fns) and add role and aria attributes, or insert
a <title> with a stable id and set aria-labelledby to that id so screen readers
receive the visualization context.

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README.md:
- Line 11: The anchor id `cpython` is incorrect for the TypeScript/V8 section;
update both the link text "[TypeScript / V8 最適化ポイント](`#cpython`)" and the section
heading id "<h2 id=\"cpython\">..." to a matching, descriptive id such as
"typescript-v8" (or another consistent id), ensuring the link target and the <h2
id="..."> value are identical so the in-page anchor works.
- Around line 50-61: The Mermaid flowchart incorrectly shows an explicit branch
on functions.length === 0 returning an identity, but the implementation uses
reduceRight with an implicit identity initial value; update the diagram to
remove the Empty branch and instead show compose returning a closure (fn x) that
invokes reduceRight starting with an identity accumulator (i.e., initial value
acts as the identity function) so the flow reflects reduceRight over functions
producing the composed result; reference the compose function, reduceRight step,
and the identity initial-value semantics in the updated nodes/labels.

Comment on lines +7 to +10
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

React の開発ビルドが使用されています

react.development.jsreact-dom.development.js は開発用ビルドであり、サイズが大きく、パフォーマンスに影響する警告メッセージがコンソールに出力されます。公開用のデモファイルでは本番ビルドを使用してください。また、cdn.tailwindcss.com も開発専用のCDNです。

🔧 修正案: 本番ビルドの使用
-        <script src="https://unpkg.com/react@18/umd/react.development.js"></script>
-        <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
+        <script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
+        <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html around lines 7 - 10, The HTML currently pulls
development builds of React and Tailwind; replace the dev UMD scripts src
("react.development.js" and "react-dom.development.js") with the production UMD
builds (e.g. "react.production.min.js" and "react-dom.production.min.js" from
unpkg for React@18) and stop using the runtime dev CDN
"https://cdn.tailwindcss.com" by instead linking a production-built Tailwind CSS
file (a compiled/minified stylesheet you build or host) so the demo uses
minified production assets and avoids dev warnings and large payloads.

Comment thread JavaScript/2629. Function Composition/Claude Code Sonnet 4.6 extended/README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 1154-1158: useEffect currently runs on every render calling
Prism.highlightAll(); update the effect in the component where useEffect is
defined so that it only runs once after mount by adding an empty dependency
array [] to the useEffect call; keep the existing window.Prism guard (if
(window.Prism) ...) and leave Prism.highlightAll() intact, just change the
effect signature to useEffect(() => { ... }, []) so code blocks are highlighted
only on initial mount.

---

Duplicate comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Line 10: このファイルにある開発用 Play CDN の読み込みスニペット <script
src="https://cdn.tailwindcss.com"></script> を本番向けの実装に置き換えてください: 開発時は Tailwind
CLI を使って必要なユーティリティだけをプリビルドし(例: tailwind build → app.css)、生成した静的 CSS を HTML の
<link rel="stylesheet" href="..."> で参照するか、デモなら最小限の手書き CSS に差し替えて CDN
を削除してください。ビルド手順はリポジトリのビルドスクリプト(package.json の build スクリプト)に組み込み、HTML では上記のプリビルド
CSS を読み込むようにしてください。

… copy button and optimization for Prism highlighting.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 1238-1252: The right-panel step content wrapper that renders
current.title and current.desc lacks an aria-live region so screen readers
aren’t notified when steps change; update the surrounding div (the one
containing the Step title/description and currently rendering {current.title}
and {current.desc}) to include an appropriate live region attribute (for example
aria-live="polite" and aria-atomic="true") so dynamic updates are announced, and
ensure this change does not interfere with the StepVisualization component
rendering.
- Around line 1163-1168: Remove the unreachable guard inside the useEffect that
checks activeStep > stepsData.length; since activeStep is always kept within [1,
stepsData.length] (initialized with useState(1), incremented with
Math.min(stepsData.length, s + 1), and reset to 1), delete the entire if-block
that tests activeStep > stepsData.length and the associated setIsPlaying(false)
/ setActiveStep(1) branch so the effect only handles the real playing logic for
isPlaying and activeStep.

---

Duplicate comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Line 10: The README currently injects Tailwind via the Play CDN script tag
("https://cdn.tailwindcss.com"), which is intended only for development and can
cause FOUC and runtime styling issues for dynamic React DOM; replace the script
include with a production-built CSS import: run your Tailwind build step to
generate the compiled CSS (e.g., tailwind.css in your build/dist), remove the
<script src="https://cdn.tailwindcss.com"></script> tag and instead add a <link
rel="stylesheet" href="path/to/compiled/tailwind.css"> (or import the generated
CSS in your bundler entry), ensuring the project uses the built CSS in
production and not the Play CDN at runtime.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 990-1004: 矢印パスが合成の実行方向と逆になっているので、SVGのパス方向を反転して関数合成の順(右→左、f0 → f1 →
f2)と一致させてください: 対象は矢印を描画する <path> 要素(現在 d="M170 50 L200 50" や d="M340 50 L370
50")とマーカー参照 markerEnd="url(`#va`)" で、これらを右から左向きのパスに変更して(座標を入れ替える等)表示を reduceRight
の実行順序およびステップハイライトで使っている fnIndex: 2 → 1 → 0 と整合させてください。
- Around line 898-928: SVG の aria-label フォールバックが常に 'Initial state' を使っているため、type
=== 'result' のステップ(stepsData の result ステップ)で誤って "Initial state" と読み上げられます。修正は
return 内の svg の aria-label ロジックを更新して、label が存在すればそれを使い、存在しなければ type を参照して type
=== 'result' の場合は "Result"(または "Final result")を返し、それ以外は "Initial state"
を返すように変更してください(参照箇所: aria-label={`Step visualization: ${label || 'Initial
state'}. Accumulator is ${acc}.`} を修正)。
- Around line 7-27: Add Subresource Integrity (SRI) checks to every external
script and stylesheet tag referenced (e.g., the script tags for
"https://unpkg.com/react@18/...", "https://unpkg.com/react-dom@18/...",
"https://unpkg.com/@babel/standalone/babel.min.js",
"https://cdn.tailwindcss.com", and the cdnjs.cloudflare.com/prism assets, plus
the Google Fonts link) by computing each file's sha384 hash (or appropriate
algorithm) and adding integrity="sha384-..." and crossorigin="anonymous"
attributes to the corresponding <script> and <link> elements; if a provider
(like fonts.googleapis.com or cdn that disables SRI) cannot provide stable
hashes, either self-host the asset or replace it with a hosted copy that
supports SRI and then add integrity and crossorigin attributes to those tags
(use the exact tag URLs in the diff to locate and update each element).

---

Duplicate comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Line 10: The HTML file README_react.html still includes the development
Tailwind Play CDN via the script tag src="https://cdn.tailwindcss.com"; remove
that script tag and replace it with a reference to a built stylesheet (e.g., a
<link rel="stylesheet" href="path/to/generated/tailwind.css">) served from your
app/static assets. Build the CSS with your Tailwind build step (using
tailwind-cli/PostCSS as configured in tailwind.config.js or package.json
scripts) and ensure the generated CSS file is produced and referenced by
README_react.html instead of the CDN.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
calc_sri_fix.sh (2)

10-10: 🧹 Nitpick | 🔵 Trivial

rm -f "$temp_file"trap ... RETURN と重複しています

Line 10 の trap "rm -f \"$temp_file\"" RETURN が関数終了時に必ず一時ファイルを削除するため、Line 27 の rm -f "$temp_file" は冗長です(ただし -f フラグにより二重削除のエラーは発生しません)。

♻️ 整理案
     local hash
     hash=$(openssl dgst -sha384 -binary < "$temp_file" | openssl base64 -A)
     echo "$url sha384-$hash"
-    rm -f "$temp_file"
 }

Also applies to: 27-27

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@calc_sri_fix.sh` at line 10, The trap installed with trap "rm -f
\"$temp_file\"" RETURN already ensures the temporary file is removed when the
function exits, so remove the redundant explicit rm -f "$temp_file" call (the
second deletion) to avoid duplicate cleanup; locate the occurrences of
temp_file, the trap declaration, and the later rm -f "$temp_file" in the script
and delete the redundant rm invocation while keeping the trap intact.

3-3: ⚠️ Potential issue | 🟡 Minor

set -euo pipefail により中間の失敗で後続の計算がすべてスキップされる

set -e が有効なため、calculate_sri がエラー(return 1)を返した場合、スクリプト全体が即座に終了します。Google Fonts(Line 41)が失敗した場合、Line 42 の prism-line-numbers.min.js のハッシュ計算が実行されません。

エラーが発生しても全 URL の処理を継続したい場合は、各呼び出しをエラー無視にするか、失敗時も継続できるラッパーに変更することを検討してください。

🔧 修正案(エラー時も継続する場合)
-calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js"
+calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js" || echo "SKIP: failed for react" >&2

または、スクリプト先頭の set -e を外して各関数の戻り値を個別にチェックするアプローチも有効です。

Also applies to: 42-42

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@calc_sri_fix.sh` at line 3, The script currently uses set -euo pipefail which
causes the whole run to abort when calculate_sri returns non-zero (e.g., Google
Fonts failure), skipping subsequent hashes like prism-line-numbers.min.js; to
fix, either remove set -e from the top or wrap each call to calculate_sri with
an error-ignoring wrapper (e.g., replace direct calls like calculate_sri <url>
with calculate_sri <url> || { echo "calculate_sri failed for <url>"; }, or
implement a helper function run_ignore_errors() that invokes calculate_sri,
captures and logs non-zero exits and always returns success so remaining URLs
are processed) and update usages accordingly (references: calculate_sri,
prism-line-numbers.min.js, Google Fonts).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@calc_sri_fix.sh`:
- Around line 40-41: The Google Fonts URL should not be passed to calculate_sri
because the returned CSS (and thus the SRI hash) varies by User-Agent and will
break real browsers; remove or skip the call that passes
"https://fonts.googleapis.com/..." to calculate_sri (the invocation on the line
with calculate_sri) or replace it with a note to self-host fonts and calculate
SRI from the hosted assets instead; update any logic that collects SRI entries
so it ignores Google Fonts URLs (refer to the calculate_sri invocation and the
SRI collection/aggregation code) and ensure the script documents that Google
Fonts are excluded or must be self-hosted.
- Around line 30-32: The calculate_sri calls use floating version specifiers
which break SRI when a new patch is released; update the three calculate_sri
invocations to use exact patch-pinned versions (include the full semver, e.g.
react@18.x.y, react-dom@18.x.y, `@babel/standalone`@7.x.y) by resolving the
current patch versions and replacing the loose specs in the calculate_sri(...)
arguments, then re-run calculate_sri to produce stable hashes and commit the
updated URLs and hashes; target the calculate_sri calls shown (the three URLs
passed into calculate_sri) when making the change.
- Line 33: calculate_sri is being called for the Tailwind Play CDN URL
("https://cdn.tailwindcss.com"), but that CDN is dynamically generated and
incompatible with SRI; update the SRI calculation logic to detect this URL (or
any Play CDN pattern containing "cdn.tailwindcss.com") and skip SRI generation
for it, emitting a clear warning/log entry instead, and document or whitelist
production-safe alternatives (self‑hosted built Tailwind CSS or a versioned CDN
URL like a jsDelivr tailwind release) so callers know to replace the Play CDN
before enabling SRI.

In `@CLAUDE.md`:
- Line 7: The README's fixed "2×3×3マトリックス(2 AIプロバイダー × 3言語 × 3ドキュメント階層 =
18ファイル)" assertion is inconsistent with the AI provider examples (e.g., "Claude
Sonnet 4.5/", "Claude Code Sonnet 4.6 extended/", "gpt 5.1 thinking
customized/") which show multiple models per provider; update the matrix text to
a variable form such as "2社 × Nモデル × 3言語 × 3ドキュメント階層" or alternatively add a
clarifying note that the examples list multiple model directories per provider
and that total files per problem may exceed 18, and edit the sentence containing
"2×3×3マトリックス" and the AIProvider example section accordingly to keep them
consistent.
- Line 44: Replace the non-standard model identifier "gpt 5.1 thinking
customized/" in the AIProvider list with a valid OpenAI model identifier (e.g.,
"gpt-5.1/" or another official name like "gpt-5.2/" or "o3/"); update the
CLAUDE.md AIProvider entry so it uses the official model naming format (find the
line containing "AIProvider" and the string "gpt 5.1 thinking customized/" and
swap it for the correct identifier).

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 1295-1334: The four navigation buttons (the Play button using
handlePlay and disabled by isPlaying, the Prev and Next buttons that call
setActiveStep and setIsPlaying(false), and the Reset button that calls
setActiveStep(1)/setIsPlaying(false)) lack aria-label attributes; add clear
aria-labels (e.g., "Play", "Previous step", "Next step", "Reset steps" or
similar localized strings) to each button to ensure screen readers announce the
intended action explicitly while keeping existing onClick, disabled, and
className props unchanged.
- Around line 27-32: The Google Fonts <link> tag currently includes an integrity
attribute which breaks font loading across browsers; edit the HTML (the <link
... href="https://fonts.googleapis.com/..." rel="stylesheet" ... /> element) and
remove the integrity attribute (and remove the crossorigin attribute if present)
so the stylesheet is loaded without SRI; if you need SRI, self-host the font
files and apply SRI to those local assets instead.

---

Outside diff comments:
In `@calc_sri_fix.sh`:
- Line 10: The trap installed with trap "rm -f \"$temp_file\"" RETURN already
ensures the temporary file is removed when the function exits, so remove the
redundant explicit rm -f "$temp_file" call (the second deletion) to avoid
duplicate cleanup; locate the occurrences of temp_file, the trap declaration,
and the later rm -f "$temp_file" in the script and delete the redundant rm
invocation while keeping the trap intact.
- Line 3: The script currently uses set -euo pipefail which causes the whole run
to abort when calculate_sri returns non-zero (e.g., Google Fonts failure),
skipping subsequent hashes like prism-line-numbers.min.js; to fix, either remove
set -e from the top or wrap each call to calculate_sri with an error-ignoring
wrapper (e.g., replace direct calls like calculate_sri <url> with calculate_sri
<url> || { echo "calculate_sri failed for <url>"; }, or implement a helper
function run_ignore_errors() that invokes calculate_sri, captures and logs
non-zero exits and always returns success so remaining URLs are processed) and
update usages accordingly (references: calculate_sri, prism-line-numbers.min.js,
Google Fonts).

---

Duplicate comments:
In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html:
- Around line 940-944: The SVG in the StepVisualization component is missing
role="img", which can cause screen readers to ignore the aria-label; update the
SVG element returned by StepVisualization to include role="img" alongside the
existing aria-label (keep the current label logic intact) so assistive tech
treats the SVG as a single image and uses the provided label.
- Around line 22-26: 現在の <script src="https://cdn.tailwindcss.com"
integrity="..."> を使う実装は開発用Play
CDNかつ無バージョンでSRIハッシュが失効すると全スタイル消失するため、該当タグ(src="https://cdn.tailwindcss.com" と
integrity 属性)をバージョン固定された CDN のプリビルド CSS に差し替えるか、プロジェクトのビルドステップで Tailwind
をビルドして配布するよう変更してください; 具体的には script タグを削除してバージョン付きの CDN(例: cdnjs.cloudflare.com の
Tailwind vX.Y.Z の CSS)へのリンクに置き換え、対応する正しい integrity 属性を設定するか、任意の値ユーティリティ(例:
bg-[`#e53170`])を使うなら Tailwind を開発環境でビルドし生成された CSS を配布するフローに切り替えてください.

Comment thread calc_sri_fix.sh Outdated
Comment on lines +30 to +32
calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js"
calculate_sri "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
calculate_sri "https://unpkg.com/@babel/standalone/babel.min.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "calc_sri_fix.sh" -type f

Repository: myoshi2891/Algorithm-DataStructures-Math-SQL

Length of output: 105


🏁 Script executed:

cat -n calc_sri_fix.sh | head -50

Repository: myoshi2891/Algorithm-DataStructures-Math-SQL

Length of output: 2487


🌐 Web query:

React 18 latest version February 2026

💡 Result:

As of February 19, 2026, the latest React 18 release is React 18.3.1 (released April 26, 2024). [1], [2]

(For context: the current latest major React line is React 19, e.g. 19.2.4 as of January 26, 2026.) [1]

Sources:
[1] endoflife.date React page
[2] npm package “react” versions list


🌐 Web query:

Babel standalone latest version 2026

💡 Result:

As of Feb 19, 2026, the latest stable (latest dist-tag) version of Babel Standalone (@babel/standalone) is 7.29.1. [1][2][3]

If you’re looking for the Babel 8 pre-release line, 8.0.0-rc.1 is available. [4]

Install (stable):

npm i `@babel/standalone`@7.29.1

Use via CDN (stable):

<script src="https://cdn.jsdelivr.net/npm/@babel/standalone@7.29.1/babel.min.js"></script>

[2]

Sources: [1] Socket package page, [2] jsDelivr package page, [3] jsDocs package page, [4] newreleases.io release page.


🌐 Web query:

Tailwind CSS CDN dynamic JIT content

💡 Result:

Tailwind’s Play CDN (Tailwind v4: @tailwindcss/browser) runs a JIT compiler in the browser: it scans the page for class tokens and generates/injects the needed CSS at runtime. It’s meant for development/prototyping only, not production. [1]

“Dynamic JIT content” (content added after initial load)

The CDN approach can still work with DOM changes because the JIT-in-browser implementations watch the DOM (commonly via a MutationObserver) and regenerate CSS when new class names appear (for example, when JS injects new elements/classes). [2]

Key limitation: dynamic construction of class names

Even with JIT, Tailwind only generates CSS for class names it can see as complete strings; it does not understand string concatenation/interpolation like bg-${color}-500 unless the full class tokens exist somewhere to be detected. [3]

Use Play CDN when: you need quick demos or a CMS/HTML environment without a build step.
Use a build step when: you need reliable handling of “dynamic classes” (typically by ensuring complete class strings exist in source or by safelisting during build), performance, and production caching.

Sources:
[1] https://tailwindcss.com/docs/installation/play-cdn (tailwindcss.com)
[2] https://beyondco.de/blog/tailwind-jit-compiler-via-cdn (beyondco.de)
[3] https://tailwindcss.com/docs/detecting-classes-in-source-files (tailwindcss.com)

Citations:


🌐 Web query:

Google Fonts dynamic content user agent dependent

💡 Result:

Yes—Google Fonts CSS is dynamically generated and user-agent dependent.

  • When you request a stylesheet from fonts.googleapis.com, Google returns CSS tailored to the requesting browser/user agent, primarily to choose the best-supported font format (e.g., WOFF2 vs WOFF vs older formats). This behavior is explicitly documented by Google. [1]
  • You can observe this yourself by requesting the same Google Fonts CSS URL with different User-Agent headers; the returned @font-face src: URLs and format() entries can differ. [2][3]
  • Implication: Treating a Google Fonts CSS response as a single static asset (e.g., downloading it once and self-hosting only that exact CSS) can break font loading for other browsers, because other user agents may need different formats. [3]

If you want fully deterministic behavior across clients, the usual approach is self-hosting the font files you need (typically WOFF2 + WOFF) and writing your own @font-face rules, or using a generator/workflow that pulls the correct files and emits cross-browser CSS.

Sources: [1] Google Fonts “Technical Considerations” [2] Google Fonts UA-diff curl examples (gist) [3] Stack Overflow discussion of dynamic/UA-specific Google Fonts CSS


SRI ハッシュの安定性が保証されない — バージョンをパッチレベルまで完全に固定する必要があります

react@18react-dom@18 は unpkg によって常に最新の 18.x.y に解決されます(現在 18.3.1)。新しいパッチリリースが出ると、今回計算したハッシュと実際のファイルが一致しなくなり、ブラウザが SRI 検証エラーでリソースを拒否します。@babel/standalone はバージョン指定がまったくないため、状況はさらに深刻です(現在 7.29.1)。

SRI の目的を正しく果たすには、パッチバージョンまで完全に固定してください。

修正案
-calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js"
-calculate_sri "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
-calculate_sri "https://unpkg.com/@babel/standalone/babel.min.js"
+calculate_sri "https://unpkg.com/react@18.3.1/umd/react.production.min.js"
+calculate_sri "https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"
+calculate_sri "https://unpkg.com/@babel/standalone@7.29.1/babel.min.js"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js"
calculate_sri "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
calculate_sri "https://unpkg.com/@babel/standalone/babel.min.js"
calculate_sri "https://unpkg.com/react@18.3.1/umd/react.production.min.js"
calculate_sri "https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"
calculate_sri "https://unpkg.com/@babel/standalone@7.29.1/babel.min.js"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@calc_sri_fix.sh` around lines 30 - 32, The calculate_sri calls use floating
version specifiers which break SRI when a new patch is released; update the
three calculate_sri invocations to use exact patch-pinned versions (include the
full semver, e.g. react@18.x.y, react-dom@18.x.y, `@babel/standalone`@7.x.y) by
resolving the current patch versions and replacing the loose specs in the
calculate_sri(...) arguments, then re-run calculate_sri to produce stable hashes
and commit the updated URLs and hashes; target the calculate_sri calls shown
(the three URLs passed into calculate_sri) when making the change.

Comment thread calc_sri_fix.sh Outdated
calculate_sri "https://unpkg.com/react@18/umd/react.production.min.js"
calculate_sri "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"
calculate_sri "https://unpkg.com/@babel/standalone/babel.min.js"
calculate_sri "https://cdn.tailwindcss.com"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

❓ Verification inconclusive

Tailwind CDN cdn.tailwindcss.com dynamic content SRI compatibility


cdn.tailwindcss.com (Tailwind’s “Play CDN”) isn’t a good fit for SRI in practice because SRI only works reliably when the fetched resource is static and versioned.

  • SRI requires byte-for-byte stability. If even one byte of the fetched script changes, the browser will refuse to run it [2]. That’s why you can’t combine SRI with “always use the latest” URLs—SRI forces you to pin an exact artifact/version [2].
  • Dynamic/rewritten CDN responses break SRI. If a CDN generates or modifies content, integrity checks will fail because the hash won’t match [3].
  • Tailwind explicitly frames the Play CDN as development-only, not production [1]—which aligns with the fact that it’s not designed around long-term, pinned, SRI-verified deployment.

What to do instead (SRI-compatible options)

  1. Best practice: build Tailwind at deploy time and self-host the generated CSS (no third-party runtime script, easy CSP/SRI story) [1].
  2. If you must use a CDN script: use a version-pinned URL (for example the npm CDN distribution of @tailwindcss/browser) and compute SRI for that exact file/version [4]—but note this still doesn’t magically give SRI coverage for any additional dynamic behavior beyond that single fetched file.

Sources: Tailwind Play CDN docs [1], MDN SRI overview/limitations [2], SRI vs dynamic CDN content [3], versioned @tailwindcss/browser package distribution info [4].


Tailwind Play CDN JIT dynamic generation per request


Tailwind’s Play CDN (the @tailwindcss/browser script) does not do “JIT CSS generation on the CDN/server per HTTP request”. Instead, it ships a browser runtime that generates the needed CSS in the user’s browser by scanning what’s in the page (no build step), and it’s explicitly meant for development only, not production. [1]

That also means the usual Tailwind limitation still applies: Tailwind only generates styles for class names it can see as complete, static strings (it can’t understand string concatenation/interpolation like bg-${color}-500), so “dynamic” classes still won’t be generated unless the final class strings actually exist in the scanned content. [2] [3]

If you truly need per-request CSS generation for dynamic content (e.g., CMS pages), you’d have to run Tailwind on your own server/build pipeline (often with caching), rather than relying on the Play CDN. [1]

Sources: Tailwind Play CDN docs [1], Tailwind class detection + dynamic class name guidance [2], Tailwind Labs discussion reiterating the dynamic-class limitation [3].


cdn.tailwindcss.com static or dynamic content Tailwind CSS


Using cdn.tailwindcss.com (Tailwind’s “Play CDN”, now typically loaded as @tailwindcss/browser) is runtime (dynamic) Tailwind: the browser script scans your page for Tailwind class names and generates/injects the CSS in the client, with no build step. It’s meant for quick prototyping and not production. [1]

If you want static CSS (better caching/perf, no runtime generation), use the normal Tailwind workflow: build Tailwind ahead of time so it “scans your files… [and] writ[es] them to a static CSS file.” [1] The CDN approach regenerates on the client (commonly noted as slower and less cache-friendly). [2]

Sources:
[1] Tailwind CSS Docs — Play CDN / Installation page (tailwindcss.com)
[2] Stack Overflow discussion noting Play CDN regenerates client-side (stackoverflow.com)

Citations:


Tailwind Play CDN は SRI と根本的に非互換です

https://cdn.tailwindcss.com は Tailwind の Play CDN(開発環境専用)であり、ブラウザ側で JavaScript ランタイムが実行される際に、ページ内の Tailwind クラス名をスキャンして CSS を動的に生成・注入します。この動的な生成メカニズムにより、計算したハッシュが実行環境や対象ページによって変わるため、本番 HTML での integrity 属性に使用してもその効果がなくなります。

本番環境では以下のいずれかを使用してください:

  • Tailwind CSS をローカルにビルドして静的 CSS ファイルを自ホストする
  • バージョン固定済みの CDN URL(例: https://cdn.jsdelivr.net/npm/tailwindcss@3.x.x/dist/tailwind.min.css)を使用する

このエントリは SRI 計算対象から除外することを検討してください。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@calc_sri_fix.sh` at line 33, calculate_sri is being called for the Tailwind
Play CDN URL ("https://cdn.tailwindcss.com"), but that CDN is dynamically
generated and incompatible with SRI; update the SRI calculation logic to detect
this URL (or any Play CDN pattern containing "cdn.tailwindcss.com") and skip SRI
generation for it, emitting a clear warning/log entry instead, and document or
whitelist production-safe alternatives (self‑hosted built Tailwind CSS or a
versioned CDN URL like a jsDelivr tailwind release) so callers know to replace
the Play CDN before enabling SRI.

Comment thread calc_sri_fix.sh Outdated
Comment on lines +40 to +41
# Google Fonts returns dynamic CSS, SRI might be unstable but we check just in case or skip if needed. User instruction implies to check.
calculate_sri "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Google Fonts の SRI ハッシュは User-Agent に依存するため実用上無効です

Line 40 のコメントで不安定性を認識していますが、根本的な問題はさらに深刻です。Google Fonts は User-Agent ヘッダーに応じて異なる CSS(異なるフォントフォーマット: woff2/woff/ttf)を返します。このスクリプト(curl のデフォルト UA)で計算したハッシュは、実際のブラウザ(Chrome, Firefox, Safari 等)からのリクエストとは必ず一致しません。integrity 属性に設定するとすべてのブラウザでフォントが読み込みに失敗します。

このエントリは計算対象から除外するか、フォントを自己ホスティングしてください。

🔧 修正案
-# Google Fonts returns dynamic CSS, SRI might be unstable but we check just in case or skip if needed. User instruction implies to check.
-calculate_sri "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap"
+# Google Fonts は User-Agent に依存した動的 CSS を返すため SRI に非対応。integrity 属性は使用しないこと。
+# フォントを自己ホスティングする場合のみ SRI ハッシュを計算すること。
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Google Fonts returns dynamic CSS, SRI might be unstable but we check just in case or skip if needed. User instruction implies to check.
calculate_sri "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap"
# Google Fonts は User-Agent に依存した動的 CSS を返すため SRI に非対応。integrity 属性は使用しないこと。
# フォントを自己ホスティングする場合のみ SRI ハッシュを計算すること。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@calc_sri_fix.sh` around lines 40 - 41, The Google Fonts URL should not be
passed to calculate_sri because the returned CSS (and thus the SRI hash) varies
by User-Agent and will break real browsers; remove or skip the call that passes
"https://fonts.googleapis.com/..." to calculate_sri (the invocation on the line
with calculate_sri) or replace it with a note to self-host fonts and calculate
SRI from the hosted assets instead; update any logic that collects SRI entries
so it ignores Google Fonts URLs (refer to the calculate_sri invocation and the
SRI collection/aggregation code) and ensure the script documents that Google
Fonts are excluded or must be self-hosted.

Comment thread CLAUDE.md Outdated

## プロジェクト概要

マルチ言語・マルチAIによる競技プログラミング学習リポジトリ。各問題に対して**2×3×3マトリックス**(2 AIプロバイダー × 3言語 × 3ドキュメント階層 = 18ファイル)で成果物を生成する。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

"2×3×3 = 18ファイル" のマトリックス計算と実際のディレクトリ例が一致しない可能性があります

Line 7 では「2 AIプロバイダー × 3言語 × 3ドキュメント階層 = 18ファイル」と定義していますが、Line 44 の AIProvider 例には Claude Sonnet 4.5/Claude Code Sonnet 4.6 extended/gpt 5.1 thinking customized/ の3つが挙げられています。プロバイダーを Anthropic / OpenAI の2社と解釈するなら整合しますが、各プロバイダーが複数のモデルディレクトリを持つ場合、問題あたりのファイル数は18を超えます。マトリックスの定義を「2社 × N モデル × 3言語 × 3階層」のように実態に合わせて修正するか、ディレクトリ例との関係を明示することを推奨します。

Also applies to: 44-44

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 7, The README's fixed "2×3×3マトリックス(2 AIプロバイダー × 3言語 ×
3ドキュメント階層 = 18ファイル)" assertion is inconsistent with the AI provider examples
(e.g., "Claude Sonnet 4.5/", "Claude Code Sonnet 4.6 extended/", "gpt 5.1
thinking customized/") which show multiple models per provider; update the
matrix text to a variable form such as "2社 × Nモデル × 3言語 × 3ドキュメント階層" or
alternatively add a clarifying note that the examples list multiple model
directories per provider and that total files per problem may exceed 18, and
edit the sentence containing "2×3×3マトリックス" and the AIProvider example section
accordingly to keep them consistent.

Comment thread CLAUDE.md Outdated

- **Domain**: `Algorithm/`, `DataStructures/`, `Mathematics/`, `SQL/`, `Shell/`, `Concurrency/`
- **Platform**: `leetcode/`, `hackerrank/`, `atcoder/`, `codeforces/`
- **AIProvider**: `Claude Sonnet 4.5/`, `Claude Code Sonnet 4.6 extended/`, `gpt 5.1 thinking customized/` など

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

OpenAI GPT-5.1 model 2025 2026

💡 Result:

  • GPT‑5 (API) released: August 7, 2025 (“Introducing GPT‑5 for developers”). [1]
  • GPT‑5.1 (API) released: November 13, 2025 (“Introducing GPT‑5.1 for developers”). [2]
  • What GPT‑5.1 is (per OpenAI docs, current as of Feb 2026):
    • Flagship model for coding + agentic tasks, with configurable reasoning.effort: none (default), low, medium, high. [3]
    • Context window: 400,000 tokens; max output: 128,000 tokens. [3]
    • Model knowledge cutoff: Sep 30, 2024. [3]
    • API pricing: $1.25 / 1M input tokens and $10 / 1M output tokens (cached input $0.125 / 1M). [3]
    • Snapshot/alias shown in docs: gpt-5.1-2025-11-13 (and gpt-5.1). [3]
  • Notable GPT‑5.1 developer features announced by OpenAI (Nov 2025): adaptive reasoning + “no reasoning” mode, 24‑hour prompt caching, and new tools like apply_patch and shell. [2]

Sources: OpenAI GPT‑5 announcement (Aug 2025) [1], OpenAI GPT‑5.1 announcement (Nov 2025) [2], OpenAI model documentation for gpt-5.1 [3].


🌐 Web query:

OpenAI current models February 2026

💡 Result:

ChatGPT (as of Feb 19, 2026)

  • GPT‑5.2 Auto (default), with picker options:
    • GPT‑5.2 Instant
    • GPT‑5.2 Thinking
    • GPT‑5.2 Pro (noted limitations for some tools) [1]
  • Retired from ChatGPT on Feb 13, 2026: GPT‑4o, GPT‑4.1, GPT‑4.1 mini, OpenAI o4‑mini, GPT‑5 (Instant & Thinking) (API access unchanged) [2]

OpenAI API (current model families you can use)

To see the exact up-to-the-minute set your account has access to, call GET /v1/models [3].

Common “current”/documented models in Feb 2026 include:

GPT‑5.2 family

  • gpt-5.2, gpt-5.2-chat-latest, gpt-5.2-pro
  • plus smaller variants like gpt-5-mini, gpt-5-nano, and a coding-focused gpt-5.2-codex [4]

o‑series reasoning models

  • o1, o1-pro, o1-mini
  • o3, o3-pro, o3-mini, o3-deep-research
  • o4-mini, o4-mini-deep-research [5]

Modality / tool-specific models (examples shown in current pricing/docs)

  • Realtime: gpt-4o-realtime-preview, gpt-4o-mini-realtime-preview
  • Audio: gpt-audio, gpt-audio-mini, gpt-4o-audio-preview, gpt-4o-mini-audio-preview
  • Search: gpt-5-search-api, gpt-4o-search-preview, gpt-4o-mini-search-preview
  • Images: gpt-image-1.5, gpt-image-1, gpt-image-1-mini, chatgpt-image-latest
  • Agent/tooling: computer-use-preview [5]

Notable API deprecations around Feb 2026

  • chatgpt-4o-latest snapshot scheduled for removal on Feb 17, 2026 (per deprecations page) [6]

Sources: [1] [2] [3] [4] [5] [6]


gpt 5.1 thinking customized は有効な OpenAI モデル識別子ではありません

OpenAI の公式ドキュメントでは、モデル識別子として gpt-5.1gpt-5.2o1o3o4-mini などが定義されています。「gpt 5.1 thinking customized」というサフィックスは、OpenAI の標準的なモデル命名規則に含まれていません。実装時にディレクトリ名やモデル参照が混乱を招く可能性があるため、公式の識別子(例:gpt-5.1/gpt-5.2/o3/ など)に修正してください。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 44, Replace the non-standard model identifier "gpt 5.1
thinking customized/" in the AIProvider list with a valid OpenAI model
identifier (e.g., "gpt-5.1/" or another official name like "gpt-5.2/" or "o3/");
update the CLAUDE.md AIProvider entry so it uses the official model naming
format (find the line containing "AIProvider" and the string "gpt 5.1 thinking
customized/" and swap it for the correct identifier).

Comment on lines +27 to +32
<link
href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap"
rel="stylesheet"
integrity="sha384-74F33m7hvD7UOe4E68gapXfr7Z1VLQX/s7NfYcUxVWu+mipY3tL99ai9ripcWrpf"
crossorigin="anonymous"
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Google Fonts への SRI 適用はフォント読み込みを破壊します

Google Fonts API は「リクエストを送った特定のユーザーエージェントに合わせて生成されたスタイルシート」を返すため、SRI を使用できません。 実際に SHA256 を計算したハッシュと Chrome が受け取ったリソースのハッシュは異なり、Google Fonts はブラウザに最適化された異なる CSS を返します。 つまり、このハッシュは Chrome/Firefox/Safari など異なるブラウザ間でほぼ確実に不一致となり、フォントがすべてのユーザーで読み込まれなくなります

🛠️ 修正案: integrity 属性を削除する
         <link
             href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap"
             rel="stylesheet"
-            integrity="sha384-74F33m7hvD7UOe4E68gapXfr7Z1VLQX/s7NfYcUxVWu+mipY3tL99ai9ripcWrpf"
-            crossorigin="anonymous"
         />

根本的な解決策はフォントをセルフホストすることです。その場合は静的ファイルに SRI ハッシュを付与できます。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html around lines 27 - 32, The Google Fonts <link> tag
currently includes an integrity attribute which breaks font loading across
browsers; edit the HTML (the <link ... href="https://fonts.googleapis.com/..."
rel="stylesheet" ... /> element) and remove the integrity attribute (and remove
the crossorigin attribute if present) so the stylesheet is loaded without SRI;
if you need SRI, self-host the font files and apply SRI to those local assets
instead.

Comment on lines +1295 to +1334
<button
type="button"
onClick={handlePlay}
disabled={isPlaying}
className="px-5 py-2.5 rounded-xl font-semibold text-white text-sm transition disabled:opacity-40 bg-[#e53170] hover:bg-[#c72a5f] hover:-translate-y-0.5"
>
▶ Play
</button>
<button
type="button"
onClick={() => {
setActiveStep((s) => Math.max(1, s - 1));
setIsPlaying(false);
}}
disabled={activeStep === 1}
className="px-5 py-2.5 rounded-xl font-semibold text-sm border border-white/10 text-[#a7a9be] hover:bg-white/5 transition disabled:opacity-30"
>
← Prev
</button>
<button
type="button"
onClick={() => {
setActiveStep((s) => Math.min(stepsData.length, s + 1));
setIsPlaying(false);
}}
disabled={activeStep === stepsData.length}
className="px-5 py-2.5 rounded-xl font-semibold text-sm border border-white/10 text-[#a7a9be] hover:bg-white/5 transition disabled:opacity-30"
>
Next →
</button>
<button
type="button"
onClick={() => {
setActiveStep(1);
setIsPlaying(false);
}}
className="px-5 py-2.5 rounded-xl font-semibold text-sm border border-white/10 text-[#a7a9be] hover:bg-white/5 transition"
>
↺ Reset
</button>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

ナビゲーションボタンに aria-label がなく、スクリーンリーダーの読み上げが不明瞭になる可能性があります

などのユニコード記号はスクリーンリーダーによって読み上げ方が異なります(例:「right-pointing small triangle Play」など)。aria-label を追加することで確実に意図した名前が伝わります。

♿️ 修正案: aria-label を追加
                             <button
                                 type="button"
                                 onClick={handlePlay}
                                 disabled={isPlaying}
+                                aria-label="Play"
                                 className="px-5 py-2.5 rounded-xl font-semibold text-white text-sm transition disabled:opacity-40 bg-[`#e53170`] hover:bg-[`#c72a5f`] hover:-translate-y-0.5"
                             >
                                 ▶ Play
                             </button>
                             <button
                                 type="button"
                                 onClick={() => { setActiveStep((s) => Math.max(1, s - 1)); setIsPlaying(false); }}
                                 disabled={activeStep === 1}
+                                aria-label="前のステップへ"
                                 className="..."
                             >
                                 ← Prev
                             </button>
                             <button
                                 type="button"
                                 onClick={() => { setActiveStep((s) => Math.min(stepsData.length, s + 1)); setIsPlaying(false); }}
                                 disabled={activeStep === stepsData.length}
+                                aria-label="次のステップへ"
                                 className="..."
                             >
                                 Next →
                             </button>
                             <button
                                 type="button"
                                 onClick={() => { setActiveStep(1); setIsPlaying(false); }}
+                                aria-label="リセット"
                                 className="..."
                             >
                                 ↺ Reset
                             </button>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@JavaScript/2629`. Function Composition/Claude Code Sonnet 4.6
extended/README_react.html around lines 1295 - 1334, The four navigation buttons
(the Play button using handlePlay and disabled by isPlaying, the Prev and Next
buttons that call setActiveStep and setIsPlaying(false), and the Reset button
that calls setActiveStep(1)/setIsPlaying(false)) lack aria-label attributes; add
clear aria-labels (e.g., "Play", "Previous step", "Next step", "Reset steps" or
similar localized strings) to each button to ensure screen readers announce the
intended action explicitly while keeping existing onClick, disabled, and
className props unchanged.

@myoshi2891 myoshi2891 merged commit ba81102 into main Feb 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant