Skip to content

Conversation

@ctoth
Copy link
Contributor

@ctoth ctoth commented Aug 29, 2025

Summary

  • Replace imperative DOM manipulation with declarative React components for blockquote copy buttons
  • Redesign output persistence to store source data instead of rendered HTML
  • Fix copy functionality breaking after page reload from localStorage

Changes Made

  • Created BlockquoteCopyButton and BlockquoteWithCopy React components
  • Updated OutputLine interface to track source data (sourceType, sourceContent, metadata)
  • Bumped OUTPUT_LOG_VERSION to 2 with migration logic that clears old incompatible data
  • Rewrote saveOutput/loadOutput methods to store and recreate from source data
  • Added comprehensive test suites for new components (21 tests total)

Test Plan

  • All existing tests pass (141/141)
  • New components have comprehensive test coverage
  • Copy buttons work for fresh content
  • Copy buttons work for content reloaded from localStorage
  • Markdown detection and conversion works correctly
  • No regression in existing functionality

🤖 Generated with Claude Code

Replace imperative DOM manipulation with declarative React components
for blockquote copy buttons. Store source data instead of rendered HTML
to enable proper component recreation after localStorage reload.

- Create BlockquoteCopyButton and BlockquoteWithCopy components
- Update OutputLine interface to track source data (text, html, isCommand)
- Bump OUTPUT_LOG_VERSION to 2 with migration logic
- Rewrite save/load methods to preserve and recreate React components
- Add comprehensive tests for new components and persistence system

Fixes blockquote copy functionality breaking after page reload.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ctoth ctoth merged commit a419546 into master Aug 29, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Aug 29, 2025
…chitecture

Fix blockquote persistence architecture a419546
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