Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6890684
feat(desktop): show project copies and worktrees
roodboi Nov 23, 2026
0dac496
fix(desktop): explain failed project copies reads
roodboi Nov 23, 2026
d0a5e5c
feat(desktop): add project Config and versioned patch commands
roodboi Nov 23, 2026
ab328d6
fix(desktop): show Config save feedback and capture native frames
roodboi Nov 23, 2026
2b178e0
fix(config): list local-only overlays and keep one Logs surface
roodboi Nov 23, 2026
399d3d8
fix(config): address checkout, save, and redaction review findings
roodboi Nov 23, 2026
95bf5c7
fix(config): keep env migration and Compose edits consistent
roodboi Nov 23, 2026
d13a6e8
fix(config): journal legacy env writes and preserve CLI drafts
roodboi Nov 23, 2026
dd78f49
feat(desktop): share the Ghostty command drawer (HACK-2596) (#1166)
roodboi Nov 23, 2026
f9aa79c
feat(desktop): browse files in Compose services (#1167)
roodboi Nov 23, 2026
e41a8ce
fix(config): validate without secret access and reconcile migration s…
roodboi Nov 23, 2026
5ad5e1a
merge: update Config to the shared desktop command drawer
roodboi Nov 23, 2026
56ab91f
fix(desktop): use Merino Dark and fresh drawer status
roodboi Nov 23, 2026
1f88213
fix(config): recover initial saves and check the shared init drawer
roodboi Nov 23, 2026
9824ad5
fix(config): align legacy preflight with migration publication
roodboi Nov 23, 2026
31239d4
docs(desktop): refresh native command drawer captures
roodboi Nov 23, 2026
0fb3d68
fix(config): share migration planning with validation
roodboi Nov 23, 2026
67bf732
fix(desktop): keep selected terminal matches readable
roodboi Nov 23, 2026
f10f781
fix(config): plan env migration against pending inheritance
roodboi Nov 23, 2026
d3dab27
test(desktop): refresh drawer captures and verify selection contrast
roodboi Nov 23, 2026
170da0b
fix(config): accept Compose includes and interpolated port pairs
roodboi Nov 23, 2026
8e5e14c
fix(config): validate Compose include fields and port splits
roodboi Nov 23, 2026
a145b06
fix(config): recognize interpolated Compose host boundaries
roodboi Nov 23, 2026
0341260
style(desktop): format Config drawer integration
roodboi Nov 23, 2026
957023e
test(config): use bounded Git fixture commands
roodboi Nov 23, 2026
0d45aae
test(config): pin missing checkout responses
roodboi Nov 23, 2026
60bc533
docs(config): register env and machine output contracts
roodboi Nov 23, 2026
8420372
docs(config): clarify patch validation mode selection
roodboi Nov 23, 2026
8551ce7
Merge Merino Dark command drawer into Config
roodboi Nov 23, 2026
cf1829f
fix(desktop): align Config actions and refresh Merino captures
roodboi Nov 23, 2026
80b95e0
fix(desktop): match Config snapshot logs default
roodboi Nov 23, 2026
f76d1ee
fix(config): show the resolved project default overlay
roodboi Nov 23, 2026
a628bba
fix(config): support legacy overlay aliases in older reports
roodboi Nov 23, 2026
8d3b136
fix(config): redact private default overlay metadata
roodboi Nov 23, 2026
f58c12f
fix(config): keep shadowed private overlays out of discovery
roodboi Nov 23, 2026
97b5358
fix(config): protect private overlay aliases and filenames
roodboi Nov 23, 2026
9e116fd
fix(config): keep overlay previews and migration receipts private
roodboi Nov 23, 2026
d9512b5
fix(config): preserve private overlay names during legacy migration
roodboi Nov 23, 2026
a9c2171
fix(config): preserve overlay redaction through migration recovery
roodboi Nov 23, 2026
87f4def
fix(env): preflight private overlay paths before migration
roodboi Nov 23, 2026
f9ffa2b
fix(env): keep private overlay references redacted during migration
roodboi Nov 23, 2026
7283fa8
fix(config): clarify private overlay migration conflicts
roodboi Nov 23, 2026
01a0289
fix(desktop): resolve worktree aliases in Config toggles
roodboi Nov 23, 2026
c9062e6
fix(desktop): stage explicit empty Config env values
roodboi Nov 23, 2026
9fbee34
Merge remote-tracking branch 'origin/next' into kit/hack-2595-config
roodboi Nov 24, 2026
3f2ac57
fix(desktop): update Config branch Doctor fixture after merge
roodboi Nov 24, 2026
bc8671f
Merge remote-tracking branch 'origin/next' into kit/hack-2595-config
roodboi Nov 24, 2026
7b222ad
fix(config): redact credential-bearing Compose dependencies
roodboi Nov 24, 2026
6439b24
Merge remote-tracking branch 'origin/next' into kit/hack-2595-config
roodboi Nov 24, 2026
f8c10e8
fix(config): redact private Compose service names in reports
roodboi Nov 24, 2026
1527653
fix(config): keep private map keys out of editor reports
roodboi Nov 24, 2026
ca649dc
fix(config): redact recognized plaintext tokens in env reports
roodboi Nov 24, 2026
6b121bd
fix(config): redact credential-bearing Caddy sites
roodboi Nov 24, 2026
b67aea6
Merge origin/next into kit/hack-2595-config
roodboi Nov 24, 2026
f2f2e1c
fix(desktop): count the merged fixture set
roodboi Nov 24, 2026
e417518
fix(config): redact credentials from diagnostics and env identifiers
roodboi Nov 24, 2026
b8ceb9d
fix(config): hide credential-bearing env overlay names
roodboi Nov 24, 2026
1dd01b6
Merge origin/next into kit/hack-2595-config
roodboi Nov 24, 2026
4b8a9bc
fix(desktop): update the rendered Doctor fixture for pool status
roodboi Nov 24, 2026
01b9aea
fix(config): redact scalar OAuth data in legacy reports
roodboi Nov 24, 2026
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
2 changes: 2 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ e069b8546c112e5b5c8ab0ec82fd24a4f19ef16b:.hack/tickets/events/events-2026-03.jso
0cb0ff2316b05e833119aeae9cc73a0a14329aeb:tests/feedback-review.test.ts:private-key:112
06f262309db3111e65c8a23324456ef73ac57e83:tests/project-env-hydrate.test.ts:generic-api-key:389
aeca3e02e464ef11dd72531aa8313045bd8561f5:tests/background-command-scanner.test.ts:generic-api-key:172
# Synthetic authorization-header redaction canary in Config CLI regression history.
399d3d89c685343e0afc0efe36559443677f5168:tests/config-editor-cli.test.ts:curl-auth-header:457
1 change: 1 addition & 0 deletions apps/desktop/Cargo.lock

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

37 changes: 17 additions & 20 deletions apps/desktop/DESIGN-V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ Detail content is inset 20 left and right; the sidebar list 6.

## Colour

The dark desktop palette uses Merino Dark from the HACK-2595 frames.

| Token | Light | Dark | Used for |
|---|---|---|---|
| `surface` | `#FFFFFF` | `#0D1117` | Detail pane |
| `chrome` | `#F7F7F5` | `#090C10` | Title bar, sidebar, status bar |
| `window` | `#FFFFFF` | `#090C10` | Window background outside Projects, native dark title bar |
| `surface` | `#FFFFFF` | `#0D1117` | Cards and controls |
| `chrome` | `#F7F7F5` | `#06080A` | Title bar, sidebar, status bar |
| `raised` | `#EFEFEC` | `#1C2026` | Menus and tooltips |
| `selection` | `#EFEFEC` | `#24272B` | Selected navigation, tabs, selected file row in dark mode |
| `attention` | `#EFEFEC` | `#21252B` | Running command box |
| `surface_1` | `#EFEFEC` | `#1A1E24` | Hover, panel handle, neutral pill |
| `surface_2` | `#E6E6E2` | `#1C2026` | Pressed and raised surfaces, selected file row in light mode |
| `selection` | `#EFEFEC` | `#24272B` | Selected navigation, selected file row in dark mode |
| `preview_surface` | `#EFEFEC` | `#1E2329` | Read-only file preview body |
| `border` | black 9% | `#2B3036` | Hairlines |
| `border_strong` | black 18% | `#2B3036` | Button and field outlines |
Expand All @@ -106,6 +107,10 @@ The dark desktop palette uses Merino Dark from the HACK-2595 frames.
| `text_muted` | `#8B8A85` | `#8B9197` | Captions, table header, timestamps |
| `accent` | `#2F6FDB` | `#E6EDF3` | Switch on, focus ring |

The dark palette is Merino Dark. GPUI components such as the search field,
tooltips and scrollbars use the same palette. The Projects pane uses its own
Builtin Light and Merino Dark accents for the tree and copy pane.

State colours (dot / pill background / pill text):

| State | Light | Dark | Shown as |
Expand Down Expand Up @@ -278,21 +283,13 @@ above the strip when the panel is docked, below it when maximized.

Closing a tab, or the window, ends that tab's whole process session.

Terminal look: the user's Ghostty config when it exists (font family and
size, theme or palette, cursor style, padding), mapped onto the component.
Without one, the fallback terminal theme (`TermPalette::fallback`), dark in
both app modes as in the approved mockup, 12.5 / 19 in the app's mono font:

| Token | Value | | Token | Value |
|---|---|---|---|---|
| `bg` | `#1C1C1A` | | `green` | `#5DCAA5` |
| `fg`, `cursor` | `#E8E6DC` | | `bright_green` | `#97C459` |
| `dim` | `#8B8A85` | | `blue` | `#85B7EB` |
| `strip` | `#2A2A28` | | `magenta` | `#AFA9EC` |
| `strip_border` | `#3A3A37` | | `yellow` | `#EF9F27` |
| `tab_fg` | `#B4B2A9` | | `red` | `#F07B7A` |
| `badge_warn_bg` / `_fg` | `#633806` / `#FAC775` | | `cyan` | `#6CCFD9` |
| `badge_bg` / `_fg` | `#3A3A37` / `#D3D1C7` | | | |
Terminal look: the user's Ghostty config overrides the terminal's default
font, padding, palette, foreground, background, cursor and selection settings
where provided. In dark mode the grid defaults to Merino Dark, with
`#0D1117` background, `#E6EDF3` foreground and `#2F81F7` cursor. The terminal
panel chrome uses the app palette. Its controls never inherit the user's
Ghostty colors. The light grid follows the light GPUI theme by default.


Prompt themes (zsh, oh-my-zsh, starship) come from the real shell in a
real PTY (`TERM`, `COLORTERM=truecolor`); tmux is not involved.
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ run from a banner. Use `command_control::render_history` when a passing check
removes its Run and Copy buttons. Closing the drawer retains the latest output until
the next command starts or the CLI changes.

While Setup is visible, the `hackd` and Routing and DNS sidebar indicators use
the same evidence as the Setup cards. Skipping a card leaves its evidence
intact. Elsewhere, the DNS indicator uses the latest current Setup or Doctor
report, ordered by when each check started. A Doctor result for an old project
set cannot replace a current check.

Source: `hack doctor --json --path <root>` per registered project, plus
`hack doctor --machine --json` for machine findings, on open and every 10
minutes while visible. The project audit gives `{ok:true,data:{schema:1,checks,summary,counts}}`; the machine variant uses the same envelope with `data.schema: "hack.doctor.machine.v1"` (R7c). Checks include `id`, `status`, `detail`, `area`, `scope` and `fix` (R7a). Until the app switches to the machine variant, it still runs one plain `hack doctor --json` outside any project and de-duplicates machine checks.
Expand Down
17 changes: 17 additions & 0 deletions apps/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,23 @@ Screenshots: [overlays, running](screenshots/env-running-light.png),
[required missing](screenshots/env-missing-light.png),
[long](screenshots/env-long-dark.png).

## Project Config

Select Config on a Compose project. Map shows how its routes, dependencies
and env values resolve. Viewing as and Env select one checkout and overlay.
Edit, Env layers and Source share a pending patch. Save validates and writes
the selected files. A file changed by another editor shows Reload in the
save dock. Route changes offer a restart and env-only changes apply at the
next start. The Worktrees toggles show the effective branch and inheritance
settings, including camelCase keys in existing project files.
To override an inherited Env layers value with an empty string, open the
target cell, clear the input, and press Enter.

The native screenshot harness uses synthetic projects and values. Build with
`bash scripts/build.sh --features screenshots`, then run
`target/debug/hack-desktop --config-screenshots <dir>` for the light and dark
Config frames.

## Process-cleanup tests

The supported desktop test command uses the repository-pinned nextest release
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ screenshots = ["gpui-kit/test-support", "dep:image", "hack-desktop-ui/screenshot
terminal = ["dep:hack-desktop-term", "hack-desktop-term/ghostty"]

[dependencies]
serde_json.workspace = true
hack-desktop-core.workspace = true
hack-desktop-ui.workspace = true
hack-desktop-term = { workspace = true, optional = true }
Expand Down
39 changes: 33 additions & 6 deletions apps/desktop/app/src/command_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub(crate) struct CommandCompletion {
}

type OnExit = Box<dyn FnOnce(&mut HackApp, CommandCompletion, &mut Context<HackApp>)>;
type ResolveDirectory = fn(&CommandControl, &CommandSpec) -> Result<Option<PathBuf>, String>;

#[derive(Default)]
pub(crate) struct Drawer {
Expand Down Expand Up @@ -74,6 +75,7 @@ struct Run {
id: CommandRunId,
props: CommandControl,
spec: CommandSpec,
resolve_directory: ResolveDirectory,
phase: Phase,
waiting_for_password: bool,
fallback: Option<String>,
Expand Down Expand Up @@ -140,6 +142,16 @@ fn command_directory(
Ok(checked_home(spec).map(Path::to_owned))
}

fn init_directory(props: &CommandControl, _: &CommandSpec) -> Result<Option<PathBuf>, String> {
let root = props.cwd.as_deref().ok_or("The checkout is unavailable.")?;
hack_desktop_core::source::trusted_init_root(root)
.map(Some)
.map_err(|error| match error {
hack_desktop_core::source::SourceError::Cli { message, .. } => message,
_ => "The checkout is unavailable.".into(),
})
}

fn command_options(spec: &CommandSpec, cwd: Option<PathBuf>) -> Result<PtyOptions, String> {
if !Path::new(&spec.program).is_absolute() {
return Err("The command must use an absolute executable path".into());
Expand Down Expand Up @@ -220,13 +232,26 @@ impl HackApp {
if !self.live {
return false;
}
self.start_drawer_command(props, Box::new(on_exit), window, cx)
self.start_drawer_command(props, Box::new(on_exit), command_directory, window, cx)
}

pub(crate) fn run_init_in_drawer(
&mut self,
props: CommandControl,
on_exit: impl FnOnce(&mut Self, CommandCompletion, &mut Context<Self>) + 'static,
window: &mut Window,
cx: &mut Context<Self>,
) {
if self.live {
self.start_drawer_command(props, Box::new(on_exit), init_directory, window, cx);
}
}

fn start_drawer_command(
&mut self,
props: CommandControl,
on_exit: OnExit,
resolve_directory: ResolveDirectory,
window: &mut Window,
cx: &mut Context<Self>,
) -> bool {
Expand All @@ -238,7 +263,7 @@ impl HackApp {
};
self.user_navigated();
let spec = spec.clone();
let directory = command_directory(&props, &spec);
let directory = resolve_directory(&props, &spec);
let core = directory
.clone()
.and_then(|cwd| command_core(&props, &spec, cwd));
Expand All @@ -252,6 +277,7 @@ impl HackApp {
id,
props,
spec,
resolve_directory,
phase: Phase::Running,
waiting_for_password: false,
fallback: None,
Expand Down Expand Up @@ -557,6 +583,7 @@ impl HackApp {
let id = run.id;
let spec = run.spec.clone();
let props = run.props.clone();
let resolve_directory = run.resolve_directory;
cx.spawn(async move |app, cx| {
let result = cx
.background_executor()
Expand All @@ -566,7 +593,7 @@ impl HackApp {
} else {
Platform::Linux
};
let cwd = command_directory(&props, &spec)?;
let cwd = resolve_directory(&props, &spec)?;
Script::create_in(&std::env::temp_dir(), &spec, cwd.as_deref())?.open(
platform,
linux_adapter().as_deref(),
Expand Down Expand Up @@ -758,7 +785,7 @@ pub(crate) fn render_with_run(
.px(px(8.))
.rounded(radius::PANEL)
.hairline(p.border)
.when(running, |r| r.bg(p.surface_1))
.when(running, |r| r.bg(p.attention))
.child(command)
})
.child(run)
Expand Down Expand Up @@ -1128,7 +1155,7 @@ fn command_menu(
.shadow_lg()
.rounded(radius::PANEL)
.hairline(p.border)
.bg(p.surface_1)
.bg(p.raised)
.type_step(text::SMALL)
.on_mouse_down_out(cx.listener(|app, _, _, cx| {
if app.panels.command.menu {
Expand Down Expand Up @@ -1174,7 +1201,7 @@ fn command_menu(

#[cfg(feature = "screenshots")]
#[path = "command_screenshots.rs"]
mod screenshots;
pub(crate) mod screenshots;
#[cfg(feature = "screenshots")]
pub(crate) use screenshots::capture;

Expand Down
52 changes: 47 additions & 5 deletions apps/desktop/app/src/command_screenshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub(crate) fn capture(dir: &Path, cx: &mut HeadlessAppContext) {

fn fixture(index: usize, window: &mut Window, cx: &mut Context<HackApp>) -> HackApp {
let mut app = HackApp::new(crate::source_for(Some(Fixture::Empty)), false, window, cx);
app.use_default_terminal_look();
let daemon = index == 0;
let id = if daemon { "daemon" } else { "routing" };
let mut report = setup_fixtures::load("partial").expect("setup fixture");
Expand Down Expand Up @@ -141,8 +142,11 @@ fn fixture(index: usize, window: &mut Window, cx: &mut Context<HackApp>) -> Hack
.expect("fixture card");
card.status = Status::Passed;
card.detail = "All 8 DNS pieces are set up.".into();
app.show_setup_now(checked);
app.command_checked(completion.run, Ok(()), cx);
// Deliver a synthetic fresh check through the actual Setup
// completion path used by the command control.
let generation = app.setup.begin();
app.setup_command_check = Some((completion.run, id.into()));
app.setup_checked(generation, checked, cx);
}
},
window,
Expand Down Expand Up @@ -199,18 +203,18 @@ fn wait_for_frame(index: usize, app: &Entity<HackApp>, cx: &mut HeadlessAppConte
}

#[cfg(test)]
mod tests {
pub(crate) mod tests {
use super::*;
use gpui_kit::AnyWindowHandle;
use std::sync::Arc;

fn open(index: usize) -> (HeadlessAppContext, AnyWindowHandle, Entity<HackApp>) {
pub(crate) fn open(index: usize) -> (HeadlessAppContext, AnyWindowHandle, Entity<HackApp>) {
let mut cx = HeadlessAppContext::with_platform(
Arc::new(gpui_kit::NoopTextSystem::new()),
Arc::new(hack_desktop_ui::icons::Assets),
|| Ok(None),
);
cx.update(gpui_kit::init);
cx.update(hack_desktop_ui::tokens::init);
let (window, app) = cx
.update(|cx| {
gpui_kit::open_window(
Expand All @@ -228,6 +232,44 @@ mod tests {
(cx, window, app)
}

pub(crate) fn assert_rendered_status(
cx: &mut HeadlessAppContext,
window: AnyWindowHandle,
id: &str,
sidebar: &str,
card: Option<&str>,
) {
cx.update_window(window, |_, window, cx| {
window.render_frame(cx);
assert_eq!(window.find(id.to_owned()).label(), Some(sidebar));
if let Some(card) = card {
assert_eq!(window.find(("setup-status", 1_usize)).label(), Some(card));
}
})
.unwrap();
}

#[test]
fn the_rendered_hackd_dot_matches_the_off_card_despite_a_green_project_read() {
let (mut cx, window, app) = open(0);
cx.update(|cx| {
let app = app.read(cx);
assert_eq!(
app.hackd_tone_from_snapshot(),
Some(hack_desktop_core::machine::Tone::Ok)
);
let card = &app.setup.report.cards[1];
assert!(card.detail.contains("hackd off"));
});
assert_rendered_status(
&mut cx,
window,
"hackd",
"hackd: Needs attention",
Some("Needs attention"),
);
}

#[test]
fn closing_hides_a_password_prompt_and_stop_releases_the_machine_gate() {
let (mut cx, window, app) = open(2);
Expand Down
Loading
Loading