Skip to content

[Bug] Inbox: heading-anchor links in Markdown attachments do not scroll to existing targets #2229

Closed

Description

@zane668

What happened?

Clicking a same-document heading link in the Inbox Markdown attachment preview does not scroll, even though its target heading and DOM id exist. The same fixture scrolls in standalone Annotate.

Reproduction

In an empty directory, run this Python fixture generator (all content is synthetic):

from pathlib import Path
import base64

Path('assets').mkdir(exist_ok=True)
Path('assets/sample.png').write_bytes(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAIAAAAt/+nTAAAATklEQVR4nO3PUQkAIBTAwBfHYMY2jCH8OITBAtxm7fN1wwUNaEEDWtCAFjSgBQ1oQQNa0IAWNKAFDWhBA1rQgBY0oAUNaEEDWtCAFjx2AWvKQKaxk0G4AAAAAElFTkSuQmCC'))
Path('guide.md').write_text(
    '# Attachment preview repro\n\n'
    '[Jump to target](#target-section)\n\n'
    '[Open linked document](peer.md)\n\n'
    '![Sample image](assets/sample.png)\n\n'
    + ''.join(f'Public filler paragraph {i+1}. This is sample text to put the destination below the fold.\n\n' for i in range(65))
    + '## Target section\n\nTarget marker.\n'
)
Path('peer.md').write_text('# Linked document\n\nPublic sample destination.\n')
  1. Start plannotator inbox --no-open.

  2. Use the Inbox MCP send_message tool with project_path set to this directory and attachments containing the absolute path to guide.md.

  3. Open that thread and click the guide.md attachment.

  4. Click Jump to target near the top of the attachment.

  5. Compare with plannotator annotate guide.md (dismiss first-run announcements if shown).

Actual vs expected

Measured at a 1400×900 viewport, with exactly one id="target-section" in each document:

Surface Target heading top before click Target heading top after click
Standalone Annotate 3017px 740px — visible inside the viewport
Inbox Markdown attachment 2990px 2990px — still below the viewport

Expected: clicking the heading link brings the existing target into view within the attachment's scroll container. The standalone destination is near the document end, so it need not align to the top edge.

This concerns clicking a local #target-section link, not Back-button scroll restoration in #2082 / #2128.

Environment

  • Plannotator: official 0.28.32, Darwin ARM64 binary.
  • OS: macOS 27.0.1, Apple silicon.
  • Browser: fresh Chromium 155.0.8059.12, headless, 1400×900 viewport.
  • Agent: standalone CLI/MCP reproduction; original workflow uses Pi.
  • Surface: Inbox web UI → Markdown attachment preview.
  • Isolated temporary HOME/data directory; no existing browser profile or private document needed.

Activity

  1. zane668 commented on Oct 29, 2026

    @zane668
    Author

    Retested the original fixture on the official v0.28.36 stable binary (macOS Apple silicon, fresh in-memory Chromium 155.0.8059.12, 1440×900, isolated HOME/data directory).

    The issue still reproduces in the Inbox Markdown attachment:

    • #target-section exists.
    • After layout settles, the target's viewport top is 2990.09375 px both before and after clicking Jump to target; the attachment scroll container remains at scrollTop = 0.
    • The same guide.md opened with standalone plannotator annotate is a positive control: the target moves from 3015.71875 px to 740.71875 px, inside the 900 px viewport. The lower landing position is expected at the document's scroll boundary, not a failure.

    Thanks for the proposed fix in #2316. This is a released-version retest only; I have not tested the PR branch and am not claiming it fails. No private documents were used.

  2. added a commit that references this issue on Oct 29, 2026
    9fc66a2
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions