Repository navigation
Shorten launch-to-route: auto-location, a swap button, one startup fetch - #64
Open
mogglemoss wants to merge 2 commits into
Open
mogglemoss wants to merge 2 commits into
mogglemoss wants to merge 2 commits into
Conversation
A returning user's flow was: launch, log in, click Player location, click Fetch Mappers, then type a destination and Find path — two of those steps are things the app can do itself, and going there-and-back meant retyping both systems. - After a successful login the pilot's location is fetched and fills Source. It never overwrites a source the user already typed, and a failure (pilot offline, ESI error) is silent rather than a dialog — the manual Player location button still reports failures as before. - A Swap ⇅ button sits in the empty grid cell between Player location and Find path and exchanges Source and Destination. Added in gui_main.ui and regenerated with generate_gui.sh's command. - When mappers are configured, one fetch runs a second after launch. This is a single fetch per launch, not a recurring refresh, so no extra load on mapper servers while the app sits idle. Tests drive the handlers on a stand-in object (no settings, database or network) and check the generated window has the button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh install's default config enables Tripwire with no account, so the startup fetch added in this PR would build a Tripwire source on first launch. Tripwire logs in from its constructor, so that sends a blank-credential login to tripwire.eve-apps.com, a pointless request to someone else's server, and opens the app on an error. - mapper_config.is_configured() decides from the config alone whether a mapper has what it needs, mirroring each mapper's validate_config(). It can't build the source to ask, because building a Tripwire source is itself the login request. - The startup fetch is scheduled, and runs, only when at least one enabled mapper is set up. - Navigation.setup_mappers() skips mappers that aren't set up, so a manual fetch never sends a blank login either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Three small behaviors that cut the steps between opening Short Circuit and getting a route: the pilot's location fills Source after login, a Swap ⇅ button exchanges Source and Destination, and one mapper fetch runs at launch when mappers are configured.
Context
A returning user's flow today is: launch → log in → click Player location → click Fetch Mappers → type a destination → Find path. Two of those clicks are things the app can do on its own, and a there-and-back trip means retyping both systems.
Approach
Swap ⇅button in the empty grid cell between Player location and Find path. Added ingui_main.uiand regenerated with the command fromgenerate_gui.sh. The only other change ingui_main.pyis the uic version line in its header.Trade-offs
The startup fetch is the one policy call here: it's one request to each enabled mapper per launch. It deliberately isn't a recurring refresh, so an idle app never polls mapper servers. If you'd rather keep fetching purely manual, it's a self-contained block in
__init__and I'm happy to drop it from the PR.Testing
test_launch_flow.pydrive the handlers on a stand-in object (no settings, database or network): login fills an empty Source, a failed login doesn't fetch, a typed Source is never overwritten, the automatic path stays silent on failure while the manual button still reports it, a manual fetch does overwrite, swap exchanges the fields, the startup fetch skips when one is already running, and the generated window has the button.Risks
Low: additive behavior, no changes to routing, mappers or auth.
🤖 Generated with Claude Code