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
8 changes: 4 additions & 4 deletions apps/desktop/src/state/appState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type SettingsSection =
| "keyboard"
| "usage"
| "statistics"
| "advanced"
| "diagnostics"
| "about";

Expand All @@ -80,19 +79,20 @@ export const SETTINGS_SECTIONS: readonly SettingsSection[] = [
"outside",
"usage",
"statistics",
"advanced",
"diagnostics",
"about",
];

/**
* What an older build's section id opens: the Harnesses page keeps its old
* `agents` id, so a stored `harnesses` opens it, and Engine became Advanced.
* `agents` id, so a stored `harnesses` opens it, and Engine and later Advanced became part of
* Diagnostics.
* An id no build knows opens General.
*/
const LEGACY_SECTIONS: Record<string, SettingsSection> = {
harnesses: "agents",
engine: "advanced",
engine: "diagnostics",
advanced: "diagnostics",
};

/** A section id as the panel shows it, with the fallbacks a stored old one needs. */
Expand Down
5 changes: 2 additions & 3 deletions apps/desktop/src/state/settingsRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const SECTION_KIND: Record<SettingsSection, SettingKind> = {
keyboard: "app",
usage: "app",
statistics: "app",
advanced: "server",
diagnostics: "machine",
about: "app",
};
Expand Down Expand Up @@ -85,8 +84,8 @@ const ROW_KINDS: { section: SettingsSection; title: string; kind: SettingKind }[
{ section: "remote", title: "Gateway address", kind: "machine" },
{ section: "machines", title: "Machines", kind: "machine" },
// Advanced's telemetry switches are kept by each server.
{ section: "advanced", title: "Provider request bodies", kind: "server" },
{ section: "advanced", title: "Harness messages", kind: "server" },
{ section: "diagnostics", title: "Provider request bodies", kind: "server" },
{ section: "diagnostics", title: "Harness messages", kind: "server" },
];

