Skip to content

feat(desktop): add names-only environment tab - #818

Merged
roodboi merged 48 commits into
nextfrom
feat/desktop-app-env
Nov 15, 2026
Merged

roodboi merged 48 commits into
nextfrom
feat/desktop-app-env

Conversation

@roodboi

@roodboi roodboi commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds the names-only Env tab: read on open, project change and Check again, missing required names first, locked/unknown key readability, and explicit empty versus unreadable states. Uses hack env list --json --path <root> without a value flag; exit 1 still accepts a bare report. Typed models discard values/materialized fields and raw diagnostics. Generations drop stale selections; marker/discovery guards refuse missing or ancestor-shadowed roots. Canonical selected-scope absence differs from project-wide absence; empty legacy scope arrays show global.

Visible copy explains that key readability can be unknown and that Set indicates storage, not confirmed readability. The locked state shows hack doctor beside Copy command. The available app/core tabs and fixtures contain no internal request/ticket IDs outside source comments; the core always-on tooltip and README are aligned. No native Env, key handling, badge styling or upstream CLI-shape changes.

Based on next; core warmups, ordered snapshots, log-tail invalidation and recovery gates are preserved. Local Linux at 08db90a: Rust 1.98.1, own target, jobs 2; fmt, 77 unit + 6 integration tests, both Clippy modes with warnings denied, both builds and privacy pass. Eight affected Env light/dark screenshots were rendered and inspected at the copy-fix head bb70d35; the subsequent frozen-next merge changes no UI/fixtures and retains those receipts. Loading/error renders are retained unchanged. Fake CLI/temp HOME/HACK_HOME/autostart disabled; no real env command, owner registry/daemon, Docker, sudo or GUI window.

Normal merge of frozen next 8e7242d is pushed at 08db90a. README preserves Env docs and incoming process-retirement test guidance; runner tests match next/843. No app/Env read logic changed. Root and desktop scripts/test.sh are absent, so pinned own-target Cargo checks were used; no unmerged 846 wrapper was imported. Exact-head Codex and SAME persistent Claude r5 are clean; review-status CLEAR. Both hosted desktop jobs and successful replacement CI selected shards/fan-in pass. Final Ready for lead at frozen 08db90a supersedes all earlier holds; superseded cancellation excluded. Absolutely no more pushes. No PR merge during next.17 freeze; lead only after publication. Lead's macOS build/renders/state pass covers the previous 609d5cc head; new copy has fresh Linux offscreen evidence and the frozen merge head has hosted Linux/macOS desktop success; runtime limitations remain. Separately tracked macOS spawn flakes are not changed here. No full-CI-green, merge or release claim.

Limits: real env CLI rejects native roots, so native Env is Unreadable pending CLI support; fake native tests prove backend selection/parser behavior only. macOS keychain prompting remains unverified. Reads are bounded but not deduplicated; stale results are discarded. Marker pre/post checks are not an atomic filesystem fence. No merge or watcher by this unit.

Names-only Env, light
Locked Env, dark

Freeze branch-update order: #846 → #818 → #808. Env MERGE PUSHED is complete, so Logs can be NEXT. Preserve shared tab/fixture/screenshot/source hooks. No PR merges during freeze; lead only after publication. No new shape adoption or scope.

roodboi and others added 30 commits November 13, 2026 19:01
…CK-2214)

New Cargo workspace under apps/desktop, separate from runtime-core:
- core: lenient models for hack --json and hackd payloads, a CLI runner
  that kills the whole process group on timeout, a read-only hackd socket
  client, project state derivation, list/detail view models and fixtures
  for every designed state. 33 hermetic unit tests.
- app: the gpui-kit window (sidebar, header with Start/Stop/Restart/Open,
  services table, log tail, status bar, light and dark), --fixtures mode
  and offscreen PNG rendering behind the screenshots feature.
- A separate, non-required Linux CI job for the desktop workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…finished one-shot services as completed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eout, drop stale log tails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abel Docker state as Docker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arden chunk parsing, never count unknown as stopped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, gate native actions and logs, clear recovered failures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er peer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iled log read as failed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r and machine rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as down

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ig files, and act on the canonical path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd refuse config symlinks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…KILL, so it can retire its own subprocesses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hem short

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fter 6 hours instead

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dump

- Pin Rust 1.98.1 for apps/desktop only (rust-toolchain.toml, mise.toml);
  macOS needs it for gpui-pre-macos. rust-version = 1.98.
