Skip to content

Conversation

@huntercaron
Copy link
Collaborator

@huntercaron huntercaron commented Dec 17, 2025

Description

Adds a Code Link Plugin and framer-code-link CLI tool for a 2-way link between code files in Framer and local filesystem.

Stack@2x

Todo

  • Prep Icon and Image
  • Ship backgroundMessage API to stable
  • Add Agents/Claude file with best practices

Testing

  • Verify the initial handshake and setup
    • Open the Plugin in a Project with Code Files
    • Copy the command
    • Paste & run in your terminal
    • Verify a directory is created with the name of your project
    • Verify within the directory/files is a 1:1 with the project code files
  • Verify Code syncing
    • Run the CLI and Plugin
    • Make changes to the files locally
    • Verify the changes are applied in Framer
    • Make changes to the files in Framer
    • Verify the changes are applied Locally
  • Verify conflict resolution (auto)
    • Close the Plugin
    • Make changes to a file in Framer
    • Re-open the Plugin
    • Verify the changes auto-apply to local files
    • Close the Plugin
    • Make changes to a file Locally
    • Re-open the Plugin
    • Verify the changes auto-apply to Framer files
  • Verify conflict resolution (manual)
    • Close the Plugin
    • Make different changes to the same file both in Framer and locally
    • Re-open the Plugin
    • Verify you are prompted to resolve conflicts
    • Click "Keep Framer"
    • Verify the changes from Framer synced to local files
    • Repeat, but select "Keep Local"
    • Verify the local changes synced into Framer
  • Verify running CLI development locally
    • Open the Plugin
    • In terminal go to packages/code-link-cli
    • Run 'yarn dev'
    • Verify a connection is made and files are synced as normal

@huntercaron huntercaron force-pushed the code-link branch 2 times, most recently from 82924c4 to 1d341eb Compare December 18, 2025 13:11
@huntercaron huntercaron marked this pull request as ready for review December 18, 2025 14:05
@github-actions github-actions bot added the stale label Dec 26, 2025
@huntercaron huntercaron removed the stale label Dec 26, 2025
@github-actions github-actions bot added the stale label Jan 3, 2026
@huntercaron huntercaron removed the stale label Jan 3, 2026
@github-actions github-actions bot added the stale label Jan 11, 2026
@huntercaron huntercaron removed the stale label Jan 11, 2026
@framer framer deleted a comment from github-actions bot Jan 14, 2026
@framer framer deleted a comment from github-actions bot Jan 14, 2026
@framer framer deleted a comment from github-actions bot Jan 14, 2026
@github-actions
Copy link

This PR has been automatically marked as stale because it has not had any activity in the last 7 days. It will be closed if no further activity occurs in the next 7 days.

Copy link
Member

@triozer triozer left a comment

Choose a reason for hiding this comment

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

First review pass, looks really good!

try {
const shouldDelete = await userActions.requestDeleteDecision(syncState.socket, {
fileName: effect.fileName,
requireConfirmation: !config.dangerouslyAutoDelete,
Copy link
Member

Choose a reason for hiding this comment

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

Should not this also use effect.requireConfirmation?

Copy link
Collaborator Author

@huntercaron huntercaron Feb 3, 2026

Choose a reason for hiding this comment

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

Reworked this to be more clear, it now always accesses the config directly rather than having a parameter on the effect. Also renamed the effects to be more obvious

const projectShortHash = shortProjectHash(state.project.id)

log.debug("Opening WebSocket", { port, attempt, project: projectName })
const socket = new WebSocket(`ws://localhost:${port}`)
Copy link
Member

Choose a reason for hiding this comment

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

Should we use secure web sockets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't think we would gain much, and we'd have to handle certs. I think fine like this?

Copy link
Member

@triozer triozer left a comment

Choose a reason for hiding this comment

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

LGTM

- Improve clarity of effect names
- Better support deletion of multiple files
- Ensure local deletions always require confirmation on resync
@huntercaron
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

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.

4 participants