Skip to content

feat(desktop): add the project Config tab and JSON config commands - #1186

Open
roodboi wants to merge 60 commits into
nextfrom
kit/hack-2595-config
Open

roodboi wants to merge 60 commits into
nextfrom
kit/hack-2595-config

Conversation

@roodboi

@roodboi roodboi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a project Config tab with a layer and route map, structured editing, env provenance, and editable source for one checkout and overlay.
  • Add the versioned hack config show, validate, and apply JSON commands. Saves check layer revisions and reuse the existing env writer. Source previews redact credentials and keep Compose comments and order on structured edits.
  • Offer Restart after changes that need it. Env-only changes take effect on the next start. The missing-config Run action uses the shared Ghostty command drawer.
  • Integrate the Merino Dark palette from fix(desktop): use Merino Dark and fresh drawer status #1184. Match the two button pairs in the save and error states and fix the Source change count.

Native macOS before and after

Light · m08–m12

Config views in light appearance

Merino Dark · m08–m12

Config views in Merino Dark

The native macOS harness captured the baseline Services view and refreshed all 14 Config views at 2560×1600. The after captures use synthetic data and include the Files tab from the target branch.

Verification

  • The macOS desktop workspace passed 490 tests after the Merino merge, with one skip. Format, screenshot-feature Clippy, and doctests passed.
  • Focused Config checks cover checkout and overlay resolution, stale revisions, credential redaction, explicit Restart arguments, and legacy migration cleanup and rollback. A compiled CLI smoke exercised Show, Validate, Apply, and route readback with Compose comments retained. All eight compiled native-plan checks passed.
  • Live service Restart and interactive Ghostty init were outside the fixture coverage. The full local CLI suite exited before completion, and the broad runtime-core suite hit a registry fixture timeout. That runtime fixture passed in isolation.

Refs HACK-2595

