New editor homepage demo#795
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5d03f1051
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| this.#fileInstance = component; | ||
| this.#initialize(); | ||
| this.#detach = component.attachEditor(this); |
There was a problem hiding this comment.
Clean up previous editor attachment before re-editing
When the same Editor is moved by calling edit() on another component (which the new public docs explicitly describe as supported), the existing #detach and event/style cleanup are never run before #fileInstance and #detach are overwritten. That leaves the previous component still pointing at this editor and leaves the old document/content listeners active, so a later rerender of the old component can call syncToRenderedView and steal editing back or duplicate handlers. Call the previous cleanup/detach path before initializing the new attachment.
Useful? React with 👍 / 👎.
| if (line.startsWith('??')) { | ||
| const p = unquoteGitPath(line.slice(3).trimStart()); | ||
| if (p.length > 0) { | ||
| entries.push({ path: p, status: 'untracked' }); | ||
| } |
There was a problem hiding this comment.
Strip the pathspec from untracked git-status entries
For /git-status/packages/diffs, tracked changes are normalized to tree-relative paths later in this function, but this untracked branch pushes Git's repo-relative path unchanged. An untracked packages/diffs/src/new.ts is returned as packages/diffs/src/new.ts while the file tree paths from /fs/packages/diffs are src/new.ts, so new files under the scoped editor tree won't get their untracked badge/status until this branch applies the same pathspec stripping.
Useful? React with 👍 / 👎.
|
can you see this editor at the preview deploy? what's the url? |
0e3065f to
f6529b9
Compare
f6529b9 to
eea2a5d
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
eea2a5d to
6efc737
Compare
WIP, but building out a fun editor demo again. Lots to clean up in the Git history, lots more to polish.