Skip to content

fix(dncl): pick the rules of the problem in a popup from the green band (#2606) - #2637

Merged
smalruby3-editor-bot[bot] merged 3 commits into
topic/japanese-mode-1731from
topic/autopilot-2606
Nov 29, 2026
Merged

smalruby3-editor-bot[bot] merged 3 commits into
topic/japanese-mode-1731from
topic/autopilot-2606

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

概要

EPIC #1731 のリリース確認 R6 の NG の直しです。日本語タブの ⋯ メニューにあった「問題の約束」(見出しとパターン 2 つ)をやめ、エディタの上の緑の帯から開くポップアップにしました。

人間と同意したモックアップ: https://claude.ai/artifact/PsNCFTg52UwyVqBgdEhtrq

変えたこと

  • 緑の帯: 「日本語(共通テスト用プログラム表記)| 問題の約束: 添字は 0 から 変える」。冒頭の文がどちらのパターンにも合わないときは「そのほか」。帯が狭いときは、言語名のほうを「…」で切る
  • 「変える」で components/problem-settings-modal/ のポップアップを開く(自動置換設定と同じ大きさ・作り。共有の Modal。本文に白の背景)
    • 説明の 2 文、パターンのカード(ラジオ。Data = [10, 20, 30] のとき Data[1] が 20 になるか 10 になるかの例つき)、先頭に入る文、「ほかのコメントはそのまま残ります。」、キャンセル / 決定
    • 決定すると、いままでのメニューと同じ処理(dnclWithSettingsPattern)を行う。キャンセルでは何も変えない。「そのほか」では、カードを選ぶまで決定を押せない
  • ⋯ メニューから「問題の約束」の見出しと 2 項目を外した(使わなくなった翻訳キー 3 つと CSS も消した)
  • 翻訳キーは en / ja / ja-Hira の 3 ファイルに 15 個ずつ足した
  • docs: docs/dncl/README.md(メニューの表・「設定(冒頭の説明文)」・主要ファイル・テスト)、docs/dncl/design.md、docs/smalruby-dncl-spec.ja.md、.claude/rules/scratch-gui/e2e-test.md(data-testid の表)

テスト

  • 追加: test/unit/components/problem-settings-modal.test.jsx(はじめに選ばれるカード・先頭に入る文・決定で選んだパターンが渡る・キャンセルで変えない・「そのほか」では決定できない・帯のいまの約束と「変える」)
  • test/unit/lib/dncl/dncl-settings.test.js に dnclSettingsSentences と「ほかのコメントは残る」を足した
  • ruby-toolbar-rules-switch.test.jsx のメニューの並びを直し、古いメニューのテスト ruby-toolbar-settings-pattern.test.jsx は消した
  • integration の dncl-settings-pattern.test.js を、帯 → ポップアップ → 決定の流れに書き直した(CI で確かめる)
  • ローカル: 上の unit 3 ファイルは pass。lint は prettier が pass。eslint は @smalruby/ja-notation の import-x/no-unresolved が 2 件出たが、main checkout の node_modules に topic の新しいパッケージが無いという環境のせいで、もとからある import 行なので CI で確かめる

まだのこと(verify で行う)

  • この軽量の worktree では dev server が ja-notation を解決できないので、スクリーンショット(PC とスマホの幅のポップアップと帯)と docs/dncl/screenshots/0106-more-menu-1280x800.png の撮り直しは、ブランチのプレビューで撮ってから貼る

Closes #2606

🤖 Generated with Claude Code

The rules of the problem (the patterns of settings) leave the more menu of the Japanese tab.
The green band over the editor shows the rules now and a link to change them, which opens
a popup like the auto-correct settings: cards with a small example each, the sentences
written at the top, and Cancel / OK. Decided by the mockup with the maintainer (plan C).

Refs #2606

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smalruby3-editor-bot smalruby3-editor-bot Bot added the 🤖 autopilot autopilot が処理対象にした Issue/PR(daemon が付与) label Nov 29, 2026
@smalruby3-editor-bot

smalruby3-editor-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Author

🤖 autopilot status

field value
Status Review
AI Status —
HITL No
Size middle

Linked issue #2606. Maintained by autopilot (single writer); do not edit.

@github-actions

Copy link
Copy Markdown

🚀 Preview deployed (stg API): https://preview.smalruby.app/topic-autopilot-2606-3be0fc97/

On the class PC (1300x600) and a phone held sideways the popup of the rules
of the problem was taller than the screen and the overlay does not scroll,
so the ok button could not be pressed. Bring the popup up and let its body
scroll. Let the whole height of the band press the change link.

Refs #2606

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smalruby3-editor-bot

Copy link
Copy Markdown
Author

🤖 敵対的レビュー(round 1): 指摘 6 件(Must 1 / Question 1 / FYI 4)

Must

  • [M1] packages/scratch-gui/src/components/problem-settings-modal/problem-settings-modal.css:1 共有のモーダルは上に 100px の余白を取り、外側(overlay)はスクロールしない。ポップアップは「添字が 1 から始まる問題」を選ぶと先頭に入る文が 8 行ほどになり、高さが 600px を超える。授業の PC(1300×600。ブラウザの枠でさらに低い)やスマホの横向き(844×390)では「決定」が画面の外に出て押せない(.claude/rules/scratch-gui/development.md の「確定のボタンが見える」) — 修正済み(6576f32f14)。背の低い画面(高さ 760px 以下)ではポップアップを上に寄せ、本文に max-height と縦スクロールを付けた。docs/dncl/README.md にも書いた

Question

  • [Q1] packages/scratch-gui/src/components/problem-settings-modal/problem-settings-band-item.css:15 帯の「変える」は新しいボタンだが、帯の高さが 1.75rem(28px)なので、タッチの領域が .claude/rules/scratch-gui/mobile-ui.md の 44×44px に届かない(スマホの横向きでも日本語タブは使える) — 人間の判断に委ねる: 帯の高さを上げて 44px にするか(見た目が同意したモックアップから変わる)、いまの高さのままにするか。押せる範囲を文字だけから帯の高さいっぱい+左右の余白に広げるところまでは 6576f32 で直した

FYI

  • [FYI1] docs/dncl/README.md:180 dncl-settings.js の行に、足した dnclSettingsSentences が無かった。dncl-index-setting.js の説明が「設定のパターンのメニューも使う」のままだった — 修正済み(6576f32f14)
  • [FYI2] packages/scratch-gui/src/locales/ja.js:2090 「例示の形」を選んだとき、プログラムにもともと約束の文が無くても「(何も入りません。いまの約束の文は消えます)」と出る。消える文が無いときは後半が少し合わない — 見送り: 人間がモックアップで同意した文言で、表示(振る舞い)が変わるため
  • [FYI3] 軽量の worktree では node_modules に @smalruby/ja-notation が無く、eslint の import-x/no-unresolved 2 件(元からある import 行)と jest の読み込みが落ちる。scratchpad に symlink を置いて --modulePaths で解決させ、problem-settings-modal.test.jsx と dncl-settings.test.js の 27 件が通ることを確かめた。prettier は通る。CI の lint も通っている — 見送り: 情報共有のみ
  • [FYI4] PR 本文のとおり、ポップアップと帯のスクリーンショット(PC とスマホの幅)と docs/dncl/screenshots/0106-more-menu-1280x800.png の撮り直しはまだ。verify でブランチのプレビューから撮る。そのとき 1300×600 と 844×390 で「決定」まで届くことも確かめる — 見送り: 情報共有のみ(verify で行う)

直してほしい指摘は、モニターの「AI に直してもらう」で指示を書くか、Request changes で ID を指定してから 🙋 HITL を外してください(例: Q1はOK, FYI1は修正して)。ふつうのコメントだけでは autopilot は動きません。

@smalruby3-editor-bot
smalruby3-editor-bot Bot marked this pull request as ready for review November 29, 2026 01:26
@smalruby3-editor-bot
smalruby3-editor-bot Bot merged commit 01514ad into topic/japanese-mode-1731 Nov 29, 2026
11 checks passed
@smalruby3-editor-bot
smalruby3-editor-bot Bot deleted the topic/autopilot-2606 branch November 29, 2026 01:37

This branch was previously deployed

1 inactive deployment
stg — 6576f32f Deployed Nov 29, 2026 by smalruby3-editor-bot[bot] via cleanup #669
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 autopilot autopilot が処理対象にした Issue/PR(daemon が付与)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants