Visualizer does not navigate directory targets emitted by generated indexes
openwiki visualize does not resolve relative directory targets such as
design/, even though generated index pages emit those targets under their
Directories sections.
src/visualize/graph.ts only extracts link targets that end in .md, so a
directory link produces no graph edge. src/visualize/client.ts applies the
same .md condition before intercepting a rendered link for in-app navigation.
The live visualizer deliberately serves only fixed application routes, so the
unintercepted browser navigation to /design/ returns 404. A static export
contains the visualizer assets and graph data rather than the source wiki tree,
so a served static export also returns 404 for that directory path.
Minimal reproduction
Create this five-page fixture; no generated repository content is required:
fixture/
├── index.md
└── design/
├── index.md
├── visual-design.md
└── systems/
├── index.md
└── nested.mdfixture/index.md:
# Directories
- [design](design/)fixture/design/index.md:
# Files
- [Visual design](visual-design.md)
# Directories
- [systems](systems/)Give visual-design.md and systems/nested.md ordinary relative .md links
to each other and their relevant index.md pages. systems/index.md can link
to nested.md.
In terminal 1, run the live visualizer:
openwiki visualize ./fixture --port 54110 --no-openIn terminal 2:
curl -i http://127.0.0.1:54110/design/Expected: the directory target opens the design/index.md section in the
visualizer and creates a root-to-design graph edge.
Actual: the graph contains the five Markdown nodes and explicit .md edges,
but no root-to-design or design-to-systems edge. The request to /design/
returns 404 Not found.
The same occurs with a static export:
openwiki visualize ./fixture --export /tmp/openwiki-static
python3 -m http.server 54111 --bind 127.0.0.1 --directory /tmp/openwiki-staticIn a separate terminal:
curl -i http://127.0.0.1:54111/design/Environment and source check
- Reproduced with
[email protected]. - At the time of reporting, the
graph.tsandclient.tsblobs are identical between thev0.5.1tag and currentmain(source comparison only; the runtime reproduction above is on 0.5.0):src/visualize/graph.ts(08b31b64348a0a1d48b4414e274cf462d31ad48e)src/visualize/client.ts(d3ee33a10443949b4ce548ad43424409f9222eae)
Suggested behavior
Normalize a relative target ending in / to that directory's index.md
before graph lookup and before client-side in-app navigation. Add coverage for
root-to-directory, nested-directory, explicit-page, and return links in both
live and static visualizer modes. The fixed live-server route set can remain
unchanged because the client can select the resolved graph node without serving
wiki paths over HTTP.
Related issue
This is adjacent to #602, which concerns root-absolute page-body links. This
report concerns relative directory targets ending in / emitted by directory
indexes, so it is not a duplicate.
Source: langchain-ai/openwiki