Skip to content

feat(dncl): treat the say and ask blocks as unsupported in the japanese tab (#2623) - #2631

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

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

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

概要

日本語タブで 表示する / 【外部からの入力】 が、ステージのブロック(「言う」「聞いて待つ」「答え」)とコンソールのブロックの 2 つの意味を持っていたのをやめ、コンソールだけの意味にする。人間が作ったブロックのプログラムは変えない。

変えたこと

  • ja-notation-table.js: SMALRUBY_RUBY_TO_JA から say / puts / print / p(受け手なし)と ask("") + answer の対応を外した。console.puts と console.gets だけが 表示する と入力になる。
  • dncl-validator.js / ruby-tab.jsx: これらは「日本語にできない命令」として扱う。日本語タブを開くとルビータブに移り、その行に直し方を出す。
    • 「言う」は日本語タブでは使えないブロックです。コンソールの「(…) を表示する」を使ってください。
    • 「聞いて待つ」と「答え」は日本語タブでは使えないブロックです。コンソールの「入力する」を使ってください。
  • dncl-keywords.js: say / puts / print / ask / answer / ask_and_wait を素通しの一覧から外した。
  • dncl-block-filter.js: 日本語モードのパレットから 見た目 と 調べる のカテゴリを外した(人間の答え q2=b)。
  • genai-dncl-prompt.js: 生成AI に相談の質問文で、見た目・調べるの命令は使えず、表示は 表示する、入力は 【外部からの入力】 と書くように伝える。
  • 翻訳キー gui.rubyTab.dnclSayBlockError / gui.rubyTab.dnclAskBlockError を en / ja / ja-Hira に足した。
  • docs(docs/dncl/README.md・design.md・docs/smalruby-dncl-spec.ja.md)の対応表と「不可逆な変換とその理由」を直した。
  • テストと ja-notation の golden を新しい対応に合わせた。

人間の答え(モニター)

  • q1: 「聞いて待つ」「答え」も誤りにする(a)
  • q2: パレットからも見た目を外す(b。q1 に合わせて調べるも外す)

テスト

  • 変えたテストファイル・golden のテスト(corpus.test.js / read-ruby-write-ja.test.js)・genai-dncl-prompt.test.js・dncl-green-flag.test.js などを --runInBand でファイルを指定して流し、すべて通った(2,557 件)。
  • bin/lint-changed: prettier は通る。eslint は ruby-tab.jsx 3 行目(今回変えていない)の @smalruby/ja-notation の解決だけが軽量の作業場で落ちる。CI で確かめる。

Closes #2623

🤖 Generated with Claude Code

…se tab

表示する and 【外部からの入力】 now mean only the console. The say block (say/puts/print/p)
and ask and wait with answer of the stage are told as unsupported commands with a message
that names the console block, and the blocks are not changed. The Japanese mode palette
hides the looks and sensing categories.

Closes #2623

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 #2623. Maintained by autopilot (single writer); do not edit.

@github-actions

Copy link
Copy Markdown

🚀 Preview deployed (stg API): https://preview.smalruby.app/topic-autopilot-2623-fe69cbff/

The say and ask blocks are no longer passed through in the Japanese tab (#2623).

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

Copy link
Copy Markdown
Author

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

FYI

  • [FYI1] packages/scratch-gui/src/lib/dncl/dncl-validator.js:305 findUnsupportedCommands の JSDoc が、素通しする Ruby の名前の例に puts / say を挙げたままだった(この PR で素通しの一覧から外した)。 — 修正済み(6b3b3e6d4f)
  • [FYI2] docs/dncl/screenshots/0105-code-tab-notice-1280x800.png 日本語モードのコードタブのスクリーンショットに、パレットの「見た目」「調べる」が写ったまま。この PR でパレットから外したので、撮り直しが要る(DoD)。 — 見送り: 軽量の作業場では @smalruby/ja-notation を解決できず dev server が立たないため、ここでは撮り直せない。verify(DoD)で撮り直す
  • [FYI3] 確かめたこと: @x = answer / console.puts(answer) / @x = answer.to_i / if answer == "a" も「聞いて待つ」「答え」の誤りになる。日本語タブの x = answer は変数 @answer(コマンドではない小文字の名前と同じ扱い)。ja-notation 本体は input.isQuestion が無いときを扱えている(read-ruby.js:844)。日本語にできる組み込み関数に調べるのブロックを使うものは無いので、調べるのカテゴリを隠しても失うものは無い。翻訳キーは en / ja / ja-Hira の 3 ファイルにそろっている。 — 見送り: 情報共有のみ

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

say is now a block the Japanese tab cannot write (#2623), so the valid
program used console.puts instead, and the when_flag_clicked test keeps
checking only when_flag_clicked.

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

Copy link
Copy Markdown
Author

🤖 Must の自動の直し: 指摘 1 件: 対応 1 件 / 返信 0 件 / 対応不要 0 件

  • review round 1 の Must は 0 件(FYI1 は修正済み、FYI2・FYI3 は review の扱いのまま)。
  • CI: integration-test-gui (2) の dncl-mode-validation.test.js › valid code allows DNCL switch が落ちていた — 修正済み(213b83e6b5)
    • 原因: 「正しいプログラム」に say("hello", 1) を使っていた。この PR で「言う」は日本語タブで書けないブロックにしたので、日本語タブへ移れずに Monaco language did not become "dncl" で時間切れになった。
    • 直し: console.puts("hello") に置きかえた。同じファイルの when_flag_clicked blocks DNCL switch も、when_flag_clicked だけを確かめるよう同じく置きかえた。
  • まだ対応していない Request changes とモニターの指示は無い。

…spec

The Japanese mode palette no longer has the looks and sensing categories (#2623).

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

Copy link
Copy Markdown
Author

🤖 敵対的レビュー(round 2): 指摘 2 件(Must 0 / Question 0 / FYI 2)

FYI

  • [FYI4] docs/smalruby-dncl-spec.ja.md:712 仕様の「ブロック」の行が、コードタブのパレットに「〜と〜秒言う」など読むだけのブロックを出すと書いたままだった(この PR で見た目・調べるのカテゴリを外した)。 — 修正済み(176459c6b6)
  • [FYI5] packages/scratch-gui/test/integration/dncl-mode-validation.test.js:150 確かめたこと: round 1 のあとの直し(213b83e6b5)は、正しいプログラムの例を console.puts に置きかえただけで、確かめる中身は変わらない。CI の integration-test-gui (2) は通った。dnclErrorText の分岐の順(日本語の名前 → … → 言う・聞いて待つ → ほかの命令)は、stageBlockOf の名前がどれも Ruby の名前なので先の分岐とぶつからない。前の CI(6b3b3e6d4f)で unit-test-gui は通っている。 — 見送り: 情報共有のみ

直してほしい指摘は、モニターの「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:13
@smalruby3-editor-bot
smalruby3-editor-bot Bot merged commit 47258f7 into topic/japanese-mode-1731 Nov 29, 2026
11 checks passed
@smalruby3-editor-bot
smalruby3-editor-bot Bot deleted the topic/autopilot-2623 branch November 29, 2026 01:30

This branch was previously deployed

1 inactive deployment
stg — 176459c6 Deployed Nov 29, 2026 by smalruby3-editor-bot[bot] via cleanup #668
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