Skip to content

feat(fresh-ui): add desktop frontend components#855

Merged
rickylabs merged 6 commits into
feat/desktop-frontendfrom
feat/desktop-frontend-843-ui
Jul 18, 2026
Merged

feat(fresh-ui): add desktop frontend components#855
rickylabs merged 6 commits into
feat/desktop-frontendfrom
feat/desktop-frontend-843-ui

Conversation

@rickylabs

Copy link
Copy Markdown
Owner

Summary

Plan-only harness checkpoint for the @netscript/fresh-ui desktop component surface in #843.

The locked design introduces an explicit @netscript/fresh-ui/desktop entrypoint, structural desktop capability detection, declarative tray/menu wiring, gated native dialogs and notifications, truthful documented window actions, L2 desktop components/island, and update-ready UX consuming #841. It reuses #842 for the desktop binding seam.

Scope

Planned slices

  1. Public desktop runtime contract and web/no-op tests
  2. L2 components/island, registry metadata/generated content, JSR and consumer-render gates
  3. Scaffold design-gallery integration and documentation, including full scaffold runtime regression

Each implementation slice will commit, push, post gate evidence, and pause for supervisor-requested Tier-A review.

Validation state

Definition of Done

Harness

Run: beta11-cli--orchestrator/slices/g5-843-ui

Artifacts:

  • research.md
  • plan.md
  • worklog.md
  • context-pack.md
  • drift.md
  • supervisor.md

Do not merge until Plan-Gate, all Tier-A slice reviews, final opposite-family evaluation, and CI complete.

Refs #843
Part of #840

@rickylabs
rickylabs force-pushed the feat/desktop-frontend-843-ui branch from 2b0c477 to 6b5655d Compare July 18, 2026 00:09
@rickylabs rickylabs added this to the 0.0.1-beta.11 milestone Jul 18, 2026

Copy link
Copy Markdown
Owner Author

Plan & Design — READY FOR REVIEW

Run: beta11-cli--orchestrator/slices/g5-843-ui
Lane: normal_implementation — Codex · GPT-5.6 Sol · medium
Plan commit: 6b5655de
Base: feat/desktop-frontend @ 1709dcba

Research outcome

Locked design

  1. Explicit @netscript/fresh-ui/desktop export; no root-barrel expansion.
  2. createDesktopChrome returns an active/disabled lifecycle and uses local structural capability types.
  3. Declarative tagged menu/tray contracts dispatch stable action IDs; host exit/update/RPC policy stays outside the component.
  4. Native dialogs, notifications, and window calls are feature-gated and deterministic under injected fakes.
  5. No speculative port; the structural injection is the one-adapter test seam.
  6. L2 DesktopWindowChrome, DesktopUpdatePrompt, and a desktop-gated island follow the authority chain.
  7. Update UX consumes feat(sdk): robust programmatic auto-update — typed wrapper over Deno.autoUpdate + release client #841's discriminated ready event exactly.
  8. feat(sdk/fresh): type-safe desktop bindings — oRPC MessagePort adapter over the bind channel #842 remains the RPC/binding seam; Fresh UI does not introduce another transport.
  9. Browser/Aspire gallery proof is separate from test(deploy): single-artifact deploy-e2e — install → update → rollback (Windows + Linux) #457 native desktop smoke.

Planned slices and pauses

  1. Desktop runtime contract + web/no-op tests.
  2. L2 registry surface + generated content + JSR/consumer proof.
  3. Scaffold design-gallery consumer + docs + full scaffold runtime regression.

After each slice: commit → push → gate-evidence comment → pause for supervisor-requested Tier-A review.

Plan evidence

Group Plan-Gate request

Please review the public lifecycle, the no-port decision, the documented window action set, the L2 scaffold-consumer path, and the distinction between browser proof and #457 native smoke.

HARD STOP: This G5 session will not implement until the group Plan-Gate returns PASS. It will not dispatch evaluators or reviews, merge, publish, close milestone 13, or claim the #457 desktop-smoke box.

Copy link
Copy Markdown
Owner Author

IMPLEMENT — Slice 1 ready for Tier-A review

