Conversation
The list, card and timeline views all render from `state.filteredRecords`. The graph view read `state.graph` instead, which the generator builds once over the whole collection, so narrowing by status, category, project, author or tag left the graph drawing every record. The header said "2 of 3 records" above a canvas showing three. Filter the graph against the visible records before laying it out. Placeholder nodes, which stand for references to records outside the collection and carry no facets of their own, survive while the record pointing at them does. An empty graph now distinguishes "nothing matches the filters" from "nothing is related".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Pick any facet in the viewer and the graph ignores it. The header updates to
2 of 3 records, the list, cards and timeline all narrow, and the canvas keeps drawing the whole collection.renderListView,renderCardViewandrenderTimelineViewall readstate.filteredRecords.renderGraphViewreadsstate.graph, which the generator builds once over every record and which no filter touches.The fix
Filter the graph against the visible records before the layout runs.
relatedreference to a record outside the collection, so it has no status, category, project or author to filter on and can never match a facet. It survives while the record pointing at it survives, which keeps a dangling reference visible instead of silently dropping it when no filter is active.The empty state also told the wrong story: a filter matching nothing reported
No relationships to display. It now separates that from a collection where nothing is related.Checking it
With two records in one project and a third in another, selecting that project drops the graph from three nodes to two and keeps the edge between the pair. Clearing the filter restores the third.
make checkpasses:cargo fmt --check,cargo clippy -- -D warnings, and the full suite. The change is confined totemplates/app.js, so no Rust test covers it; happy to add coverage if you have a preferred approach for the templates.