[Feature Request] Optional source line numbers in plan / annotate document view

#1650 · open · 0 comments

View on GitHub ↗

de-tre

## Problem When reviewing or annotating longer plans and documents, it can be useful to know the corresponding source line numbers. Plannotator already shows line numbers in the code review diff viewer, but there currently seems to be no equivalent option for the normal rendered document view used by Plan Review and `plannotator annotate`. This makes it harder to refer to a precise location in a document, especially when: - discussing a specific part of the source file with an agent or another person; - comparing the rendered document with the original file in an editor; - working with longer Markdown/text documents where headings alone are not always precise enough. ## Proposal Add an optional **Show source line numbers** setting for the normal Plan / Annotate document view, for example under: **Settings → General → Show source line numbers** The existing clean document view could remain the default. The numbers should refer to the **original source lines**, rather than visual lines produced by word wrapping. For rendered Markdown, I realize that there is not necessarily a 1:1 relationship between source lines and rendered rows. If displaying every individual source line is impractical, showing the source location of each rendered block would already be useful, for example: - `42` for a block originating from one source line - `42–45` for a block spanning several source lines The exact presentation could of course follow whatever fits Plannotator's document UI best. ## Existing related functionality There already seem to be some relevant building blocks: - Code review has a configurable **Show Line Numbers** option. - #623 added source line numbers to exported Plan / Annotate feedback, including single-line and line-range locations. - Parsed document blocks already retain source-line information (`startLine`), which is used by annotations and related features. So this request is mainly about making that source-location information optionally visible in the rendered document itself. ## Scope This is **not** a request to disable Markdown rendering or switch to a raw-source editor. The desired result would simply be an optional source-position gutter / indicator alongside the existing rendered Plan and Annotate document view. Thanks for reading and considering this!

Comments