Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This changelog is automatically generated by AI when releases are published.

## [Unreleased]

## [3.11.0] - 2026-11-15

### Changed

- **`autter dash` opens the page for where you are.** It used to open `app.autter.dev/me`, which is not a page in the app, so everyone landed on the generic dashboard, even inside a repository. It now opens the current repository's page when the repository's default remote (`owner/name`) is connected to your organization (`--org`, else your active one), else the organization dashboard, else (signed out) the app's dashboard. One line on stderr says why when it falls back ("acme/api is not connected to acme; opening the organization dashboard."). New flags: `--repo <owner/name|name>`, `--org <slug>`, `--no-open` (print the URL instead of opening it) and `--json` (`url`, `target`, `organization`, `repository`, `repository_full_name`, `opened`, `fallback_reason`). The repository lookup waits at most 5 seconds and reads the organization's repository list without starting an index refresh (`ask/status?warm=0`); an API without that flag still answers. See [docs/system-investigations.md](docs/system-investigations.md).
- **`autter ask` scopes a new question to the repository you are in.** Without `--repo`, a question asked inside a git repository that is connected to the organization is scoped to it, so the assistant no longer asks which repository you mean. Answers that point at Autter pages end with an "Open in Autter" list of absolute links (from APIs that return them).

## [3.10.1] - 2026-11-15

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"

[package]
name = "autter"
version = "3.10.1"
version = "3.11.0"
edition = "2024"
default-run = "autter"

Expand Down
4 changes: 4 additions & 0 deletions docs/system-investigations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Questions use captured Runtime evidence and source code to explain root causes,

Use `--org <slug>` for another organization you belong to and `--json` for complete structured output. `--mode codebase` and `--mode reviews` select the existing assistants. Resuming with `--thread` restores that thread's mode and repository unless you explicitly specify them; changing its scope requires a new thread.

Without `--repo`, a new question run inside a git repository is scoped to that repository when its default remote (`owner/name`) is connected to the organization; otherwise it goes out unscoped. Answers that point at Autter pages (a pull request, a file at a line, a scan finding, a Runtime issue) end with an **Open in Autter** list of absolute links, and links inside the answer are absolute too.

`autter dash` opens the page for where you are: the current repository's page when it is connected to the organization (`--org`, else your active one), else the organization dashboard, else (signed out) the app's dashboard. `--repo <owner/name|name>` picks the repository, `--no-open` prints the URL instead of opening it, and `--json` prints `{ url, target, organization, repository, repository_full_name, opened, fallback_reason }`, where `target` is `repo`, `org` or `home` and `fallback_reason` is null or one of `not_in_git_repo`, `no_remote`, `not_signed_in`, `repo_not_connected`, `lookup_failed`. The lookup waits at most 5 seconds and reads the repository list without starting an index refresh.

## From a Runtime issue to the code behind it

