Skip to content

Conversation

@thoroc
Copy link

@thoroc thoroc commented Jan 30, 2026

Summary

feat: Add Table of Contents sidebar with sticky action buttons

What Changed

  • Table of Contents Sidebar - Hierarchical navigation showing H2-H5 headings with click-to-scroll
  • Active Section Tracking - Real-time highlighting of current section based on scroll position
  • Sticky Action Buttons - Images, Global comment, and Copy plan buttons stay visible while scrolling
  • Navigation Fix - Scroll-to-section now works correctly within the scrollable main container
  • Config Fix - Corrected typo in opencode.json (CALUDE → CLAUDE)

Files Added/Modified

  • packages/ui/components/TableOfContents.tsx (new)
  • packages/ui/hooks/useActiveSection.ts (new)
  • packages/ui/utils/annotationHelpers.ts (new)
  • packages/editor/App.tsx - Added TOC integration
  • packages/ui/components/Viewer.tsx - Sticky button positioning
  • opencode.json - Typo fix

Testing

Run bun run build:hook && ./tests/manual/local/test-hook.sh to verify the UI locally.

- Add hierarchical Table of Contents component with clickable navigation
- Implement useActiveSection hook for real-time section highlighting
- Add annotationHelpers utility for block identification
- Make Images, Global comment, and Copy plan buttons sticky during scroll
- Fix navigation scrolling to work within scrollable main container
@kkharji
Copy link

kkharji commented Jan 30, 2026

Screenshot 2026-01-31 at 02 32 45 Found small bug while annotating code blocks. Not sure if it's issue from my-side or unified, but once I annotate a codeblock this happens.

@thoroc
Copy link
Author

thoroc commented Jan 31, 2026

Oh that is annoying indeed. I need to look into it.

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