roodboi and others added 23 commits November 23, 2026 11:06
[HACK-2596](https://linear.app/hackdance/issue/HACK-2596) · Shared
command drawer

## What changed

- Adds a typed Run/Copy control for Setup, Doctor and machine views. The
pair has equal dimensions in both its standard and compact sizes.
- Runs checked argv in the existing Ghostty panel with the pinned CLI,
controlled PATH, backend and Docker selectors. The terminal owns
password input. Copy and the Terminal app hand-off use the same checked
command and directory.
- Reports typed exit outcomes and asks the owning view to re-check. A
zero exit and a passing check close the drawer after 1.5 seconds. Other
outcomes keep the output available.
- Adds Copy output, Terminal app fallback, Make taller and Stop. Closing
the drawer retains the latest run. Passed Setup cards can reopen
successful output, and the terminal shortcut reopens a command waiting
for input.
- Wires Setup's daemon start and admin fixes. The setup flow and
Doctor/machines branches can use the shared control, including the
blocked and version-mismatch props.

## Verification

- Started from `codex/desktop-v5-parity` at
`0dac496c13e574936241520c2fdaf75d3d4843a3`.
- Claude Opus 5.5 reviewed the code in three rounds and reported clean
at `301c24f73fa44d15bfbbbb36b4f2a5b56144574f`.
- macOS formatting, workspace typecheck, Clippy with warnings denied,
and all four drawer regressions passed. The full desktop run passed 528
tests, skipped one and reported three failures. The headless Env
clipboard test also fails at the base commit. Both other tests passed in
the isolated rerun, alongside the four drawer regressions and workspace
doctests.
- The macOS app rendered all seven requested drawer frames in both
appearances. The fixtures ran real PTYs with harmless commands. The
existing project Logs drawer passed its native window smoke test.

## Visual evidence

The captures show the shared controls on the current Setup pane and use
the current desktop palette.

| State | Light | Dark |
|---|---|---|
| Before · Setup partial fixture |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/before-setup-partial-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/before-setup-partial-dark.png)
|
| h05 · Running |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h05-hackd-running-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h05-hackd-running-dark.png)
|
| h08 · Run and Copy |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h08-dns-needs-action-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h08-dns-needs-action-dark.png)
|
| h10 · Password prompt |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h10-dns-password-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h10-dns-password-dark.png)
|
| h11 · Failed |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h11-dns-failed-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h11-dns-failed-dark.png)
|
| h12 · Done and closing |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h12-dns-succeeded-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h12-dns-succeeded-dark.png)
|
| h13 · Last run |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h13-drawer-closed-last-run-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h13-drawer-closed-last-run-dark.png)
|
| h13 · Passed and closed |
[Light](https://github.com/hack-dance/hack/blob/301c24f73fa44d15bfbbbb36b4f2a5b56144574f/apps/desktop/screenshots/command-drawer/h13-successful-run-history-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/301c24f73fa44d15bfbbbb36b4f2a5b56144574f/apps/desktop/screenshots/command-drawer/h13-successful-run-history-dark.png)
|
| h26 · Drawer menu |
[Light](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h26-drawer-menu-light.png)
|
[Dark](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h26-drawer-menu-dark.png)
|

![h26 drawer menu in the light
appearance](https://raw.githubusercontent.com/hack-dance/hack/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/screenshots/command-drawer/h26-drawer-menu-light.png)

## Drawer lifecycle

![Command drawer state
diagram](https://raw.githubusercontent.com/hack-dance/hack/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/diagrams/command-drawer.png)


[SVG](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/diagrams/command-drawer.svg)
· [Mermaid
source](https://github.com/hack-dance/hack/blob/6111db778efad80a5cbe7900b0eba05c3ab786f1/apps/desktop/diagrams/command-drawer.mmd)

An unavailable exit status keeps the drawer open and still triggers a
fresh check.

---------

Co-authored-by: Dimitri Kennedy <344842+roodboi@users.noreply.github.com>
## What changed

- `hack files ls|cat --json` reads a running Compose service and reports
`hack.files.v1`. The CLI verifies checkout ownership before opening a
replica. The deepest mount determines the entry's source.
- Files browses one service, previews text, copies the container path,
and opens local worktree files in the host text editor after rechecking
the mount.
- The current project pane exposes Files with a service picker. The
service-pane change can mount `FilesPane::open` for its selected service
and remove the temporary entry point.

## Native desktop previews

These captures show synthetic data. The enclosing desktop still uses the
stack base's project pane.

| Theme | Before | After |
| --- | --- | --- |
| Light | ![Previous light
desktop](https://raw.githubusercontent.com/hack-dance/hack/0dac496c13e574936241520c2fdaf75d3d4843a3/apps/desktop/screenshots/window/running-light.png)
| ![Files browser in light
mode](https://raw.githubusercontent.com/hack-dance/hack/8b3a4c98e0bc2e8b4da57066a6b1a639534712f6/apps/desktop/screenshots/window/files-light.png)
|
| Dark | ![Previous dark
desktop](https://raw.githubusercontent.com/hack-dance/hack/0dac496c13e574936241520c2fdaf75d3d4843a3/apps/desktop/screenshots/window/running-dark.png)
| ![Files browser in dark
mode](https://raw.githubusercontent.com/hack-dance/hack/8b3a4c98e0bc2e8b4da57066a6b1a639534712f6/apps/desktop/screenshots/window/files-dark.png)
|

## Verification

- Pinned Bun typecheck, check, docs preparation and docs checks passed.
The focused CLI and machine-envelope tests passed all 117 cases.
- The compiled CLI passed an isolated two-replica Compose fixture with a
worktree bind, nested and inherited volumes, a same-name foreign
checkout, a Compose .env project override, a symlink, and bounded text
and binary reads.
- The full local Bun run reported existing fixture timeouts and exited
137. A targeted retry of those files with a longer deadline passed 40
tests, with one opt-in integration skipped.
- The macOS desktop suite passed 483 tests on the prior revision at one
test thread, with one skip. The latest build passed the four
machine-contract tests and doctests. The native harness reproduced both
screenshot PNGs byte for byte. A foreground editor launch was outside
the automated verification.

<!-- codesmith:footer -->
---
<a
href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1798049929&installation_model_id=17053&pr_number=1167&ref=codesmith_pr_footer&repository=hack-dance%2Fhack&return_to=https%3A%2F%2Fgithub.com%2Fhack-dance%2Fhack%2Fpull%2F1167&variant=see_it_in_action&signature=5da252b9c5d05a3f814e3fc6e0ece3eefc60c30676c949b4ca225ff9d5ff6e73"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-light.svg"><img
alt="See it in action"
src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-see-it-in-action-v2-dark-3x.png"
width="132" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/hack-dance/codesmith/hack/pr/1167?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

---------

Co-authored-by: Dimitri Kennedy <344842+roodboi@users.noreply.github.com>
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 24, 2026 10:42pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

HACK-2595

@roodboi

roodboi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T23:23:09.944299Z 01b9aea Manual request
🔒 Security Review ✅ Completed 2026-11-24T23:27:55.496037Z 01b9aea Manual request

Security findings

Advisory findings (5)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: a145b066a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: a145b066a7

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: ca649dc78b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@roodboi

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: ca649dc78b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: ca649dc78b

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/lib/config-editor-compose.ts Resolved

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b121bd464

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/config-editor-compose.ts Resolved

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e417518818

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: e417518818

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/lib/config-editor-model.ts Resolved

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: b8ceb9df3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 4b8a9bca74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 4b8a9bca74

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/lib/config-editor-model.ts Resolved

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 01b9aea16b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@roodboi

roodboi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 01b9aea16b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 01b9aea16b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@roodboi

roodboi commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Lead: next is frozen at c87c5665d2 for the 5.0.0-next.26 prerelease (see the FREEZE comment on HACK-2236). Please do not merge this or anything else into next until the UNFREEZE comment there. This PR keeps its place, and I will batch it after the publish.

🤖 Generated with Claude Code

@roodboi

roodboi commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Lead triage: PARTLY COVERED. It overlaps #1159, and the lead needs to decide which design wins before a refresh. This can wait for 5.1 unless the JSON config commands are in the stable scope.

Checked against next at c87c566.

Next step: the lead decides whether the layered Config tab replaces #1159's pane or extends it. Then Kit splits the PR in two: (1) the CLI config show/validate/apply and env migration journal, based on next and reviewed as CLI work; (2) the desktop tab on top of #1159's pane. Close this PR once both are open.

🤖 Generated with Claude Code

@roodboi

roodboi commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Lead decision on the Config design: #1159's Config pane, already merged, is the one that ships. Please split this PR:

  1. A CLI-only PR for hack config show/validate/apply and the env migration journal, with tests and the regenerated CLI reference. It is in stable scope only if it is small and reviewed in time; otherwise 5.1.
  2. Any desktop parts worth keeping, rebuilt on feat(desktop): edit project and global configuration #1159's pane, not as a second Config view.
    next is frozen for next.26 right now (see HACK-2236), so post ready notes and I will batch after the unfreeze. Also land fix(desktop): Fixture::ALL as slice (HACK-2656) #1237 (Fixture::ALL as a slice) first among the desktop PRs, so the fixture count stops breaking.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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