- Daemon tests use short /tmp socket dirs (macOS sun_path is 103 bytes);
  an over-long hackd socket path is a clear error, never a panic.
- Runner timeout tests tolerate a slow first start of a new script and
  use a portable trapped wait.
- hack-desktop-state prints the live list and detail view models as JSON
  through LiveSource::from_env, the same path the window uses.
- CI: macOS build and core tests; Linux on 1.98.1 with clippy both ways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roodboi

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead review at bb70d35. This supersedes the 609d5cc Ready note. Not merge-ready or full-CI-green while the hosted gaps below remain. Head held; no further code churn.

  • Exact-head Codex code review is clean. The same persistent Claude reviewer reports CLEAN at this head, inspected locked light, and confirmed no request/ticket IDs are visible. Review status: CLEAR at bb70d35, no unresolved bot threads or base overlaps.
  • Both required copy fixes are complete: plain key-readability and storage-versus-readability text; visible hack doctor beside Copy command. Available app/core tabs and fixtures were audited; the core always-on tooltip and README are aligned. Request IDs remain only in comments/DESIGN. Parsing, reads, native/key handling and badge styling are unchanged.
  • Local Linux/Rust 1.98.1, own target, jobs 2: fmt; 77 unit + 6 integration tests; both Clippy modes with warnings denied; both builds; privacy all pass. Eight affected offscreen PNGs were refreshed and checked in both themes: normal, missing-required, locked and empty. Locked light · normal dark. Loading/error output is unchanged. Fake CLI/temp HOME/HACK_HOME/autostart disabled; no real env commands or GUI window.
  • Lead Mac baseline at 609d5cc3: build passed, 42 renders including 12 Env renders produced, real read-only state completed in 2 seconds, 83 tests pass on most runs. This is not current-copy Mac qualification or acceptance of a 200-run Mac gate. Intermittent process-spawn failures are separately tracked as HACK-2243, parent-owned; test(desktop): verify process retirement without tight latency ceilings #843 remains separate.
  • Hosted status checked: desktop Linux passes; desktop macOS is queued. CI 43593411145 has passing scope/secrets/docs, canceled shards 4–8 and a failed test fan-in. Replacement CI 43593526305 is queued. No full-CI-green claim.

Remaining limits: E3 macOS keychain prompting unverified; E4 bounded reads are not deduplicated, with stale results discarded; E5 real env CLI rejects native roots, so native Env remains Unreadable pending CLI support (fake native tests are not live support proof). The Set caveat alongside an explicitly readable key is an accepted nonblocking copy follow-up; no head change for it.

Order remains #808 Logs → #806 Doctor → #818 Env. Later tabs must normally merge then-current next after earlier tabs land and obtain confirmation for the resulting head. No new scope/native Env work, PR merge or watcher. Task scratch removed; durable evidence/checkout retained. Own generated target remains retained after the reported cleanup-guard refusal, without a bypass.

@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: bb70d35f1b

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 14, 2026

Copy link
Copy Markdown
Contributor Author

Lead Mac pass at bb70d35f1: copy fixes confirmed in the rendered Env screens (no internal request ids; the command is shown with a "Copy command" button), 83 of 83 tests, all 42 renders. Accepted. It merges after next.17 publishes (next is frozen as the candidate), if the head has not moved.

🤖 Generated with Claude Code

@roodboi

roodboi commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 08db90a756

ℹ️ 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: 08db90a756

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 14, 2026

Copy link
Copy Markdown
Contributor Author

Final Ready for lead at 08db90a. Head is frozen: absolutely no further pushes. No PR merge during the next.17 freeze; lead only after publication. This supersedes earlier hold/pending-CI notes.

Accepted runtime limits: E3 macOS keychain prompting remains unverified. E4 reads are bounded but not deduplicated; stale responses are discarded. E5 real env CLI rejects native roots, so native Env stays Unreadable pending CLI support; fake native tests prove backend selection/parser handling only. Marker pre/post checks are not an atomic filesystem fence. The readable-key Set-caveat wording is an accepted nonblocking follow-up, with no head churn.

Freeze branch-update order remains #846 → #818 → #808; Env MERGE PUSHED was reported and Logs is proceeding next. No new shape adoption, native/key changes, registry framework, PR merge or watcher. No services left running. Task scratch is cleaned; durable receipts/renders and prepared checkout are preserved. Own generated target remains retained after the previously reported cleanup-guard refusal, without a bypass.

@roodboi

