Skip to content

Put Code cards on the canvas and confirm recent deletes - #88

Merged
braedonsaunders merged 34 commits into
mainfrom
cursor/code-cards-confirm-delete-bdff
Aug 24, 2026
Merged

Put Code cards on the canvas and confirm recent deletes#88
braedonsaunders merged 34 commits into
mainfrom
cursor/code-cards-confirm-delete-bdff

Conversation

@braedonsaunders

@braedonsaunders braedonsaunders commented Aug 17, 2026

Copy link
Copy Markdown
Owner

What this PR does

Two follow-ups from issues #82 and #85, plus layout fixes from live preview, all in the same one-file app.

Code cards live on the infinite canvas (#82). Switching to Code no longer opens a fixed right pane capped at four files. Code seeds one card on enter (current selection, or the most-connected file in the folder filter) so Graph vs Code is obvious. After that, files get onto the canvas only when you open them (leftover node or Files tree). Cards are full source panes: uniform width, height follows line count, folder group frames, line-level bezier edges when we have a symbol/line. Opened cards auto-append to a per-directory column. Existing cards do not move or resize when you click another node.

Code camera stays put. Auto-fit runs at most once when first entering Code. After that the camera is user-owned. Opening a new file may fly to that card only. Clicking a card, symbol, or leftover node does not refit. Wheel pans; Ctrl+wheel zooms about the cursor.

Cards replace their nodes. An open file card does not also show a tiny circle underneath. Remaining nodes stay Graph-sized, stay clickable, and are pushed out from under cards. Selection is overlay-only (highlight + symbol pills on the selected card). Click empty canvas to deselect; open cards stay.

Right-rail subtabs stay level. FILE / PATTERNS / SECURITY / ACTIONS sit on one baseline. Count pills are inline and do not wrap or shift alignment.

Confirm before deleting a recent analysis (#85). Delete is two clicks on the same control: Delete, then red Confirm?. Escape, a 4s timeout, or choosing another row cancels. No modal.

Left rail and Color By. Color By (Folder / Layer / Churn) is a small control on the Graph / 3D Graph canvas, not a tall sidebar block. The left rail is full-height tabs: Overview (health/stats), Files (folder tree), and Recents (cached analyses). After analyze, and on first paint, Overview is selected. Files and Recents stay one click away.

Out of scope

CLI diffs stay out of this PR. No second product, no extra HTML file. Do not merge until Braedon reviews.

How to verify

  1. Analyze a repo, then toggle Graph vs Code. Code should immediately show source cards, not the same node graph.
  2. In Code, click three different leftover nodes. Already-open cards must stay exactly where they were. The new card appears in its folder column. You can still read and pan. No full re-layout, no camera jump except an optional fly-to the new card.
  3. Click a card: highlight + symbol pills only. Click empty canvas: pills go away, cards stay. Wheel pans; Ctrl+wheel zooms about the cursor.
  4. Right-rail tabs FILE / PATTERNS / SECURITY / ACTIONS should sit on one horizontal line, with or without count pills, with no wrap.
  5. On Graph, Color By should sit on the canvas (top-right, above the legend), not in the left rail.
  6. Left rail tabs: Overview, Files, Recents. After analyze, Overview is selected.
  7. In Recents, click Delete then Confirm? to remove an analysis. One click should not delete.
Open in Web Open in Cursor 

Code view now opens selected and connected files as cards on the
infinite canvas, linked by the existing graph lines, instead of a
fixed right-hand split capped at four. Recents delete requires a
second Confirm? click so a misclick does not drop a cached analysis.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codeflow Ready Ready Preview Aug 24, 2026 1:03am

Request Review

Cards no longer snap back after a drag, and a remounted Code view
starts from identity zoom so overlay cards are not offset.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5fc2dcee02

ℹ️ 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".

Comment thread index.html Outdated
Comment thread index.html Outdated
High-degree files now open at most 12 cards, preferring neighbors
that already have source, so a cached GitHub reopen does not fire
one getFile per edge. A leftover click after dragging a card is
consumed so repositioning does not change the selection.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

Addressed both Codex P2s on this branch:

  • Code cards are capped at 12 (selected + neighbors). Neighbors that already have source win the slots, so a cached GitHub reopen does not fire one getFile per edge. The HUD notes when more connected files exist.
  • A leftover click after dragging a card is consumed, so repositioning no longer calls selectFile or replaces the surrounding cards.

Still one HTML file. Tests pass. Not merging.

Cards grow to the full file so the canvas does the scrolling.
Opened files auto-align in directory groups using the same parent
folder frames the graph already draws. Symbols sit in a vertical
list. Click-to-open connected files stays the default; other nodes
fade instead of becoming more cards.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

Applied eorroe’s #82 notes on this branch:

  • Cards size to the full file when practical. Zoom/pan the canvas instead of inner scrollbars. Huge files still clip.
  • Symbols are a vertical one-line-per-name list on the left. No horizontal scrollbar.
  • Opened cards auto-align by directory, inside the same folder parent frames the graph already uses. No custom named groups.
  • Click-to-open connected files stays the default. Other nodes fade in the background instead of becoming more cards.

The two Codex P2s (12-card cap + ignore post-drag click) were already on this branch. Still one HTML file. Tests pass. Not merging.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f470afdcf3

ℹ️ 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".

Comment thread index.html Outdated
Comment thread index.html Outdated
Code no longer waits for a click, which made it look like Graph.
It now seeds the most-connected file plus neighbors immediately,
keeps that set if the canvas is clicked, and fits the cards in view.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@braedonsaunders

Copy link
Copy Markdown
Owner Author

Graph vs Code looking the same was a real product bug: Code only opened cards after a click, so at rest it was the same node graph (sometimes faded).

Pushed 2d23d58 on this branch. Switching to Code now seeds cards immediately — current selection, or the most-connected file in the folder filter plus its neighbors. Source is visible without hunting. Graph is still the circle graph. Same one HTML file.

After Vercel rebuilds, analyze a repo and toggle Graph vs Code. They should be obviously different at rest.

Color By is a small canvas control on Graph/3D Graph instead of a tall sidebar block. The left rail is now full-height Overview, Files, and Recents tabs so the file tree can use the whole column.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@braedonsaunders

Copy link
Copy Markdown
Owner Author

Pushed f7a9179 on this branch (still one HTML file).

  • Color By is a small Folder / Layer / Churn control on the Graph canvas (and 3D Graph), top-right above the legend. It is no longer a tall left-rail block.
  • Left rail is full-height tabs: Overview (health/stats), Files (folder tree), Recents (cached analyses). After an analysis, Files opens so the tree gets the whole column — about double the old lower-third height.
  • Graph vs Code is unchanged: Code still seeds source cards immediately so the two views are obviously different.

Not merged.

First paint and a newly loaded analysis open Overview. Files and Recents stay one click away; last tab is not persisted across visits.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@braedonsaunders

Copy link
Copy Markdown
Owner Author

Pushed 6334bd9: left-rail default is Overview.

First paint and a newly loaded analysis select Overview, not Files or Recents. Switching still works. Last tab is not persisted across visits.

Not merged.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6334bd90d6

ℹ️ 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".

Comment thread index.html Outdated
Auto-fit now runs at most once when entering Code. Opening files, hydrating source, or resizing cards no longer refits or regrids the canvas. The user pan/zoom stays put and cards keep their readable size.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@braedonsaunders

Copy link
Copy Markdown
Owner Author

Pushed b45fdd6: Code view no longer steals the camera.

The unlabeled hypothesis was right — a fit-to-cards path was firing on graph rebuilds (including source hydration) and on every card-set change, which zoomed the world out and made cards/nodes look tiny.

Auto-fit now runs at most once when first entering Code. Opening more files, dragging, and zooming leave the viewport where you put it. Cards keep their full-file size. Fit View still works if you ask for it.

Not merged.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 013558bedb

ℹ️ 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".

Comment thread index.html
Cards are HTML overlays. Wrapping them in foreignObject would not make a real standalone SVG, so Code view disables SVG/PDF in the export modal and keeps reports and share links.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Landed 9a5da0198e59f2ae15c0212d683389ef511c1a29 for the live P2 on 013558b. Still one HTML file. Do not merge.

  • Code cards are HTML overlays (syntax, CSS, scroll), so wrapping them in foreignObject would not produce a real standalone SVG.
  • SVG Image is now disabled in Code view, with a note to switch to Graph. PDF is disabled the same way. Reports and Share Link still work. exportSVG() also refuses Code view so it cannot download an empty-card graph.

npm test: 156 pass / 0 fail.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a5da0198e

ℹ️ 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".

Comment thread index.html Outdated
Comment thread index.html Outdated
Folder filters no longer delete placements for still-open cards, so dragged cards restore when the filter clears. Far-zoom clipped bodies are not native-scroll targets, so unmodified wheel pans the canvas.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Landed 4ec4efa71e948d363250d29b08a31d96b807092d for the two live P2s on 9a5da01. Still one HTML file. Do not merge.

  • Folder filters no longer delete placements for still-open cards, so a dragged card returns to its pin when the filter clears.
  • Far-zoom (code-far) clipped card bodies are no longer native-scroll targets, so unmodified wheel pans the canvas instead of doing nothing.

npm test: 158 pass / 0 fail.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Routing the tree through goToFile closed the props object too early, so Babel died and the page stayed blank. The remaining keys are back inside that object.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Landed 1bdc4ce4e10efe6df3f3f04fa6a39383d735b9d8 for the blank-screen parse error. Still one HTML file. Do not merge.

Routing Files-tree clicks through goToFile closed the TreeNode props object after onSelect, so inline Babel died (Unexpected token, expected ",") and the page never booted. Those props are one object again. Added a smoke test that transforms the inline script with the vendored Babel.

npm test: 159 pass / 0 fail.

@braedonsaunders

Copy link
Copy Markdown
Owner Author

Blank-screen parse error from #82 is fixed in 1bdc4ce. Routing Files-tree clicks through goToFile had closed the TreeNode props object too early, so inline Babel never mounted the app. Still one HTML file. Tests 159 pass. Not merging. Not pinging Codex (out of review credits).

Loading babel.min.js in a VM contended with the 3k-file analysis budget on CI. Node's parser still catches the TreeNode syntax error that blank-screened the page.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

Landed d78f583608c5fe8b80a618335b563ba5cf2d4a71 to unstick Tests. Still one HTML file. Do not merge.

The new Babel VM smoke test itself passed, but it loaded vendor/babel/babel.min.js and transformed the whole page in parallel with the 3k-file analysis budget (synthetic 3k-file analysis took 2032ms). The smoke test now parses that same inline script with Node (~15ms) and still guards the TreeNode props typo.

npm test: 159 pass / 0 fail.

Folder hulls now read live node pins and the painted card boxes, so
they follow a card after drag instead of only refreshing on layout.
Code view gets top-right Scroll/Expand and word-wrap toggles.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

Pulled eorroe’s #82 retest (comment 5374655600).

Hulls now wrap the painted card boxes (and leftover nodes in the same folder) from live pins, so they follow a drag instead of only refreshing on layout/spread.

Code view also has top-right prefs, same style as Color By:

  • Height: Scroll (default) or Expand to the full file with no vertical scrollbar
  • Wrap: On by default so long lines do not force a horizontal bar

Line-thickness and 3D moving links still later. Same PR, not merged. npm test is green (159).

Code view now always shows a top-right Expand All / Wrap Text bar,
even when both prefs are off, and Expand+Unwrap keeps a horizontal
scrollbar. Cards get right/bottom resize handles. Folder hulls wrap
live card boxes, ignore far leftover nodes, and sit on Graph-like
folder centers so sibling hulls stay apart after a drag.

Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Pulled eorroe’s latest #82 notes (comment 5383189364).

On 88 now (06e5748):

  • Top-right Expand All / Wrap Text bar stays visible when both are off, so you can turn them back on.
  • Expand + Wrap off keeps a horizontal scrollbar on long lines.
  • Cards have right / bottom / corner resize handles in Scroll or Expand.
  • Hulls wrap the painted card box after drag. Far leftover nodes no longer stretch every hull into one pile. Sibling folder hulls stay put when you move another folder’s card.
  • Code folder groups use Graph-style centers (scaled for card size) so hulls are spaced instead of stacked.

Zoom-out color blocks, mini map, and a root-file-count gate are still later. Line-number pills unchanged. Same PR, not merged. npm test is green (161).

@braedonsaunders
braedonsaunders merged commit 262206c into main Aug 24, 2026
4 checks passed
@braedonsaunders
braedonsaunders deleted the cursor/code-cards-confirm-delete-bdff branch August 24, 2026 01:03
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.

2 participants