Skip to content

[aidan] ux/large-text-paste: make pasted-text cards editable with autosave#119

Merged
ciregenz merged 1 commit into
eric/devfrom
aidan/ux/large-text-chat-paste
Jul 5, 2026
Merged

[aidan] ux/large-text-paste: make pasted-text cards editable with autosave#119
ciregenz merged 1 commit into
eric/devfrom
aidan/ux/large-text-chat-paste

Conversation

@abccodes

@abccodes abccodes commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

2b80624: Makes pasted-text cards in the chat input editable via an autosaving textarea instead of a read-only preview, since users previously had to delete and re-paste the whole card just to fix a typo. Also fixes a bug where cards restored from an unsent draft (e.g. after closing and reopening the composer) lost their click/remove listeners because innerHTML restore drops JS event handlers. Typechecked clean and manually verified end-to-end in the running app via CDP (paste, hover, edit, autosave, and survives composer remount).

@abccodes
abccodes changed the base branch from main to eric/dev July 2, 2026 09:47
@ciregenz

ciregenz commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

CI is genuinely red here (same gates pass on your #117/#118): Structure lint + verify + playwright + installer. Likely a stale base plus convention violations — please rebase on current dev and re-run; happy to re-review once green.

@ciregenz

ciregenz commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Substance review (separate from the CI reds): right idea — editable pastes with autosave is real UX, and the in-memory draft Map means the per-keystroke save is cheap. Two things before green-light: (1) the controlled MUI TextField re-renders the full string on every keystroke, and large pastes are this feature's whole point — a 300KB paste will type like molasses; consider an uncontrolled textarea (defaultValue + onChange) or debouncing the controlled value. (2) the useEffect syncing draft from getPasteContent keys only on pasteId — fine today, but if content can refresh under the same id the draft goes stale; cheap to also key on the fetched value. Perf point (1) is the one I'd insist on.

@ciregenz
ciregenz merged commit 452b232 into eric/dev Jul 5, 2026
5 of 9 checks passed
@ciregenz

ciregenz commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Landed in eric/dev for the 1.5.5 cut (see the merge commits + follow-up fixes on eric/dev); closing as merged-via-branch.

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