Skip to content

Vault: paginated (non-scrolling) PDF reading mode, to make scrollMode meaningful #178

Closed

Description

@libravault-xyz

Problem

feature:reader's regular PdfReaderScreen supports two rendering modes — continuous scroll and page-by-page pagination — switched via ReaderSettings.scrollMode. VaultPdfReaderScreen (vault-native PDF reading) only has the continuous-scroll implementation (from Phase 5b).

When per-user reading settings were added to the vault-native reader, VaultReaderSettings deliberately dropped the scrollMode field entirely rather than including a control that would toggle nothing — see that field's absence and doc comment in feature/vault/src/main/kotlin/xyz/libravault/feature/vault/VaultReaderSettings.kt.

Ask

Port feature:reader's paginated PdfReaderScreen variant (single page + swipe/tap navigation, currentPage state) to VaultPdfReaderScreen, then re-add a scrollMode field to VaultReaderSettings and a control to VaultReaderSettingsSheet, wired the same way the regular ReaderSettingsSheet/PdfReaderScreen already are.

Context

Filed while reviewing the vault-native reader's per-user reading-settings work (feature/vault-phase7-reader-settings). Not a regression — vault PDF has only ever had continuous scroll since it was introduced in Phase 5b.

Activity

  1. added
    enhancement
    on Aug 15, 2026
  2. claude commented on Aug 15, 2026

    @claude
    Contributor

    Triage: stopping here, not opening a PR.

    This issue asks me to add a scrollMode field to VaultReaderSettings and wire a control into VaultReaderSettingsSheet, but neither of those files exist on dev yet — they're introduced by the still-open, unmerged PR #176 (feature/vault-phase7-reader-settings), which is the exact work this issue's "Context" section references. dev currently has no per-user vault reader settings at all.

    I can't confidently scope this against dev as instructed:

    • Branching off dev today, there's nothing to "re-add" a field to — VaultReaderSettings.kt doesn't exist there.
    • Branching off the unmerged feature/vault-phase7-reader-settings instead would mean building this PR on top of unreviewed/unmerged code, and opening it against dev would show feat(vault): per-user reading settings for the vault-native reader #176's whole diff as part of this PR — not something I should do unilaterally.

    This needs a human call on sequencing: land #176 first and then re-triage this issue against dev, or explicitly direct me to branch on top of #176. Applying status:needs-info in the meantime.

  3. added
    status:needs-info
    on Aug 15, 2026
  4. added
    status:ready-for-dev
    and removed
    status:needs-info
    on Aug 17, 2026
  5. libravault-xyz commented on Aug 17, 2026

    @libravault-xyz
    CollaboratorAuthor

    Triage (2026-08-17): This issue's blocker (PR #176, feature/vault-phase7-reader-settings) merged 2026-08-15. Confirmed on dev: VaultReaderSettings.kt has no scrollMode field (doc comment notes it was deliberately omitted since only continuous scroll existed), and VaultPdfReaderScreen.kt still only implements a LazyColumn continuous-scroll view. The ask is now fully unblocked and scopable.

    Labeling status:ready-for-dev. Scope: port feature:reader's paginated PdfReaderScreen pattern to VaultPdfReaderScreen, then re-add scrollMode to VaultReaderSettings + a control in VaultReaderSettingsSheet, wired the same way the non-vault reader does it.

  6. added
    status:needs-info
    and removed
    status:ready-for-dev
    on Aug 17, 2026
  7. github-actions commented on Aug 17, 2026

    @github-actions
    Contributor

    The dev agent's run failed (crashed or exhausted its turn budget) partway through triage/implementation, before opening a PR — routed to a human instead of silently leaving this on status:in-progress or status:ready-for-dev. See the workflow run.

  8. added
    status:ready-for-dev
    and removed
    status:needs-info
    status:ready-for-dev
    on Aug 17, 2026
  9. added
    status:needs-info
    and removed
    status:ready-for-dev
    on Aug 17, 2026
  10. github-actions commented on Aug 17, 2026

    @github-actions
    Contributor

    The dev agent's run failed (crashed or exhausted its turn budget) partway through triage/implementation, before opening a PR — routed to a human instead of silently leaving this on status:in-progress or status:ready-for-dev. See the workflow run.

  11. libravault-xyz commented on Aug 18, 2026

    @libravault-xyz
    CollaboratorAuthor

    Automated pipeline health check: Flagging a pattern, not re-flagging the crash itself (which the bot's own comments above already describe correctly).

    This is now the second consecutive dev-agent run to fail identically on this issue — run 32043602065 at ~15:54 UTC, then again after a retrigger at run 32076263272 at ~22:42 UTC. Pulled the raw execution log for the second run: both times the terminal reason is the same —

    "terminal_reason": "max_turns",
    "errors": ["Reached maximum number of turns (40)"]
    

    This isn't the transient infra flakiness (codeload 429 / permission-check 503) this routine normally treats as safe to retry once — it's the agent genuinely running out of its 40-turn budget mid-implementation (last action in the second run was still editing a Compose UI test to fix a flaky waitForIdle() gap while porting the paginated PDF reader). A bare retrigger is unlikely to succeed a third time without a scope change.

    Not auto-retrying again. Recommend a human either split this work (paginated-mode port vs. scrollMode wiring as separate PRs) before re-applying status:ready-for-dev, or bump the dev-agent turn budget for issues of this size — this routine will keep noting the repeat if re-triggered as-is.


    Generated by Claude Code

  12. added a commit that references this issue on Aug 18, 2026
  13. added
    status:ready-for-dev
    and removed
    status:needs-info
    on Aug 18, 2026
  14. added
    status:in-progress
    on Aug 18, 2026
  15. github-actions commented on Aug 18, 2026

    @github-actions
    Contributor

    Opened PR #264: ported feature:reader's paginated PdfReaderScreen to VaultPdfReaderScreen and re-added scrollMode to VaultReaderSettings/VaultReaderSettingsSheet, wired the same way as the non-vault reader. Full local test suite (./gradlew testDebugUnitTest) is green. See the PR description for one explicit test-coverage gap called out (no Compose UI test drives PdfRenderer-backed tap/zoom interaction — none exist anywhere in the repo for this exact reason; the prior two automated attempts at this issue both stalled trying to author one).

  16. libravault-xyz commented on Aug 19, 2026

    @libravault-xyz
    CollaboratorAuthor

    Automated pipeline health check: New failure mode, doesn't match any of the 5 patterns this routine currently knows — flagging, not self-healing.

    This issue's linked PR (#264, Closes #178) shows state: MERGED (merged 2026-08-19T08:25:20Z via principal-review.yml's auto-merge step, gh pr merge --squash), but this issue is still open, still carrying its pre-merge status:ready-for-dev/status:in-progress labels over 2 hours later. GitHub's own cross-reference tracking confirms the link (closed_by_pull_requests on this issue correctly shows #264 as MERGED) — so the auto-close-on-merge that should follow from a Closes #N line in the PR body never fired.

    Same symptom independently confirmed on issue #314 (linked PR #316, also MERGED, also still open) — so this isn't a one-off.

    Not self-healing this: closing an issue isn't in this routine's authorized action set, and diagnosing why GitHub's auto-close didn't fire needs more than this routine can check (e.g. whether principal-review.yml's plain GITHUB_TOKEN-driven gh pr merge --squash reliably triggers the same closing-keyword side effect a normal merge does — worth a human checking the merge/webhook log for this specific PR).

    Suggested fix direction: don't rely on GitHub's implicit Closes #N auto-close for agent-merged PRs — have the auto-merge step in principal-review.yml explicitly gh issue close <N> --reason completed (or similar) right after a successful merge, using the already-resolved issue number, as a robust fallback regardless of whether the implicit keyword-close fires.

    Worth a tracked issue if it recurs (it already has, twice, today) — recommend one covering both this and #314 stuck open post-merge, plus a sweep for any other issues in the same state.


    Generated by Claude Code

  17. removed
    status:ready-for-dev
    status:in-progress
    on Aug 21, 2026
  18. github-actions commented on Aug 21, 2026

    @github-actions
    Contributor

    Closed manually: PR #264, which resolves this issue, was merged on 2026-08-19 but the issue was left open with stale in-progress labels — the exact bug tracked in #402. Explicit-close logic has been added to principal-review.yml's auto-merge step to prevent recurrence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions