Skip to content

fix(dncl): show the console after reloading in the Japanese mode (#2628) - #2633

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

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

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

概要

日本語モードのまま、コードタブでブラウザを読み込み直すと、コンソールが消えてステージが出る不具合(B31)を直す。

原因

コンソールを既定で出す effect(ruby-tab.jsx)が「日本語モード かつ 日本語タブが開いている」ときだけ動いていた。
Redux の smalrubyConsole は保存されないので、コードタブで読み込み直すと、日本語モード(smalruby:dnclMode)のままでもコンソールが出なかった。

変更

  • src/lib/smalruby-console.js に純粋関数 shouldShowSmalrubyConsoleByDefault({ dnclMode, dnclModeLocked, activeTabIndex }) を足した。
    日本語モードのあいだは、ルビータブ以外のどのタブでもコンソールを既定にする(日本語モードを許さないレッスンでは出さない)。
  • ruby-tab.jsx の effect はこの関数を使う。
  • 人が >_ で隠したこと(hiddenByUser)は保存しない。読み込み直したら、日本語モードならまた出す(Issue の AI のおすすめどおり)。
  • docs/extension-smalruby-console/README.md に挙動を書いた。

テスト

  • test/unit/lib/smalruby-console.test.js に判定のテストを足した(RED を確認してから実装)。
  • bin/lint-changed: prettier は通過。eslint は @smalruby/ja-notation の解決だけ失敗(軽量 worktree の node_modules にリンクが無いため。今回の変更と無関係)。

Closes #2628

🤖 Generated with Claude Code

The console was shown only when the Japanese tab was active, so a reload in the Code tab
of the Japanese mode showed the stage. Show it in every tab but the Ruby tab while the
program is written in Japanese (not in a lesson that does not allow it).

Closes #2628

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

A lesson that does not allow Japanese could start in the Code tab of the
Japanese mode, where the console now shows after a reload, and keep the
console in place of the stage of the lesson.

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

Copy link
Copy Markdown
Author

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

Must

  • [M1] packages/scratch-gui/src/containers/ruby-tab.jsx:1630 日本語モードのコードタブで読み込み直すとコンソールが出るようになったが、そのあと日本語を許さないレッスンを始めると showsConsoleByDefault が false になるだけで、出ているコンソールは消えない。レッスンのあいだ、コンソールがステージを隠したままになる(docs の「日本語モードを許さないレッスンでは出さない」とも合わない) — 修正済み(d73e876bca)。dnclModeLocked が true になったとき、日本語モードならステージに戻す effect を足し、docs にも書いた

FYI

  • [FYI1] packages/scratch-gui/src/containers/ruby-tab.jsx:1587 日本語モードのコードタブでコンソールが出ているときに、表示の言語を日本語以外へ変えると、dnclMode は false になるがコンソールは出たまま。日本語タブ → コードタブの道でも前から同じで、この PR で生まれたものではない — 見送り: 振る舞いが変わる(言語の切りかえでコンソールを閉じるかは別に決める)。前からある挙動で、場面も限られる
  • [FYI2] packages/scratch-gui/test/unit/lib/smalruby-console.test.js 判定の純粋関数はテストしたが、ruby-tab.jsx の effect(読み込み直しで出す・レッスンで隠す)そのものはテストが無い。コンポーネントのテストは重いので、純粋関数にまとめた判定のテストで足りると判断した — 見送り: 情報共有のみ(確かめるのは EPIC の確認のときのプレビューでよい)

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

@github-actions

Copy link
Copy Markdown

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

@smalruby3-editor-bot
smalruby3-editor-bot Bot merged commit f12f16b into topic/japanese-mode-1731 Nov 29, 2026
11 checks passed
@smalruby3-editor-bot
smalruby3-editor-bot Bot deleted the topic/autopilot-2628 branch November 29, 2026 00:57

This branch was previously deployed

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