Repository navigation
Conversation
Client.zig locates fizzy per OS (FIZZY_EXE, the usual install places, Launch Services, App Paths), asks it for its socket (--control-path), starts it with --quiet when nothing listens (macOS: open -g -j) and dials with backoff to a deadline, then upgrades to the remote-view stream and exchanges hellos. Distinct errors: not installed, fizzy too old, add-on too old, timed out, start failed, sandboxed (never a private second fizzy). reconnect runs the same steps after a drop. capi.zig and fizzy_remote.h are the C ABI. Tested against fake_fizzy.zig, an executable on a test socket: found, not found, quiet start, slow start, crash during start, version skew, drop and reconnect. Part of fizzyedit/work#41 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLaaExP2YTZiSnff98PmgV
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLaaExP2YTZiSnff98PmgV
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLaaExP2YTZiSnff98PmgV
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of fizzyedit/work#41 (EMBEDDED_EDITOR_PLAN step 5, fizzyedit/work#32)
What changes
sdk/remote/Client.zigis what a host adapter (Blender, Unreal, ...) calls first. It does five things:FIZZY_EXEwins. Otherwise it checks the usual places per OS:/Applicationsand~/Applicationsplus Launch Services on macOS; Velopack under%LOCALAPPDATA%plus App Paths on Windows;~/.local, an AppImage andPATHon Linux.fizzy --control-path, with--profileorFIZZY_PROFILE, unless the host names the socket.--quiet(macOS:open -g -j, never taking focus) and dials with backoff untiltimeout_ms.GET /remoteand exchanges hellos.Errors are distinct:
NotInstalled,NotRunning,FizzyTooOld,ClientTooOld,TimedOut,StartFailedandSandboxed. A sandboxed host that reaches neither the install nor the socket getsSandboxed. A private second fizzy is never started.capi.zigandfizzy_remote.hare the C ABI: open, reconnect, send/recv whole frames, close.The file is
Client.zig, notclient.zigas the kickoff named it, because the lintfile-aliasrule requires a struct file to be TitleCase.build/app.zignow builds the fake fizzy and hands its path to the remote tests through an options module; this replaces the old generic list entry.Over the soft 800-line limit: about 900 lines outside tests and docs. That counts the fake fizzy (about 120 lines) and a mostly-comment header (about 100 lines).
SDK impact
sdk/src/**, no fingerprint move)Verified
Tests run against
fake_fizzy.zig, an executable listening on a test socket. They cover found without a second start, quiet start, not installed / not running / sandboxed, slow start, timeout then found later, crash during start (StartFailed), version skew both ways, and drop then reconnect. The C ABI is tested on top of the same fake.macOS: not tried by hand. The module cross-compiles for aarch64-macos, and
candidatesis tested as strings.mdfindandopen -g -jare untested.Windows: not tried by hand. The module cross-compiles for x86_64-windows.
reg queryoutput parsing is tested; the registry lookup itself is not.Linux: all of these pass:
scripts/check-fmt.shzb build test(35/35 remote tests)test-integrationcheck-webtest-sdk-versionlintcheck-tests-reachedThe remote tests also pass natively with
-lc.Web: not applicable.
check-webpasses.Follow-ups
GET /remote(plan steps 3 and 4) is not here. The tests use the fake.Generated by Claude Code