Skip to content

autter dash opens the page for where you are - #107

Merged
sagnik11 merged 2 commits into
mainfrom
feat/dash-deep-link
Nov 15, 2026
Merged

sagnik11 merged 2 commits into
mainfrom
feat/dash-deep-link

Conversation

@sagnik11

@sagnik11 sagnik11 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What users saw

autter dash opened https://app.autter.dev/me. /me is not a route in the app: it matched :orgSlug with slug me, 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 dash opens the page for where you are:

Situation Opens target
Inside a git repo whose default remote (owner/name) is connected to the org /{org}/repositories/{name} repo
Signed in, but not in a repo, no remote, repo not connected, or lookup failed /{org} org
Not signed in /dashboard home

When 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_reason is null or one of not_in_git_repo, no_remote, not_signed_in, repo_not_connected, lookup_failed.

autter ask without --repo now 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 new links field (monorepo PR), the answer ends with an "Open in Autter" list of absolute URLs.

How it works

  • src/commands/personal_dashboard.rs:
    • The org comes from org_api_context (the same as ask): --org, else the token's active org.
    • The candidate repo comes from --repo, else find_repository + current_repo_url → owner/name.
    • The repo is matched against GET /api/cli/orgs/{slug}/ask/status?warm=0 with a 5-second timeout: case-insensitive on fullName, or on name when --repo is a bare name.
    • The decision is a pure function, resolve_dash_target, so every branch is unit-tested.
    • URLs are built with Url::path_segments_mut, so slugs and names are encoded and trailing slashes don't double up.
  • src/commands/ask.rs: new questions without --thread or --repo reuse the same lookup to default repository. It prints links with control characters stripped, and only https:// URLs.
  • Help text, the onboarding hint, docs/system-investigations.md and CHANGELOG.md ([Unreleased]) are updated.

Decisions taken

  • No /me page. dash targets real routes: the repo page, else /{slug}, else /dashboard.
  • Only the active org (or --org) is checked. A repo that belongs to another of your orgs falls back to the active org's dashboard with repo_not_connected. No new endpoint.
  • No index-warm side effect: the lookup sends ?warm=0, which the monorepo PR (Autter-dev/autter-monorepo#756) adds to ask/status. Until that deploys, the old API ignores the flag. dash still works then, but on a single-repo org the status call still starts the (cooldown-limited) warm it always did.
  • No version bump in 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/name from https, scp-style and ssh:// remotes, case-insensitive matching, parsing the status response, and the JSON shape.
  • cargo test --lib -- onboard home: 25 pass.
  • cargo fmt on the changed files.

Not verified

  • No end-to-end run against a live API or a stub server. The plan's integration test (temp repo + stub API) was not written; the network call is a thin wrapper around the unit-tested pure functions.
  • I did not try opening a browser on Linux or Windows; that code is unchanged.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

sagnik11 and others added 2 commits November 15, 2026 17:06
`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>
@blacksmith-sh

This comment has been minimized.

@sagnik11
sagnik11 merged commit 4ac3c1f into main Nov 15, 2026
10 of 12 checks passed
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