Skip to content

Conversation

@danielw97
Copy link
Contributor

@danielw97 danielw97 commented Jan 2, 2026

Summary

This PR completes the DocumentSession migration started in 2c040ee, restoring all navigation functionality that was temporarily disabled.

  • Wire up all navigation methods (page, heading, link, list, table, section) to use DocumentSession APIs
  • Fix "Go to Page" dialog to work with the new session-based architecture
  • Fix "Elements" dialog (headings/links list) to properly populate from DocumentSession
  • Implement page_index, marker_count, and marker_position_by_index methods that were stubbed out

Fixes #232

Complete the second phase of migrating from legacy document_data to DocumentSession by implementing all navigation methods that were stubbed out in the previous commit:

- Page navigation via session_navigate_page
- Link navigation via session_navigate_link
- List and list item navigation via session_navigate_list/list_item
- Heading navigation via session_navigate_heading (with level filtering)
- Table navigation and activation via session_navigate_table
- Table of contents dialog with session_document integration
- Go to Page dialog updated to use session_document
- Elements dialog (headings/links list) updated to use session_document
- page_index, marker_count, marker_position_by_index now use DocumentSession

Add ensure_toc_loaded() for lazy TOC loading and find_closest_toc_offset() to session_document struct. Update dialogs to accept session_document*.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@trypsynth trypsynth merged commit 7a62cf0 into trypsynth:master Jan 3, 2026
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.

Latest Paperback development build: error message saying all navigation types temporarily unavailable

2 participants