René's URL Explorer Experiment


Title: id(web): Go to Line miscounts and cannot navigate outside a single raw code_block — textContent has no block separators and position mapping hard-codes +2 · Issue #745 · developing-today/code · GitHub

Open Graph Title: id(web): Go to Line miscounts and cannot navigate outside a single raw code_block — textContent has no block separators and position mapping hard-codes +2 · Issue #745 · developing-today/code

X Title: id(web): Go to Line miscounts and cannot navigate outside a single raw code_block — textContent has no block separators and position mapping hard-codes +2 · Issue #745 · developing-today/code

Description: Problem Go to Line (Ctrl+G / Cmd+G) only works for a document that is a single raw-mode code_block. In every other mode the plugin is installed in, it miscounts lines and cannot navigate: The plugin is added unconditionally for all modes...

Open Graph Description: Problem Go to Line (Ctrl+G / Cmd+G) only works for a document that is a single raw-mode code_block. In every other mode the plugin is installed in, it miscounts lines and cannot navigate: The plugi...

X Description: Problem Go to Line (Ctrl+G / Cmd+G) only works for a document that is a single raw-mode code_block. In every other mode the plugin is installed in, it miscounts lines and cannot navigate: The plugi...

Opengraph URL: https://github.com/developing-today/code/issues/745

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web): Go to Line miscounts and cannot navigate outside a single raw code_block — textContent has no block separators and position mapping hard-codes +2","articleBody":"## Problem\n\nGo to Line (Ctrl+G / Cmd+G) only works for a document that is a single raw-mode `code_block`. In every other mode the plugin is installed in, it miscounts lines and cannot navigate:\n\n- The plugin is added unconditionally for all modes in `pkgs/id/web/src/editor.ts` (`createGotoLinePlugin()` in the shared plugin list, after the raw/rich branch), so rich, markdown and plain documents all get it. Those modes use `richSchema` (paragraphs, headings, list items, code blocks as separate textblocks).\n- `getLineCount` (`pkgs/id/web/src/goto-line.ts:19-27`) counts `\\n` characters in `doc.textContent`. ProseMirror's `textContent` concatenates textblocks with **no separator**, so block boundaries are invisible: a document of three paragraphs has `textContent === \"alphabetagamma\"` and counts as **1 line**.\n- `getLineStartPos` (`pkgs/id/web/src/goto-line.ts:30-61`) maps a text offset to a document position with a hard-coded `pos + 2`, with a comment claiming rich mode is handled \"via resolve\" — there is no resolve; the +2 is only correct for `doc > code_block > text` with a single block. Each additional textblock adds its own position overhead, so even a correct count would land at the wrong position.\n\n## Evidence (verified on main d7f99733 with a temporary vitest probe driving the real plugin, removed after)\n\nRich schema, doc = three paragraphs `alpha` / `beta` / `gamma`:\n\n- `doc.textContent` is `\"alphabetagamma\"` (no newlines).\n- Opening the dialog shows placeholder `Line # (1–1)` and `max=1` for a three-line document.\n- Entering `2` and pressing Enter does nothing: the #712 strict validation rejects it as out of range, the dialog stays open and the selection does not move. Go to Line is effectively dead in rich/markdown/plain mode.\n\nRaw schema, doc = two `code_block`s (`a\\nb` and `c\\nd`, four lines total):\n\n- `textContent` is `\"a\\nbc\\nd\"` — the last line of the first block and the first line of the second are merged — and the dialog reports 3 lines instead of 4.\n\nDedup: #712 (closed) fixed invalid/out-of-range input handling for the single-block case; #718 (closed) fixed the dialog singleton across editor recreation. Neither touches line counting/position mapping outside a single code block. No open issue covers this.\n\n## Why it matters\n\nCtrl+G is installed and advertised in every editable mode, but outside a single raw code block it tells the user their document has one line (or merges block-boundary lines) and refuses every jump past it. Plain-text and markdown files — primary id use cases — are exactly the affected modes.\n\n## Acceptance criteria\n\n- Line counting and line-start positions are computed from the document structure (walking textblocks and their positions), not from `doc.textContent` offsets plus a constant.\n- A defined line semantics for non-raw modes (e.g. one line per textblock, plus `\\n`-split lines inside code blocks) is implemented and documented in the module comment.\n- Regression tests: rich doc of several paragraphs (dialog range matches, Enter on line N moves the cursor to the start of the Nth paragraph); mixed doc (paragraph + multi-line code_block + paragraph); raw doc with two code_blocks counts all lines; existing single-code_block tests and the #712 invalid-input tests still pass.\n- Or, if Go to Line is deliberately raw-only, the plugin is not installed (or cleanly no-ops with feedback) in rich/markdown/plain modes, and that restriction is tested — silently offering a broken dialog is the unacceptable part.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-24T10:39:29Z","url":"https://github.com/developing-today/code/issues/745"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3b5f0cd2-a8a0-0cd3-a64a-3a2173935b3c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC4E8:3C2607:85BE71:AC9F3B:6B062C3E
html-safe-noncee80c1314d6349af086d5309d35005ef813077a2470a83e231cc8a5ccbf6e3c3f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEU4OjNDMjYwNzo4NUJFNzE6QUM5RjNCOjZCMDYyQzNFIiwidmlzaXRvcl9pZCI6IjIwNTczOTY0MzU4ODQwNTk3MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac97577d067101021cdaa37773dbb334f7518113305a93a8da43eeb729ea2b6185
hovercard-subject-tagissue:6012056490
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/745/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8958449df7ca875cbc36b73c583ae8afee065a681b7db1de84c0037f40e115bc/developing-today/code/issues/745
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8958449df7ca875cbc36b73c583ae8afee065a681b7db1de84c0037f40e115bc/developing-today/code/issues/745
og:image:altProblem Go to Line (Ctrl+G / Cmd+G) only works for a document that is a single raw-mode code_block. In every other mode the plugin is installed in, it miscounts lines and cannot navigate: The plugi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release494ea0bb1e0feef734a83e2628697647755e8864
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/745#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F745
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F745
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/745
Reloadhttps://github.com/developing-today/code/issues/745
Reloadhttps://github.com/developing-today/code/issues/745
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests150 (150)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/745
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/745
#746https://github.com/developing-today/code/pull/746
id(web): Go to Line miscounts and cannot navigate outside a single raw code_block — textContent has no block separators and position mapping hard-codes +2https://github.com/developing-today/code/issues/745#top
#746https://github.com/developing-today/code/pull/746
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/745#issue-6012056490
d7f9973https://github.com/developing-today/code/commit/d7f9973383a01a5fbc336ffd634ee5b3729319bb
id(web): Go to Line accepts 0/negatives as line 1, truncates fractions, and silently closes on out-of-range lines #712https://github.com/developing-today/code/issues/712
#712https://github.com/developing-today/code/issues/712
#718https://github.com/developing-today/code/issues/718
id(web): Go to Line accepts 0/negatives as line 1, truncates fractions, and silently closes on out-of-range lines #712https://github.com/developing-today/code/issues/712
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/745#event-34123705749
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/745#issuecomment-6388375876
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#746https://github.com/developing-today/code/pull/746
on Oct 24, 2026https://github.com/developing-today/code/issues/745#event-34151654764
dezren39https://github.com/dezren39
on Oct 24, 2026https://github.com/developing-today/code/issues/745#event-34155966187
fix(id-web): widen the goto-line test helper to accept both schemashttps://github.com/developing-today/code/commit/e329f7d679f355f8b47bda5d51f4698784cc3729
e329f7dhttps://github.com/developing-today/code/commit/e329f7d679f355f8b47bda5d51f4698784cc3729
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/745
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/745
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.