Skip to content

設定画面から常駐を終了し、自動起動を切り替えられるようにする - #15

Merged
limit7412 merged 3 commits into
masterfrom
claude/project-thread-f8pi5g
Nov 10, 2026
Merged

limit7412 merged 3 commits into
masterfrom
claude/project-thread-f8pi5g

Conversation

@limit7412

@limit7412 limit7412 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Requested by 回路 · project thread

概要

設定画面(タブ「KxFCM」)の「全般」に、自動起動の切り替えと常駐の終了を足す。CLI にも対応するコマンドを足す。

変更

  • 「全般」のタブに「Frame の起動時に自動で起動」(ON/OFF)と「KxFCM を終了」(2 回押し、4 秒で取消)を置く
  • 終了は常駐を終了コード 0 で終える。ユニットは Restart=on-failure なので systemd は起動し直さない。systemctl stop を呼ばないのは、run を直接起動した場合にも同じに終えるため
  • 終了は更新の排他(try_lock)を取れたときだけ行い、排他はプロセスの終了まで持つ。取れなければ「更新が走っているため終了できません」と出す。更新の段階が出ている間はボタン自体も押せない。起動の確かめ中に止めると、起動失敗と取り違えて巻き戻されるため
  • CLI の stop も uninstall と同じく更新の排他を取ってから止める
  • 自動起動はユニットの enable / disable そのもので、設定ファイルには持たない(手で打った systemctl や install と食い違わないように)。状態は default.target.wants のリンクの有無で読み、1 秒ごとの再読込でもプロセスを起こさない
  • 自動更新のタイマーはそのまま。タイマーの更新は常駐が止まっていれば置き換えるだけで起動しない(既存の AutoUpdater の動き)ので、終了や自動起動 OFF の常駐を勝手に起こさない
  • ユニットが入っていない環境では自動起動の切り替えを出さず、その旨を表示する
  • CLI: start(reset-failed してから start)、stop、autostart [on|off]
  • 文言 9 言語、README(日英)、docs/setup.md、docs/status.md、docs/architecture.md を更新

確認

  • crystal spec: 366 件通過(追加: CLI の解釈、systemd の呼び出しと自動起動の判定、終了の 2 回押し、更新中の終了の拒否、排他を取れないときの表示、自動起動の切り替えと失敗表示)
  • scripts/preview_dashboard.cr で 9 言語の「全般」タブを描き、文言が枠に収まることを確認
  • CI と Codex のレビューは通過(Codex の指摘 2 件は cb82c15、d20e2e4 で対応)
  • 実機(Frame)では未確認

🤖 Generated with Claude Code

https://claude.ai/code/session_01WFzzs75VFErN2DJDhfhYWj

- 「全般」のタブに「Frame の起動時に自動で起動」の切り替えと「KxFCM を終了」(2 回押し)を足す
- 終了は終了コード 0 で終える。ユニットは Restart=on-failure なので起動し直されない
- 更新が走っている間は終了を受け付けない(起動の確かめ中に止めると巻き戻されるため)
- 自動起動はユニットの enable/disable そのもので、設定ファイルには持たない。状態は default.target.wants のリンクで読む
- CLI に start、stop、autostart [on|off] を足す
- 文言を 9 言語でそろえ、README(日英)と docs を更新する

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WFzzs75VFErN2DJDhfhYWj
@limit7412 limit7412 self-assigned this Nov 10, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T06:46:19.408515Z d20e2e4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6028bdd2aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.cr Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb82c15886

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dashboard/usecase.cr Resolved
@limit7412
limit7412 merged commit e61234f into master Nov 10, 2026
4 checks passed
@limit7412
limit7412 deleted the claude/project-thread-f8pi5g branch November 10, 2026 06:49
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.

2 participants