const ROW_INDEX = new Map(ROW_KINDS.map((row) => [`${row.section}\u0000${row.title}`, row.kind]));
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/state/updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ interface UpdatesState {
skipped: string | null;
/** Install a newer release on this channel by itself once no thread is working. */
autoInstall: boolean;
/** Why the last check failed, for Settings › Advanced; null after a good check. */
/** Why the last check failed, for Settings › About; null after a good check. */
error: string | null;
checkedAt: number | null;
install: UpdateInstall;
Expand Down Expand Up @@ -284,7 +284,7 @@ let retryDelay = RETRY_FIRST_MS;

let checking: Promise<void> | null = null;

/** Check now: on launch, on the interval, when the app comes back, and from Settings › Advanced. */
/** Check now: on launch, on the interval, when the app comes back, and from Settings › About. */
export function checkNow(): Promise<void> {
// One check at a time: a second caller waits for the one already running.
checking ??= runCheck().finally(() => {
Expand Down Expand Up @@ -721,7 +721,7 @@ export function closeWhatsNew() {
useUpdates.setState({ whatsNew: null });
}

/** What's New for the running version on demand (Settings › Advanced). */
/** What's New for the running version on demand (Settings › About). */
export async function showWhatsNew(version: string) {
useUpdates.setState({ whatsNew: { version, notes: null, state: "loading" } });
await loadNotes(version);
Expand Down
3 changes: 1 addition & 2 deletions apps/desktop/src/ui/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ const SETTINGS: Record<SettingsSection, string> = {
keyboard: "Keyboard",
usage: "Usage",
statistics: "Statistics: recorded tokens and reported cost",
advanced: "Advanced: request bodies and setup",
diagnostics: "Diagnostics: server status, logs and debug report",
diagnostics: "Diagnostics: server status, logs, debug report, request bodies and setup",
about: "About",
};

Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/src/ui/DiagnosticsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { useClock } from "../lib/useNow";
import { engineDetail } from "../state/engine";
import { errorText, request, restartEngine, SERVER_LOG_LINES, toast, useApp } from "../state/store";
import { cx, noTextHelpers, rowInset, Tooltip } from "./primitives";
import { CaptureAndSetupGroups } from "./SettingsAbout";
import {
Action,
ErrorDetails,
Expand Down Expand Up @@ -386,6 +387,7 @@ export function DiagnosticsPage() {
</Group>

<ThreadLogGroup />
<CaptureAndSetupGroups />
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/Onboarding.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// First-run onboarding (and Settings › Advanced › Set up again): pick the
// First-run onboarding (and Settings › Diagnostics › Run setup): pick the
// harnesses to use, sign in with each one's own login, test it, then choose
// the default harness, model and effort for new threads.

Expand Down
5 changes: 1 addition & 4 deletions apps/desktop/src/ui/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,11 @@ import {
ShieldCheck,
Smartphone,
Stethoscope,
TerminalSquare,
X,
} from "./icons";
import { HEADER_HEIGHT, SidebarCluster } from "./MainHeader";
import { RestartToApply } from "./RestartToApply";
import { AboutPage, AdvancedPage, STATUS_READ_MS } from "./SettingsAbout";
import { AboutPage, STATUS_READ_MS } from "./SettingsAbout";
import { AppearancePage } from "./SettingsAppearance";
import { OrchestrationPage } from "./SettingsOrchestration";
import { useLightsInset } from "./Titlebar";
Expand Down Expand Up @@ -189,7 +188,6 @@ const NAV: { heading?: string; pages: Page[] }[] = [
{
heading: "System",
pages: [
{ id: "advanced", label: "Advanced", icon: TerminalSquare },
{ id: "diagnostics", label: "Diagnostics", icon: Stethoscope },
{ id: "about", label: "About", icon: Info },
],
Expand Down Expand Up @@ -1186,7 +1184,6 @@ export function SettingsPage() {
{section === "keyboard" && <ShortcutsPage />}
{section === "usage" && <UsagePage />}
{section === "statistics" && <StatisticsPage />}
{section === "advanced" && <AdvancedPage />}
{section === "diagnostics" && <DiagnosticsPage />}
{section === "about" && <AboutPage />}
</Suspense>
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/src/ui/SettingsAbout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ function RecordRequestBodiesGroup() {
);
}

export function AdvancedPage() {
/** Diagnostics' last groups: recording request bodies, and running agent setup again. */
export function CaptureAndSetupGroups() {
return (
<>
<RecordRequestBodiesGroup />
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/ui/SettingsOrchestration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function OrchestrationGroup() {
{pending && <RestartToApply />}
</Group>
<Group
title="Delegation"
title="Delegate limits"
disabled={!orchestrationValue}
footer={
orchestrationValue
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/src/ui/paletteSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const PAGE_NAMES: Record<SettingsSection, string> = {
outside: "Outside agents",
usage: "Usage",
statistics: "Statistics",
advanced: "Advanced",
diagnostics: "Diagnostics",
about: "About",
};
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/src/ui/settingsIndex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ describe("settings search", () => {
// The Harnesses page kept its old `agents` id and Engine became Advanced;
// nothing else moved.
expect(settingsSection("harnesses")).toBe("agents");
expect(settingsSection("engine")).toBe("advanced");
expect(settingsSection("engine")).toBe("diagnostics");
expect(settingsSection("advanced")).toBe("diagnostics");
expect(settingsSection("usage")).toBe("usage");
expect(settingsSection("orchestration")).toBe("orchestration");
expect(settingsSection("voice")).toBe("voice");
Expand Down
9 changes: 4 additions & 5 deletions apps/desktop/src/ui/settingsIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,24 +472,23 @@ export const SETTINGS_INDEX: SettingEntry[] = [
keywords: "per thread totals delegates subagents children cost tokens",
},

// ------------------------------------------------------------ Advanced
{
section: "advanced",
section: "diagnostics",
title: "Record request bodies",
keywords: "capture payload telemetry privacy redact clip query_data store request body response",
},
{
section: "advanced",
section: "diagnostics",
title: "Provider requests (built-in harness)",
keywords: "capture payload provider request body response redact privacy built-in",
},
{
section: "advanced",
section: "diagnostics",
title: "Harness messages",
keywords: "capture payload harness acp jsonrpc protocol message redact privacy",
},
{
section: "advanced",
section: "diagnostics",
title: "Agent setup",
keywords: "setup onboarding install sign in harness start over run again",
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ does not turn any of this on. Project configuration cannot enable either key:
capturing payloads is a choice about the user's own data, so it is global
only, like skill roots.

The app writes both keys from Settings › Advanced › **Record request bodies**
The app writes both keys from Settings › Diagnostics › **Record request bodies**
through `_rustcode/config/telemetry` / `_rustcode/config/telemetry/set`
(`engine/src/acp/telemetry.rs`), which edits only these two keys and leaves the
rest of `config.toml` as it was. The engine reads them from the config it
Expand Down
4 changes: 2 additions & 2 deletions docs/desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ composer's keys stay outside the table.
`operational_events` in one Markdown block for a GitHub issue, with
tokens, API keys, email addresses and the home folder (`~`) taken out
(`src/lib/diagnostics.ts`); *Save…* writes it where the save panel says.
- **Settings › Advanced › Record request bodies.** The two payload-capture
- **Settings › Diagnostics › Record request bodies.** The two payload-capture
switches (`docs/data-store.md` › Captured payloads), off by default:
*Provider requests (built-in harness)* for the built-in harness's request
bodies, *Harness messages* for each ACP or Codex JSON-RPC message. They are
Expand Down Expand Up @@ -2050,7 +2050,7 @@ a skeleton, and reads either form through `src/lib/releaseNotes.ts`: one badge
per category, GitHub's `by @user in <pull url>` tail as a compact `#N` link,
and the release commit and full-changelog line out of the way. A first install
and a dev build skip
it; Settings › Advanced opens it on demand and shows why the last background check failed. `?updatePreview` in the dev browser
it; Settings › About opens it on demand and shows why the last background check failed. `?updatePreview` in the dev browser
shows both with sample data.

`src-tauri/src/updater.rs` ports the SwiftUI app's `Updater.swift`; Settings ›
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ RUSTCODE_INSTALL_ARTIFACTS=/tmp/rc/art bash ../../scripts/install.sh --bin-dir /

### Updating the app

- macOS: Settings › Advanced › **Check for Updates**, then **Update to X**. The
- macOS: Settings › About › **Check for Updates**, then **Update to X**. The
app downloads the release's app zip, checks it against `SHA256SUMS`, its
code signature and bundle id, then quits, swaps `RustCode.app` and reopens.
It needs write access to the folder the app is in; otherwise the button
Expand Down
2 changes: 1 addition & 1 deletion scripts/comment-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
1 apps/desktop/src/ui/replyActions.test.ts
9 apps/desktop/src/ui/replyActions.ts
5 apps/desktop/src/ui/settingsIndex.test.ts
26 apps/desktop/src/ui/settingsIndex.ts
25 apps/desktop/src/ui/settingsIndex.ts
32 apps/desktop/src/ui/settingsKit.tsx
21 apps/desktop/src/ui/sidebarDrag.tsx
1 apps/desktop/src/ui/syncRows.test.ts
Expand Down
Loading