Skip to content

Fix Story Map links for file-only locations#6

Open
hanley-development wants to merge 3 commits into
riponcm:mainfrom
hanley-development:fix/story-map-location-paths
Open

Fix Story Map links for file-only locations#6
hanley-development wants to merge 3 commits into
riponcm:mainfrom
hanley-development:fix/story-map-location-paths

Conversation

@hanley-development

Copy link
Copy Markdown
Contributor

Summary

Fixes Story Map nodes for events whose location value is a file path without a :line suffix.

Previously, Story Map only linked location values that looked like path/to/file.py:42. Events with locations like src/projectmem/commands/visualize.py could render as disconnected floating event nodes even though the location pointed to a real file.

Changes

  • Adds a small path-detection helper for Story Map location values.
  • Links file-only locations, such as src/projectmem/commands/visualize.py, to their file node.
  • Preserves existing support for file:line locations.
  • Normalizes Windows-style paths like .\src\projectmem\cli.py.
  • Links existing directory locations with a trailing slash, such as tests/.
  • Leaves descriptive/non-path locations unlinked, such as projectmem pre-commit hook.

Verification

  • python -m pytest tests\test_visualize.py -q
  • python -m pytest -q

Notes

This is a visualization-only fix. It does not change how events are recorded or stored; it only improves how existing location values are interpreted when building the Story Map graph.

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.

1 participant