Fix ultraplan h/l navigation direction in grouped sidebar#695
Merged
Conversation
Navigation used getNavigableInstances() which builds its list in plan-execution order, but the sidebar renders via FlattenGroupsForDisplay which uses group-structure order. These orderings diverge because instances are added to groups in creation order, not plan order. Now navigateToNextInstance() uses getInstanceDisplayOrder() (the same ordering the sidebar renders) filtered to the navigable instance set, ensuring h/l move in the direction the user visually expects. Also fixes: - handlePlanFileCheckResult silently swallowing SetPlan errors, leaving users stuck in a dead session - Removes dead SelectedNavIdx field from ultraplan state - Updates getNavigableInstances doc comment to reflect its reduced role as a membership set provider
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.
Summary
getNavigableInstances) while the sidebar rendered in group-structure order (FlattenGroupsForDisplay), causing the two to diverge. Navigation now follows the visual display order filtered to navigable instances.handlePlanFileCheckResultwas silently swallowingSetPlanerrors, leaving users stuck in a session that would never progress. Now sets an error message and transitions toPhaseFailed.SelectedNavIdxfield from ultraplan state (written but never read).getNavigableInstancesdoc comment to reflect its reduced role as a membership set provider (ordering now comes fromgetInstanceDisplayOrder).Test plan
go build ./...passesgo vet ./...passesgofmt -d .shows no outputgo test -race ./internal/tui/... -count=1passes (all 13 packages)lmoves down visually andhmoves up