`autter lineage <issue-id>` prints the chain behind one Runtime issue (its id starts with `ri_`), top to bottom:
Expand Down
24 changes: 18 additions & 6 deletions src/commands/arg_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,12 +666,24 @@ autter sync open
HelpEntry {
name: "dashboard",
aliases: &["dash", "personal-dashboard", "personal_dashboard"],
summary: "Open your personal dashboard in the browser",
summary: "Open the Autter page for this repository in the browser",
body: "\
autter dashboard

Open your personal dashboard in the browser
(https://app.autter.dev/me, or your configured web app URL).",
autter dash [--org <slug>] [--repo <owner/name|name>] [--no-open] [--json]

Open the Autter page for where you are (https://app.autter.dev, or your
configured web app URL):
- inside a git repository connected to your organization: its page
- otherwise: the organization dashboard
- when signed out: the app's dashboard

--org <slug> Look in this organization instead of the active one
--repo <repo> Open this repository (owner/name or name) instead of the
current one
--no-open Print the URL instead of opening a browser
--json Print {url, target, organization, repository,
repository_full_name, opened, fallback_reason}; target is
repo, org or home, fallback_reason one of not_in_git_repo,
no_remote, not_signed_in, repo_not_connected, lookup_failed",
},
HelpEntry {
name: "bg",
Expand Down Expand Up @@ -880,7 +892,7 @@ autter login [--token <token>]
name: "ask",
aliases: &[],
summary: "Investigate your system with Runtime evidence",
body: "autter ask <question> [--repo <name>] [--org <slug>] [--thread <id>] [--mode system|codebase|reviews] [--json]\n\n Get root causes, impact, and recommended fixes. Ask it \"why did this happen\"\n and \"what is the impact\" questions: it answers them from Runtime evidence.\n Questions and answers are saved in the same private thread history as Dashboard Ask. Use --thread to resume.\n Sign in with autter login. Default mode: system.",
body: "autter ask <question> [--repo <name>] [--org <slug>] [--thread <id>] [--mode system|codebase|reviews] [--json]\n\n Get root causes, impact, and recommended fixes. Ask it \"why did this happen\"\n and \"what is the impact\" questions: it answers them from Runtime evidence.\n Questions and answers are saved in the same private thread history as Dashboard Ask. Use --thread to resume.\n Without --repo, a new question asked inside a connected repository is scoped to it.\n Sign in with autter login. Default mode: system.",
},
HelpEntry {
name: "logs",
Expand Down
57 changes: 48 additions & 9 deletions src/commands/ask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,26 @@ pub(crate) fn org_api_context(
Ok((context, slug.to_owned()))
}

/// The current git repository's `owner/name` when it is connected to the
/// organization, so a new question is scoped to the repo you are in. `None`
/// outside a repo, without a remote, for an unconnected repo, or when the
/// lookup fails (the question then goes out unscoped, as before).
fn current_connected_repository(context: &ApiContext, slug: &str) -> Option<String> {
use crate::commands::personal_dashboard::{
current_repository_candidate, fetch_connected_repositories, match_repository,
};
let wanted = current_repository_candidate().ok()?;
let repos = fetch_connected_repositories(&context.clone().with_timeout(5), slug)?;
match_repository(&wanted, &repos).map(|repo| repo.full_name)
}

/// Strip terminal control sequences, keeping newlines and tabs.
fn printable(text: &str) -> String {
text.chars()
.filter(|c| !c.is_control() || *c == '\n' || *c == '\t')
.collect()
}

pub(crate) fn component(value: &str) -> String {
url::form_urlencoded::byte_serialize(value.as_bytes()).collect()
}
Expand All @@ -267,6 +287,8 @@ fn run(command: &str, mut options: Options) -> Result<(), AutterError> {
if options.mode.is_none() {
options.mode = thread["mode"].as_str().map(str::to_owned);
}
} else if options.repository.is_none() {
options.repository = current_connected_repository(&context, &slug);
}
response_json(context.post_json(&format!("{base}/chat"), &json!({ "question": options.words.join(" "), "repository": options.repository, "mode": options.mode.unwrap_or_else(|| "system".into()), "threadId": options.thread, "format": "json" }))?)?
}
Expand Down Expand Up @@ -310,15 +332,32 @@ fn run(command: &str, mut options: Options) -> Result<(), AutterError> {
match command {
"ask" => {
// Preserve newlines in prose while stripping terminal control sequences.
println!(
"{}",
result["answer"]
.as_str()
.unwrap_or("")
.chars()
.filter(|c| !c.is_control() || *c == '\n' || *c == '\t')
.collect::<String>()
);
println!("{}", printable(result["answer"].as_str().unwrap_or("")));
// Pages the answer points at, as absolute URLs (newer APIs only).
let links: Vec<(String, String)> = result["links"]
.as_array()
.map(|links| {
links
.iter()
.filter_map(|link| {
let url = link["url"].as_str()?;
url.starts_with("https://").then(|| {
(
printable(link["label"].as_str().unwrap_or(url))
.replace('\n', " "),
printable(url),
)
})
})
.collect()
})
.unwrap_or_default();
if !links.is_empty() {
println!("\nOpen in Autter:");
for (label, url) in links {
println!(" {label}: {url}");
}
}
if !arg_parser::quiet() {
println!("\nThread: {}", result["threadId"].as_str().unwrap_or(""));
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/onboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ fn render_finished(connected: bool, report: &SetupReport, caps: &TermCaps) -> St
));
out.push_str(&command("autter log", "git log with AI authorship stats"));
if connected {
out.push_str(&command("autter dash", "open your personal dashboard"));
out.push_str(&command("autter dash", "open this repository in Autter"));
}
out.push('\n');
out.push_str(&format!(
Expand Down
Loading
Loading