Skip to content

Fix static HTML class list navigation path duplication (#1639)#1647

Open
carsonclarkemagrab-toast wants to merge 1 commit intolsegal:mainfrom
carsonclarkemagrab-toast:fix-static-html-class-list-navigation
Open

Fix static HTML class list navigation path duplication (#1639)#1647
carsonclarkemagrab-toast wants to merge 1 commit intolsegal:mainfrom
carsonclarkemagrab-toast:fix-static-html-class-list-navigation

Conversation

@carsonclarkemagrab-toast

Summary

Fixes #1639

This fixes a breaking bug in v0.9.38 where clicking nested class links in the class list generates incorrect URLs when serving static HTML documentation, resulting in 404 errors.

Root Cause

The fetch-based navigation system (commit e18b844) resolves relative URLs from the class list iframe against the main frame's current URL instead of the iframe's base URL. When viewing /Foo/Bar.html and clicking a link to Foo/Baz.html, the browser incorrectly resolves it as /Foo/Foo/Baz.html.

The Fix

  • Resolve URLs against the iframe's contentWindow.location instead of the main frame location
  • This ensures relative paths like Foo/Baz.html resolve correctly regardless of the current page

Testing

Reproduced the issue with nested class structure:

class Foo
    class Bar; end
    class Baz; end
end
  • Before fix: Clicking Foo::Baz from /Foo/Bar.html → /Foo/Foo/Baz.html
  • After fix: Clicking Foo::Baz from /Foo/Bar.html → /Foo/Baz.html

Related: block/elasticgraph#1048

Fixes incorrect URL resolution in fetch-based navigation that caused
nested class links to duplicate parent paths (e.g., /Foo/Foo/Baz.html
instead of /Foo/Baz.html) when serving static HTML documentation.

The issue occurred because relative URLs from the class list iframe
were being resolved against the main frame's current URL instead of
the iframe's base URL. This fix resolves URLs correctly by using the
iframe's location as the base for relative path resolution.

Related: block/elasticgraph#1048

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

Co-Authored-By: Claude <noreply@anthropic.com>
@carsonclarkemagrab-toast
Copy link
Author

Seems like I opened this right after a fix put up in another PR: #1646

carsonclarkemagrab-toast added a commit to carsonclarkemagrab-toast/elasticgraph that referenced this pull request Feb 25, 2026
YARD 0.9.38 has a bug that breaks documentation generation
(lsegal/yard#1639). This fix has been
submitted upstream (lsegal/yard#1647).

In the meantime, we exclude 0.9.38 from our dependency constraint,
allowing bundler to use 0.9.37 or (once released) 0.9.39+.

This also regenerates the v1.1.0 documentation archive with YARD
0.9.37 to fix the broken docs that were generated with 0.9.38.

Resolves block#1048

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

Co-Authored-By: Claude <noreply@anthropic.com>
carsonclarkemagrab-toast added a commit to carsonclarkemagrab-toast/elasticgraph that referenced this pull request Feb 25, 2026
YARD 0.9.38 has a bug that breaks documentation generation
(lsegal/yard#1639). This fix has been
submitted upstream (lsegal/yard#1647).

In the meantime, we exclude 0.9.38 from our dependency constraint,
allowing bundler to use 0.9.37 or (once released) 0.9.39+.

This also regenerates the v1.1.0 documentation archive with YARD
0.9.37 to fix the broken docs that were generated with 0.9.38.

Resolves block#1048

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

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Class List links generate incorrect relative paths in yard 0.9.38 (static HTML)

1 participant