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
3 changes: 2 additions & 1 deletion .agents/session-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@
- 2026-04-10: Completed issue #342 primary workbench ownership. The renderer now marks workbench-heavy surfaces explicitly and collapses the outer support lane plus internal two-column workbench grids earlier, so `Runs`, `Compare`, `Candidates`, `Run Detail`, and `Paper Ops` stop holding two side rails at the same laptop-width breakpoint. Validation passed with `node --check desktop/renderer/app.js`, `npm run smoke:fallback`, and `npm run smoke:real-path`.
- 2026-04-10: Started issue #346 to harden `desktop-smoke` result persistence after CI repeatedly failed with raw `ENOENT` on missing `result.json` in a planning-only PR. The slice is limited to `desktop/main.js`, `desktop/scripts/smoke.js`, and `.agents` continuity so smoke emits structured failures instead of crashing when Electron exits too early.
- 2026-04-10: Added the desktop layout regression remediation block after reviewing the post-merge desktop state in real screenshots. Opened issues #342, #343, and #344 to target empty-pane collapse, stronger active-surface focus and context containment, and better runs-family density plus right-rail space budgeting without reopening core or `research_ui` scope.
<<<<<<< HEAD
- 2026-04-10: Added the Desktop architecture migration block after accepting the ADR direction for the new shell foundation. Opened issues #350, #354, #353, #355, #352, #359, #351, #357, #358, and #356 so the migration is tracked as real slices rather than dozens of micro-backlog items.
- 2026-04-10: Started the desktop shared contracts foundation slice on branch `codex/desktop-shared-workspace-contract`. The goal is to establish the first real shared Desktop contract layer before opening the larger `desktop-typescript-base` slice, limited to workspace, runtime/snapshot, and smoke boundaries.
- 2026-04-10: Completed the desktop shared contracts foundation slice. Added `desktop/shared` contracts for IPC channels, envelopes, workspace state, runtime state, snapshot status, and smoke results, and connected them back into `desktop/main.js`, `desktop/preload.js`, `desktop/renderer/app.js`, and `desktop/scripts/smoke.js` via narrow JSDoc typing only, without changing desktop behavior.
- 2026-04-10: Started issue #354 on branch `codex/desktop-typescript-base`. This slice is limited to the real TypeScript base for `desktop/`: `tsconfig.json`, `types/global.d.ts`, package wiring, and only the minimum edits required in `main.js`, `preload.js`, and `renderer/app.js` so typecheck passes without changing desktop behavior.
- 2026-04-10: Completed issue #354 TypeScript base real across Desktop. Added `desktop/tsconfig.json`, `desktop/types/global.d.ts`, and package wiring for `typecheck`, then applied only the minimum `@ts-check` and DOM/type narrowing changes in `desktop/main.js`, `desktop/preload.js`, and `desktop/renderer/app.js` so `npm run typecheck`, `node --check`, `npm run smoke:fallback`, and `npm run smoke:real-path` all pass without changing visible desktop behavior.
61 changes: 53 additions & 8 deletions .agents/tasks/issue-354-typescript-base-across-desktop.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,60 @@
# Issue #354 — TypeScript Base Across Desktop

## Goal
Establish the real TypeScript base for `desktop/` without changing runtime behavior.
Establish the real TypeScript base for `desktop/` without changing runtime behavior or opening the renderer migration yet.

---

## Why this matters
- turns `desktop/shared` into a first-class typed contract layer
- prepares the modularization of `main.js` without spreading JS debt into more files first
- keeps the migration sequence disciplined: contracts first, tooling second, architecture refactor third

---

## Scope

### In scope
- `desktop/tsconfig.json`
- `desktop/types/global.d.ts`
- `desktop/package.json`
- minimal typecheck-driven edits in `desktop/main.js`, `desktop/preload.js`, and `desktop/renderer/app.js`
- native consumption of `desktop/shared/ipc` and `desktop/shared/models`

### Out of scope
- modularizing `main.js`
- React
- Vite
- `research_ui`
- new shared models
- functional behavior changes
- visible UI changes

---

## Relevant files

- `desktop/package.json`
- `desktop/tsconfig.json`
- `desktop/types/global.d.ts`
- `desktop/main.js`
- `desktop/preload.js`
- `desktop/renderer/app.js`
- `desktop/shared/`

---

## Expected deliverable
- `tsconfig.json`
- `types/global.d.ts`
- `typecheck`
- native use of `desktop/shared`

- TypeScript base configuration for the current Desktop shell
- current Desktop entrypoints passing `typecheck` while staying in JS
- no runtime behavior change

---

## Done when
- current Desktop JS entrypoints pass typecheck
- smoke remains green
- no functional change is introduced

- `npm run typecheck` passes in `desktop/`
- `node --check` passes for touched JS entrypoints
- `smoke:fallback` and `smoke:real-path` stay green
- `main.js`, `preload.js`, and `renderer/app.js` consume `desktop/shared` natively through the TS base
2 changes: 2 additions & 0 deletions desktop/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-check

const { app, BrowserWindow, ipcMain, shell } = require("electron");
const fs = require("fs");
const fsp = require("fs/promises");
Expand Down
47 changes: 40 additions & 7 deletions desktop/package-lock.json

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

3 changes: 3 additions & 0 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
"scripts": {
"start": "electron .",
"dev": "electron .",
"typecheck": "tsc --project tsconfig.json --noEmit",
"smoke": "npm run smoke:fallback",
"smoke:fallback": "node scripts/smoke.js --mode=fallback",
"smoke:real-path": "node scripts/smoke.js --mode=real-path",
"mcp": "node mcp-server.mjs"
},
"devDependencies": {
"@modelcontextprotocol/sdk": "^1.20.0",
"@types/node": "^24.6.1",
"electron": "^37.2.0",
"typescript": "^5.9.3",
"zod": "^4.1.12"
}
}
2 changes: 2 additions & 0 deletions desktop/preload.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-check

const { contextBridge, ipcRenderer } = require("electron");

/** @typedef {import("./shared/models/workspace").WorkspaceState} WorkspaceState */
Expand Down
Loading
Loading