Skip to content

docs(readme): add a figure to the safety section showing typed text reaching only the input field - #161

Merged
miyaoka merged 5 commits into
mainfrom
docs/safety-figure
Nov 15, 2026
Merged

miyaoka merged 5 commits into
mainfrom
docs/safety-figure

Conversation

@miyaoka

@miyaoka miyaoka commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

目的

README の安全性の節に図を入れ、打った文字がどこまで届くかを図で掴める状態にする。README の各節は図の下に説明を置く構成にしたが、この節だけが文章の箇条書きのまま残っていた。

出所: 対話での依頼(#160 のスコープ外)。

打った文字は、入力欄にしか届かない。入力欄で打った文字は tugime が変換して入力欄に返す。tugime は macOS の Sandbox の中で動く。インターネットと保存・学習には ✕ が付き、届かない。下の帯は、パスワード欄では tugime が選ばれず変換しないこと

変更内容

  • scripts/make-safety.ts を足し、docs/images/safety.svg を生成した。入力欄と tugime の間だけを矢印で往復させ、インターネットと保存・学習を ✕ で示す。パスワード欄の扱いは下の帯に分けた
  • README の安全性の節の先頭に図を置いた。既存の説明の箇条書きはそのまま図の下に残した
  • アプリの入力欄を描く部品 inputField を scripts/lib/svg.ts に置き、変換の仕組みの図(make-pipeline.ts)と安全性の図の両方から使う。入力欄の色(.field・.dash)は共有の配色に移した。そのため、どの SVG も style に 2 行が加わる。描く中身は変わらない
  • 文字が枠からはみ出さないことを確かめてから描く Glyphs.drawWithin を置き、安全性の図・変換の仕組みの図・入力欄の部品で、確かめる文字はどれもこれで描く
  • docs/development.md の図の作り直しの一覧に make-safety.ts を足し、「図は tugime-cli の出力から描く」を「図はスクリプトで描き、変換の結果を載せる図は tugime-cli の出力から描く」に直した

設計判断

  • 図が答える問いを「打った文字はどこへ行くか」の 1 つにした。節の「導入(配布物の出自を確かめる)」は別の問いで、インストールの節が手順を説明しているので図に入れない
  • 「Sandbox が通信を許していない」は App/tugime.entitlements(com.apple.security.app-sandbox が有効で、通信の権限が無い)に基づく
  • tugime-cli の出力を使わない図なので、ロゴの図(make-hero.ts)と同じく独立したスクリプトにした
  • 図の値はどれもスクリプトの定数なので、README の alt は説明文の全文と突き合わせる
  • はみ出しの確かめは描く呼び出しと 1 つにした。確かめと描画を別に書くと、文字や位置を片方だけ直したときに古い値を確かめ続ける

合意事項

  • 安全性の節に図を入れる。方向は試作(入力欄と tugime の往復、インターネットと保存・学習に ✕、パスワード欄は下の帯)のとおり

未合意の判断

なし

スコープ外

なし

完了条件

  • bun scripts/make-safety.ts・bun scripts/make-pipeline.ts・bun scripts/make-readme-figures.ts・bun scripts/make-demo.ts・bun scripts/make-hero.ts が終了コード 0 で終わり、その後の git status --short が空である

検証

  • このブランチの先頭(d1762cf)で 5 つのスクリプトを走らせ、どれも終了コード 0 で終わった。その後の git status --short は空だった
  • 共有の配色に移したことで変わった SVG の差分は、style の 2 行の追加(pipeline.svg は自前の定義の削除も)だけだった
  • 安全性の図をライトとダークの両方の配色で Chrome で開き、切れ・はみ出し・重なりが無いことを目で確かめた

確認事項

  • GitHub 上で README を開き、図が本文カラムの幅で読めるか
  • 図のタイトル「打った文字は、入力欄にしか届かない」: 打った文字は tugime にも届くので、図の矢印と食い違うという指摘がある。「打った文字は、入力欄と tugime の間から出ない」に直すかを決めてほしい

🤖 Generated with Claude Code

…eaching only the input field

intent(readme): every README section leads with a figure; the safety section was the only one left as bullet text
decision(safety-figure): answer where typed text goes — between the input field and tugime only, with the internet and storage/learning crossed out; the password-field case sits in its own band
decision(safety-figure): leave the install verification out; it answers a different question and the install section already walks through it
learned(safety-figure): App/tugime.entitlements enables the app sandbox with no network entitlement, which is what the figure's "Sandbox が通信を許していない" rests on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miyaoka miyaoka self-assigned this Nov 15, 2026
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc39df6c-7bb2-447e-ac9e-5ff98e7c4932
Commits

Reviewing files that changed from the base of the PR and between 4b814c2 and d1762cf.

Files ignored due to path filters: 8

  • docs/images/context.svg is excluded by !**/*.svg
  • docs/images/conversion.svg is excluded by !**/*.svg
  • docs/images/demo-compare.svg is excluded by !**/*.svg
  • docs/images/demo.svg is excluded by !**/*.svg
  • docs/images/hero.svg is excluded by !**/*.svg
  • docs/images/intro.svg is excluded by !**/*.svg
  • docs/images/pipeline.svg is excluded by !**/*.svg
  • docs/images/safety.svg is excluded by !**/*.svg
Files selected for processing: 5

  • README.md
  • docs/development.md
  • scripts/lib/svg.ts
  • scripts/make-pipeline.ts
  • scripts/make-safety.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…heck every safety figure label

decision(figures): draw the app input field with one inputField helper and keep its colors in the shared palette; the pipeline and safety figures had copies of both
decision(safety-figure): compare the whole alt text with the README so no part of it goes stale, and check that every label stays inside its box
decision(docs): say that figures are drawn by scripts, and only the figures that show conversion results come from tugime-cli

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

tugime-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

変換の精度(lattice)

集まり before after 問題数
ajimee 49.0% 49.0% 200
mozc-oss 74.5% 74.5% 310
mozc-regression 59.8% 59.8% 82

before だけ正解 0 件 / after だけ正解 0 件

片方だけが正解した問題
問題 正解した側 読み 入力の前の文脈 before after 判定

… the safety figure's arrow labels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miyaoka and others added 2 commits November 15, 2026 16:51
…t and position cannot drift from the drawn ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the bare check private

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miyaoka
miyaoka marked this pull request as ready for review November 15, 2026 07:53
@miyaoka
miyaoka merged commit cfabec3 into main Nov 15, 2026
9 checks passed
@miyaoka
miyaoka deleted the docs/safety-figure branch November 15, 2026 07:57
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