mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
An audit of windows/ found four blockers in what 0.1.0 shipped. Two of them meant the Claude Code integration could not work at all on anyone else's machine. B1 — Allow and Deny were sent in a shape Claude Code does not read. The documented format for PermissionRequest is hookSpecificOutput.decision.behavior (https://code.claude.com/docs/en/hooks); we sent {"permissionDecision":"allow"} and the relay echoed it through. The app now answers a bare `allow` or `deny` and coucou-hook builds the JSON, so the wire format Claude Code expects lives in one place with tests around it. Anything unrecognised prints nothing at all rather than guessing. B2 — the relay was never installed. `resources` was a glob, so NSIS mirrored the source path into _up_\target\release\ and none of the three paths ensure_hook_exe() searched covered it. It only looked healthy here because a leftover copy from `tauri dev` was sitting in bin/; deleting it and relaunching the installed build left bin/ empty. Map form now, plus the old location as a fallback candidate, the failure is logged instead of going to a stderr nobody reads, and "Install hooks…" is disabled while the relay is missing rather than writing hook commands that point at nothing. B3 — read_settings() returned {} on every error, including a lock, a permission problem or JSON it could not parse. Merging on top of that empty object and writing produced a settings.json containing nothing but Coucou's hooks. Now only a missing file starts from nothing; a UTF-8 BOM is stripped (PowerShell writes one); everything else is reported and nothing is written. The write also refuses if the file changed since the diff the user approved, goes through a temp file and a rename, keeps key order, and stamps backups to the second. B4 — a permission request could freeze Claude Code for nearly two minutes with nobody able to see it. The relay now waits for the island to confirm the card is on screen before it starts the long wait: paused, unresponsive, or already holding another request, and Claude Code gets the question back at once. Measured: app closed 14 ms, paused 19 ms, a second concurrent request 69 ms, and the first request stays answerable throughout. Also in this release: - I1/I3 — the relay retries only on ERROR_PIPE_BUSY and exits immediately when the pipe is absent; every blocking call runs under a deadline; tool_response and transcript_path are dropped and long strings capped, so a single Write no longer ships a whole file down the pipe. - I4 — "Always" is gone. It answered a plain allow and remembered nothing, which is not what the button says. It comes back in 0.1.2 with the rule list. - I5 — the approval card shows what is being authorised: the command, the file path, the URL. Approving "Write" told you nothing. - I6 — the frame loop stops whenever the island is hidden. engine.busy is permanently true for any looping animation (breathing, sleeping, ratelimit sweat), so a hidden island burned frames in the states it spends most of its life in. The AudioContext is suspended when nothing is playing. Measured 0.000 s of CPU over 180 s hidden. - I7 — a display being added, removed, rearranged or rescaled is noticed and the island is placed again. - I8 — open_in_vscode no longer goes through `cmd /C`, where `&`, `^` and `%` in a project path are syntax. PATH is walked directly. - I9 — the inbox ages from when a file was copied. CopyFileEx carries the source's timestamps across, so anything last edited over a week ago was swept the moment it landed. - I10 — the pipe name carries the user's SID, and the relay checks the server process really belongs to us before sending anything. - I2 (partial) — uninstalling removes %LOCALAPPDATA%\Coucou\bin, inbox and log. settings.json is deliberately left alone: it is the user's, it may hold other tools' hooks, and rewriting it from an uninstaller with no diff and no consent is what the rest of this app goes out of its way not to do. - Pause now reaches Rust, so the pollers stop calling out instead of only the island stopping showing things; a poller also skips an integration the user switched off. UserPromptSubmit reads `prompt`, not `message`, so that step is no longer always blank. The production CSP drops the dev server. Vite's envPrefix is TAURI_ENV_. .env is ignored. The n8n URL never reaches the log — a self-hosted base can carry credentials. - The release workflow checks package.json and Cargo.toml against the tag too, and moves the windows-latest tag to the commit it published. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>