Skip to content

chore: mainの内容をfor-businessに取り込む(Claude通知機能・TinyGo関連は除外)#77

Merged
rin2yh merged 24 commits into
for-businessfrom
claude/merge-main-for-business
Jul 6, 2026
Merged

chore: mainの内容をfor-businessに取り込む(Claude通知機能・TinyGo関連は除外)#77
rin2yh merged 24 commits into
for-businessfrom
claude/merge-main-for-business

Conversation

@rin2yh

@rin2yh rin2yh commented Jul 6, 2026

Copy link
Copy Markdown
Owner

概要

main ブランチの最新の変更を for-business に取り込みます。ただし Claude の macOS 通知機能と TinyGo 関連の変更は for-business では不要なため除外しています。

取り込む変更

除外した変更

Claude 通知機能

  • home/claude/hooks/notify.sh / notify.applescript(新規追加分)
  • home/claude/settings.jsonhooks(Notification / Stop)
  • home/home.nixclaudeCodeNotifier アクティベーション、.claude/hooks symlink、専用の lib 引数

TinyGo 関連

  • home/nvim/lua/lsp/gopls.lua(tinygo.vim 連携・mise shim・自動 :TinygoTarget
  • home/nvim/lua/lsp/init.lua(tinygo.nvim 関連の入れ替え)
  • home/nvim/nvim-pack-lock.json(tinygo.vim 追加等)

→ nvim 3ファイルは for-business の現状のまま据え置き(差分なし)。

補足

  • 最終差分は README / flake.lock / settings.json の3ファイルのみで、通知・TinyGo 関連は一切含まれていないことを確認済み。
  • nixfmt --check と darwin ビルドの CI で検証されます。

🤖 Generated with Claude Code

https://claude.ai/code/session_01KCpaDhdxg4hSRB3PWFnXXV

rin2yh and others added 24 commits July 1, 2026 23:08
…ooks

Add a Claude Code hook that surfaces assistant responses in Notification
Center with the Claude for Desktop icon. Home-manager activation builds a
minimal AppleScript .app (icon swapped from Claude.app, ad-hoc signed) so
notifications appear from an app the notification system recognizes; a
CC_INVOCATION sentinel guards against macOS spuriously re-launching the
sender bundle with empty env.
Reading CC_INVOCATION via `system attribute` was flipping AppleScript into
MacRoman text mode, mojibake-ing UTF-8 bodies read via later `do shell
script` calls. Route the sentinel through `do shell script` too so the whole
applet stays in one encoding. Log each hook fire to ~/.cache/claude-notify.log
and drop the file when it crosses 1 MiB.
head -c 200 could split a multi-byte char, leaving invalid bytes that
made AppleScript's do shell script fall back to MacRoman and mangle the
entire notification body. Pipe through iconv -c to drop the incomplete
tail; tolerate its non-zero exit under set -e.
Bumps [nix-darwin](https://github.com/nix-darwin/nix-darwin) from `56c666e` to `a1fa429`.
- [Commits](nix-darwin/nix-darwin@56c666e...a1fa429)

---
updated-dependencies:
- dependency-name: nix-darwin
  dependency-version: a1fa429e945becaf60468600daf649be4ba0350c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [homebrew-cask](https://github.com/homebrew/homebrew-cask) from `2a6d45e` to `5033334`.
- [Release notes](https://github.com/homebrew/homebrew-cask/releases)
- [Commits](Homebrew/homebrew-cask@2a6d45e...5033334)

---
updated-dependencies:
- dependency-name: homebrew-cask
  dependency-version: 5033334b5f70e65638d4a41c012181965da549c8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [home-manager](https://github.com/nix-community/home-manager) from `4c5c1e8` to `a4d410d`.
- [Commits](nix-community/home-manager@4c5c1e8...a4d410d)

---
updated-dependencies:
- dependency-name: home-manager
  dependency-version: a4d410db95a6416d1008049330bd86b85b5db45a
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [nix-homebrew](https://github.com/zhaofengli/nix-homebrew) from `aeb2069` to `de7953a`.
- [Commits](zhaofengli/nix-homebrew@aeb2069...de7953a)

---
updated-dependencies:
- dependency-name: nix-homebrew
  dependency-version: de7953a08ed4bb9245be043e468561c17b89130d
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [homebrew-core](https://github.com/homebrew/homebrew-core) from `458fc34` to `b420e2d`.
- [Commits](Homebrew/homebrew-core@458fc34...b420e2d)

---
updated-dependencies:
- dependency-name: homebrew-core
  dependency-version: b420e2d9ad6c2c1c9b3bb5e2f859e4608bc0cb82
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Wrap gopls cmd with `env PATH=<direct-go-bin>:...` so gopls internal
`go env` sees the TinyGo overlay GOROOT — the mise `go` shim silently
overrides GOROOT env, which was masking `machine` package resolution.

Also add `go.mod` to root_markers so tinygobook (no .git) is picked up
as workspace root.

For target switching, swap pcolladosoto/tinygo.nvim (monkey-patched to
stop attached gopls) with sago35 さんの tinygo.vim (full
GOROOT/GOOS/GOARCH/GOFLAGS support, actual client:stop on switch).
Provide `:Tinygo <target>` wrapper that re-fires FileType after
TinygoTarget so gopls re-attaches, and auto-detect `.tinygo.json` on
FileType go to invoke it.
hooks block is reformatted by Claude Code on save (multi-line vs
single-line) but content is unchanged.
sago35/tinygo.vim's `:TinygoTarget` already invokes
  vim.lsp.enable('gopls', false) -> sleep 100m -> vim.lsp.enable('gopls', true)
on native LSP. From Neovim 0.11.2 onward, enable(false) calls client:stop()
and enable(true) fires doautoall('nvim.lsp.enable FileType'), so gopls
restarts and re-attaches to open buffers on its own — the extra FileType
re-fire in the `:Tinygo` wrapper is redundant.

Verified headless on the tinygobook (wioterminal target) with Neovim 0.12.3:
gopls attaches with the TinyGo overlay GOROOT + GOOS/GOARCH/GOFLAGS, and
`machine` resolves without the wrapper.

Claude-Session: https://claude.ai/code/session_01MpL4ZtCkUDDxdAGqEHUMUP
Follow-up to dropping the :Tinygo wrapper. The TinyGo autocmd is not gopls
configuration — home/nvim/lua/lsp/ is a registry that lua/lsp/init.lua feeds
to vim.lsp.config, so TinyGo tooling being there muddled the boundary.

- Move vim.pack.add + FileType autocmd + apply cache to home/nvim/plugin/tinygo.lua
  (mirrors home/nvim/plugin/oplog.lua)
- Use vim.fs.root(bufnr, marker) instead of vim.fs.dirname + vim.fs.find pair
  (matches home/nvim/lua/lsp/rust_ls.lua idiom, correctly handles unnamed buffers)
- Read .tinygo.json with vim.fn.readfile instead of manual io.open dance
- Drop tinygo.nvim from nvim-pack-lock.json (removed after prior commit)
- Fix cosmetic missing space in M.filetypes

Verified headless on tinygobook (wioterminal): gopls attaches with
GOROOT/GOOS/GOARCH/GOFLAGS overlay, `machine` resolves.

Claude-Session: https://claude.ai/code/session_01MpL4ZtCkUDDxdAGqEHUMUP
`tinygo.lua` alone doesn't convey what the file does; multiple things could
be TinyGo-related. Rename to a verb-object form that names the
responsibility: applying the target from `.tinygo.json` to the running
gopls.

Claude-Session: https://claude.ai/code/session_01MpL4ZtCkUDDxdAGqEHUMUP
Splitting the ~20 line TinyGo autocmd into plugin/apply-tinygo.lua added
navigation cost without payoff — the autocmd exists to reconfigure gopls,
and moving it away from the gopls spec made the relationship harder to see.
Merge it back next to the M.cmd / M.settings it drives.

Claude-Session: https://claude.ai/code/session_01MpL4ZtCkUDDxdAGqEHUMUP
pcall forwards args to its target, so pcall(vim.json.decode, str) is enough —
no need for an inner closure. Fold config_path (used once) into the readfile
call.

Claude-Session: https://claude.ai/code/session_01MpL4ZtCkUDDxdAGqEHUMUP
@rin2yh rin2yh force-pushed the claude/merge-main-for-business branch from d26e80a to 79942a2 Compare July 6, 2026 12:36
@rin2yh rin2yh changed the title chore: mainの内容をfor-businessに取り込む(Claude通知機能は除外) chore: mainの内容をfor-businessに取り込む(Claude通知機能・TinyGo関連は除外) Jul 6, 2026
@rin2yh rin2yh marked this pull request as ready for review July 6, 2026 12:36
@rin2yh rin2yh merged commit 7fc26bf into for-business Jul 6, 2026
2 checks passed
@rin2yh rin2yh deleted the claude/merge-main-for-business branch July 6, 2026 12:41
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