roodboi commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Lead (Nov 15 2026, 02:30 UTC): next moved to e47681e; #846 is merged, with 12 other PRs. This PR now conflicts with next in the desktop core files. The build host of the owning session cannot be reached from the lead machine right now, so this message is here instead of in the session. When the session resumes: normal merge of origin/next into #818, #808 and #806 (in that order; #847 is merged, so the NSS thread on #806 can be checked and resolved), bash scripts/test.sh in apps/desktop, reviewer re-ping, new ready notes. The lead then does one Mac pass for all three.

🤖 Generated with Claude Code

# Conflicts:
#	apps/desktop/README.md
#	apps/desktop/core/src/lib.rs
@roodboi

roodboi commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2721130f68

ℹ️ 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: 2721130f68

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 15, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 2721130

Merge of next e47681e into 08db90a. Nothing else changed.

  • Conflicts: core/src/lib.rs keeps pub mod env and next's #[cfg(test)] mod test_support. README.md takes next's bash scripts/test.sh build line, keeps the Env section, then has next's test-runner/macOS spawn text under "Process-cleanup tests".
  • bash scripts/test.sh (Linux, pinned nextest, temp HOME/HACK_HOME, autostart disabled): 84 of 84, doctests ok. Clippy -D warnings and cargo fmt --check clean.
  • Persistent second-family reviewer (Codex gpt-6.1-sol): clean; it confirmed Env's reads go through CliRunner and so through the new macOS spawn boundary.
  • Codex bot at this head: no findings. computer pr review-status: CLEAR at 2721130.
  • Hosted: desktop Linux and macOS build/core-test jobs passed. Test shards 4, 6, 7 and 8 were still pending; I did not wait for them.
  • next has since moved to bf74aaf (unrelated files only; review-status still CLEAR), so I did not merge it again.

Not verified by me: anything on a real Mac (renders, keychain prompt behaviour).

🤖 Generated with Claude Code

@roodboi

roodboi commented Nov 15, 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: 7bf82d9875

ℹ️ 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: 7bf82d9875

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 15, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 7bf82d9

Clean merge of next 345dc0d (#835, #831) into 2721130. No other changes.

  • bash scripts/test.sh (Linux, pinned nextest, temp HOME/HACK_HOME, autostart disabled): 88 passed, 1 skipped (the skip comes from next). fmt, Clippy with all features (-D warnings) and Apple-target Clippy for core: clean.
  • This branch changes nothing outside apps/desktop. tests/machine-output-contract.test.ts and tests/sync-spawn-bound.test.ts pass (89/89), run on this next tree. There are no generated files to regenerate and no acceptance scripts apply.
  • Persistent second-family reviewer (Codex gpt-6.1-sol): clean at this head.
  • Codex bot at this head: no findings (code and security). computer pr review-status: CLEAR at 7bf82d9.
  • Hosted: 15 pass. The desktop macOS job was still pending; I did not wait for it.

Not verified by me: anything on a real Mac.

🤖 Generated with Claude Code

@roodboi
roodboi merged commit 34b5053 into next Nov 15, 2026
23 checks passed
@roodboi
roodboi deleted the feat/desktop-app-env branch November 15, 2026 09:03
roodboi added a commit that referenced this pull request Nov 15, 2026
…econcile

Brings in next at 34b5053 (#802 Rust lifecycle supervisor, #860 read-only update check, #818 desktop Env tab).

Conflicts:
- src/lib/machine-output.ts and src/cli/json-contracts.ts: both sides added schemas and variants; kept updateCheck / update --check --observe and the four daemon command schemas.
- src/commands/update.ts: kept both the observeUpdate import and handleObserve from #860 and this branch's post-update reconcile. --observe returns before anything else, and plain --check returns before the install, so the read-only check never reaches reconcileDaemonAfterUpdate.

Generated files (CLI reference, machine-output table, error-code reference) were regenerated and match; E_DAEMON_SERVICE kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roodboi added a commit that referenced this pull request Nov 15, 2026
# Conflicts:
#	apps/desktop/README.md
#	apps/desktop/app/src/screenshots.rs
#	apps/desktop/app/src/view.rs
#	apps/desktop/core/src/source.rs
roodboi added a commit that referenced this pull request Nov 15, 2026
# Conflicts:
#	apps/desktop/README.md
#	apps/desktop/app/src/main.rs
#	apps/desktop/app/src/screenshots.rs
#	apps/desktop/app/src/view.rs
#	apps/desktop/core/src/fixtures.rs
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