Slice: 1/3 — public desktop runtime contract
Commit: 542c1e98
Push: git push origin HEAD:refs/heads/feat/desktop-frontend-843-ui

Implemented

  • Added the explicit @netscript/fresh-ui/desktop export without widening the root barrel.
  • Added local structural desktop capabilities; no ambient Window/Deno augmentation and no any.
  • Added createDesktopChrome(options): DesktopChromeLifecycle with explicit active | disabled states and structural reasons.
  • Added declarative tagged tray/application-menu items, nested menus, native-role pass-through, stable action dispatch, dynamic replacement, and idempotent cleanup.
  • Added desktop-gated alert/confirm/prompt and notification permission handling with explicit performed/unavailable results.
  • Added only documented window operations: show, hide, focus, close, reload, and title.
  • Kept host policy out: no window creation, RPC binding, update start, process exit, publish, or release behavior.
  • Added the full packages/fresh-ui/tests/desktop/ directory with six behavior tests.

Gate evidence

Gate Result Evidence
Focused desktop tests PASS 6 passed, 0 failed
Full Fresh UI test directory PASS deno test -A --lock=deno.lock --unstable-kv packages/fresh-ui/tests — 144 passed, 0 failed
Scoped check PASS 137 TS/TSX files, zero diagnostics
Scoped lint PASS 137 TS/TSX files, zero findings
Scoped format PASS 137 TS/TSX files, zero findings
New export JSR doc lint PASS deno doc --lint packages/fresh-ui/desktop.ts — zero missing-doc/private-type findings
JSR publish dry-run PASS New entrypoint and src/desktop/** included; no slow-type error
Forbidden constructs PASS Zero any; zero text/JSON import attributes in slice files
quality:scan PASS No findings
Focused Fresh UI doctrine scan PASS 0 failures; existing warnings unchanged
Root arch:check BASELINE BLOCKED Stops in deps:check on pre-existing CLI ^0.0.1-beta.10 vs Fresh 0.0.1-beta.10 SDK ranges

The root architecture failure is unchanged from feat/desktop-frontend:
git diff origin/feat/desktop-frontend -- packages/cli/deno.json packages/fresh/deno.json is empty. It is recorded in drift.md; slice 1 does not alter dependency policy.

Tier-A review focus

Please inspect:

  1. structural compatibility of the native window/tray/notification seams;
  2. declarative menu translation and declared-ID filtering;
  3. cleanup and disabled lifecycle behavior;
  4. explicit unavailable results for optional native operations;
  5. disposition of the unchanged integration-base arch:check failure.

PAUSED: No slice 2 work will begin before Tier-A PASS. No evaluator/review has been self-dispatched. Native desktop smoke remains #457 and is not claimed.

@rickylabs rickylabs added status:impl and removed status:plan Harness plan phase labels Jul 18, 2026
rickylabs and others added 3 commits July 18, 2026 02:25
Co-Authored-By: Codex GPT-5.6 Sol <noreply@openai.com>
Co-Authored-By: Codex GPT-5.6 Sol <noreply@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
@rickylabs
rickylabs force-pushed the feat/desktop-frontend-843-ui branch from 542c1e9 to cb56bf0 Compare July 18, 2026 00:36
@rickylabs

Copy link
Copy Markdown
Owner Author

IMPLEMENT — Slice 2 READY FOR TIER-A REVIEW

Scope

  • Added self-contained L2 DesktopWindowChrome and DesktopUpdatePrompt TSX/CSS registry items.
  • Added hydration-safe DesktopOnly island using the SDK desktop binding constant and local structural detection; browser/Aspire defaults to no output.
  • Consumed AutoUpdateReadyEvent directly and exhaustively over automatic/manual apply modes, including the Windows manual URL supplied by the event.
  • Registered the desktop collection and deterministically regenerated checked-in registry content.
  • Added full component/island directory coverage, including generated-copy fidelity and rejection of fake minimize/maximize semantics.

Integration disposition

Per the S1 Tier-A PASS, I chose rebase onto origin/feat/desktop-frontend at 46e50cf2. Reviewed S1 commit 542c1e98 therefore rewrote to bde4fe50. Root arch:check passed immediately after that rebase and again after Slice 2. The lease-protected explicit-refspec push updated the remote from 542c1e98 to Slice 2 commit cb56bf02.

Gate evidence

  • Full Fresh UI directory: PASS — 151 passed, 0 failed.
  • Full registry component UI + island dirs: PASS — 66 passed, 0 failed.
  • Scoped check/lint/fmt: PASS — 142 TS/TSX files, zero findings.
  • L2 DS raw-hex and color-utility scans: PASS.
  • Generated asset determinism and post-commit check:assets-barrel: PASS.
  • Forbidden constructs: PASS — no any, ambient window augmentation, or text/JSON import attributes in the new surface.
  • deno doc --lint packages/fresh-ui/desktop.ts: PASS.
  • Fresh UI deno publish --dry-run --allow-dirty: PASS; no slow-type error.
  • quality:scan: PASS.
  • Root arch:check: PASS.

Native desktop smoke is deliberately not claimed; that acceptance box remains with #457. PR remains draft and uses Refs #843 with no closing keyword.

Commit: cb56bf02

Paused for supervisor-owned Tier-A review. No evaluator/review was self-dispatched.

rickylabs and others added 2 commits July 18, 2026 05:10
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
@rickylabs
rickylabs marked this pull request as ready for review July 18, 2026 03:11
@rickylabs

Copy link
Copy Markdown
Owner Author

IMPLEMENTATION COMPLETE — READY FOR SUPERVISOR-DISPATCHED IMPL-EVAL

Final slice: D3/D4 controls + D9 scaffold consumer + documentation
Commits: bdc96da1, a5093652
Push: git push origin HEAD:refs/heads/feat/desktop-frontend-843-ui

Completed scope

  • Added self-contained L2 DesktopTrayMenu, DesktopDialog, and DesktopNotification TSX/CSS pairs.
  • Tray/application-menu UI consumes the D3 discriminated declaration shape and emits stable action IDs; native replacement/event wiring remains in createDesktopChrome.
  • Dialog and notification controls emit explicit host requests and remain side-effect-free during SSR/browser rendering; gated native execution remains in the D4 controller.
  • Extended the desktop and scaffold foundation collections, app-owned UI barrel, registry catalog, generated Fresh UI content, and generated CLI embeds.
  • Added all six desktop items to the real scaffold /design/components gallery, including a mounted DesktopOnly proof that emits no native-only node in browser/Aspire mode.
  • Added “Building a desktop frontend the NetScript way” plus docs navigation/xref entries. The recipe composes @netscript/fresh/desktop, @netscript/sdk/desktop, @netscript/fresh-ui/desktop, copied L2 controls, and the discriminated update-ready event without inventing a transport.

Final gate evidence

Gate Result Evidence
Full Fresh UI directory PASS 154 passed, 0 failed
Full registry component/island dirs PASS 69 passed, 0 failed
Scoped type-check PASS 145 TS/TSX files, zero diagnostics
Scoped lint / format PASS 10 changed source files / 147 owned files, zero findings
L2 DS scans PASS raw-color: 158 clean; color-utility: 159 clean
Generated-copy parity PASS all six desktop items exact; generator deterministic
Post-commit generated-assets check PASS check:assets-barrel clean
Forbidden constructs PASS no any, ambient window augmentation, or text/JSON import attributes
JSR surface PASS deno doc --lint packages/fresh-ui/desktop.ts; package dry-run succeeds without slow types
Docs site PASS build; 25,189 internal links; caveat refs all resolve
quality:scan PASS zero findings
Root arch:check PASS exit 0
Real browser gallery PASS title/SSR 200; six desktop items; zero console errors/warnings; DesktopOnly native content count 0; light→dark→light computed token style changes; 390×844 scrollWidth=innerWidth with zero visible overflow offenders under reduced motion
Full scaffold.runtime PASS canonical one-pass command, 60 passed, 0 failed, cleanup completed
Native desktop smoke NOT RUN / NOT CLAIMED remains owned by #457

Reconcile

Implementation is complete. Stopped for the Fable supervisor to dispatch IMPL-EVAL.

@rickylabs
rickylabs merged commit 49f4f0f into feat/desktop-frontend Jul 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant