Skip to content

Code Link: Ensure the server stops reliably with --once - #678

Merged
iamakulov merged 3 commits into
mainfrom
agent/code-link-once-shutdown
Jul 29, 2026
Merged

Code Link: Ensure the server stops reliably with --once#678
iamakulov merged 3 commits into
mainfrom
agent/code-link-once-shutdown

Conversation

@iamakulov

@iamakulov iamakulov commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

I ran into npx framer-code-link --once hanging after printing

$ npx framer-code-link --once --dir .

  ⚡ Code Link v0.21.0

  Waiting for Plugin connection...
✓ Connected to 💙 Shaders 2026
✓ Synced into . (0 files updated, 29 unchanged)
  Sync complete, exiting...

This usually happens because we forgot to clean up something (timeouts or sockets). But it’s easy to forget to clean things up, so process.exit() should fix it for good.

@iamakulov
iamakulov marked this pull request as ready for review July 28, 2026 23:55
Copilot AI review requested due to automatic review settings July 28, 2026 23:55
@iamakulov
iamakulov requested a review from huntercaron July 28, 2026 23:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves shutdown behavior for the Code Link CLI, specifically aiming to make --once runs terminate reliably by cleaning up pending dependency-version timeouts during shutdown and force-exiting after watcher/server teardown.

Changes:

  • Clear any pending dependency-version request timeout during shutdown.
  • In --once mode, explicitly process.exit(0) after closing the watcher and WebSocket server.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/code-link-cli/src/controller.ts
Comment thread packages/code-link-cli/src/controller.ts

@huntercaron huntercaron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@iamakulov
iamakulov enabled auto-merge July 29, 2026 08:35
@iamakulov
iamakulov added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit 5061eeb Jul 29, 2026
9 checks passed
@iamakulov
iamakulov deleted the agent/code-link-once-shutdown branch July 29, 2026 08:40
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.

3 participants