Repository navigation
autter dash opens the page for where you are - #107
Merged
Merged
Conversation
`autter dash` opened app.autter.dev/me, which is not a route in the app, so everyone landed on the generic dashboard, even inside a repository. It now opens the current repository's page when its default remote (owner/name) is connected to the organization (--org, else the active one), else the organization dashboard, else (signed out) /dashboard. The repository list comes from ask/status?warm=0, which does not start an index refresh, with a 5 second timeout. New flags: --repo, --org, --no-open, and --json printing url, target, organization, repository, repository_full_name, opened and fallback_reason. `autter ask` without --repo now scopes a new question to the connected repository you are in, and prints the answer's Autter links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; autter ask scopes to the current repo Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
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.
What users saw
autter dashopenedhttps://app.autter.dev/me./meis not a route in the app: it matched:orgSlugwith slugme, found no such org, and redirected to the generic/dashboard. That happened everywhere, including inside a repository that is connected to Autter. The command also rejected every argument, so there was no--json.What they see now
autter dashopens the page for where you are:targetowner/name) is connected to the org/{org}/repositories/{name}repo/{org}org/dashboardhomeWhen it falls back, one line on stderr says why, for example
acme/api is not connected to acme; opening the organization dashboard.New flags:--org <slug>: look in this org instead of the active one. An org the token cannot use is an error.--repo <owner/name|name>: use this repo instead of the current one.--no-open: print the URL to stdout instead of opening a browser.--json: prints{"url","target","organization","repository","repository_full_name","opened","fallback_reason"}.fallback_reasonis null or one ofnot_in_git_repo,no_remote,not_signed_in,repo_not_connected,lookup_failed.autter askwithout--reponow scopes a new question to the repo you are in, when that repo is connected; otherwise the question goes out unscoped, as before. If the API returns the newlinksfield (monorepo PR), the answer ends with an "Open in Autter" list of absolute URLs.How it works
src/commands/personal_dashboard.rs:org_api_context(the same asask):--org, else the token's active org.--repo, elsefind_repository+current_repo_url→owner/name.GET /api/cli/orgs/{slug}/ask/status?warm=0with a 5-second timeout: case-insensitive onfullName, or onnamewhen--repois a bare name.resolve_dash_target, so every branch is unit-tested.Url::path_segments_mut, so slugs and names are encoded and trailing slashes don't double up.src/commands/ask.rs: new questions without--threador--reporeuse the same lookup to defaultrepository. It printslinkswith control characters stripped, and onlyhttps://URLs.docs/system-investigations.mdandCHANGELOG.md([Unreleased]) are updated.Decisions taken
/mepage.dashtargets real routes: the repo page, else/{slug}, else/dashboard.--org) is checked. A repo that belongs to another of your orgs falls back to the active org's dashboard withrepo_not_connected. No new endpoint.?warm=0, which the monorepo PR (Autter-dev/autter-monorepo#756) adds toask/status. Until that deploys, the old API ignores the flag.dashstill works then, but on a single-repo org the status call still starts the (cooldown-limited) warm it always did.Cargo.toml. The coordinator does the release commit.Checks run
cargo check: clean.cargo clippy --lib: no warnings in the changed files.cargo test --lib -- personal_dashboard dashboard_help commands::ask: 13 pass. The new tests cover flag parsing, every target and fallback reason, URL encoding with trailing-slash and staging bases,owner/namefrom https, scp-style andssh://remotes, case-insensitive matching, parsing the status response, and the JSON shape.cargo test --lib -- onboard home: 25 pass.cargo fmton the changed files.Not verified
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.