Skip to content

design(dashboard): drop editor, add edit-review, expand semantic config#26

Merged
esengine merged 1 commit into
mainfrom
design/refresh-dashboard-mockup
May 1, 2026
Merged

design(dashboard): drop editor, add edit-review, expand semantic config#26
esengine merged 1 commit into
mainfrom
design/refresh-dashboard-mockup

Conversation

@esengine

@esengine esengine commented May 1, 2026

Copy link
Copy Markdown
Owner

Context

The dashboard (dashboard/app.js) is a 4768-line single-file Preact SPA with no clear state boundaries — 16 panel components inlined, polling-based API sync via a usePoll helper, cross-component coordination via DOM appBus / toastBus events, no centralised store. A code-level refactor is coming. This PR is the design-mockup prep that the refactor will target. No dashboard/app.js changes here.

Changes to design/agent-dashboard.html

1. Drop §7 Editor entirely

Reasonix's value is the agent loop, not a VSCode-in-a-tab. Removed:

  • §7 Editor section (file tree + tabs + code area + status bar + Cmd-P file picker)
  • TOC entry
  • Editor side-tab in 11 page mockups + collapsed-sidebar variant
  • Glyph palette editor label (✎ glyph repurposed for the new §7 below)

2. Add §7 Edit review (reclaiming the slot)

GitHub-style multi-file diff review surface. Sub-mockups:

The §3 inline diff component also picks up syntax highlighting (reuses .kw / .com / .str tokens from the code block) and a word-rem demo, so the diff blends visually with surrounding code.

New CSS: .word-add / .word-rem, .diff-row.expand, .diff.split variant, .review-summary / .review-mode / .review-file / .review-file-h.

3. §12 Semantic — expose the full config surface

The backend (src/server/api/index-config.ts) has 6 configurable fields; the mockup previously surfaced just one as a read-only list. Replaced the excluded by patterns card with a real index config card:

  • 4 chip lists (editable): excludeDirs, excludeFiles, excludeExts, excludePatterns
  • respect .gitignore checkbox row
  • max file bytes number input
  • Preview / Save action buttons

Added a new "Config preview" subsec demonstrating the dry-run output of POST /api/index-config/preview — projected file-count delta, per-reason breakdown, and a sample of files that would change category.

Out of scope for this PR

  • dashboard/app.js / app.css / index.html — no code changes. The refactor is a separate, larger effort.
  • Backend changes — both the semantic config surface and the events stream already exist; the mockup is just catching up.
  • Edit-review backend — RFC RFC: Kernel-level red-green — every edit_file requires a paired test event #25 covers the kernel-level invariant; the mockup shows the UI side of that future work.

Test plan

  • Open design/agent-dashboard.html in a browser; confirm visually:
    • §7 (Edit review) renders with the 5 sub-mockups; CSS doesn't bleed into other sections
    • §12 Semantic config card has all 6 fields editable; Config preview subsec renders below build-progress
    • No §7 Editor anywhere; sidebars don't show the Editor tab
  • git diff main..HEAD --stat shows only design/agent-dashboard.html (+254 / −157)

Mockup prep ahead of the dashboard code refactor — current
dashboard/app.js is a 4768-line single-file Preact SPA with no
clear state boundaries, and the refactor needs an updated target.

- Remove §7 Editor entirely. Reasonix's value is the agent loop,
  not a VSCode-in-a-tab. Sidebar mockups (11 pages + collapsed
  variant) and the glyph palette drop the corresponding entries.

- Add §7 Edit review (reclaiming the slot). GitHub-style
  multi-file diff: aggregator header with stat + mode toggle +
  bulk apply, per-file collapsible cards with approve/reject,
  expand-context chevrons, intra-line word diff, unified ↔ split
  modes, plus empty / applied / test-failed states. §3 inline
  diff picks up syntax highlighting and a word-rem demo.

- §12 Semantic gains a real config card. The backend exposes
  6 fields (excludeDirs / excludeFiles / excludeExts /
  excludePatterns / respectGitignore / maxFileBytes); the mockup
  previously showed one as a read-only list. New card has
  editable chip lists, toggle, number input, and a Preview
  action, plus a Config preview subsec demonstrating the dry-run
  output of /api/index-config/preview.
@esengine esengine added the enhancement New feature or request label May 1, 2026
@esengine esengine merged commit 385831d into main May 1, 2026
2 checks passed
@esengine esengine deleted the design/refresh-dashboard-mockup branch May 1, 2026 09:21
esengine added a commit that referenced this pull request May 1, 2026
The design mockup deleted §7 Editor in #26 — Reasonix's value is the
agent loop, not a VSCode-in-a-tab. The code follows. Net −1535 LoC
across nine files; the dashboard bundle shrinks from 137 KB to 121 KB.

Removed:

- dashboard/app.js — EditorPanel + the lazy CodeMirror loader (~540
  lines), the editor drawer overlay in App, the `editor` entry in
  TABS, the `openFileInEditor` helper, the `open-file` event-bus
  path, and the four tool-card path-link click handlers (now plain
  code spans).
- dashboard/app.css — 590 lines of editor-drawer / file-tree /
  CodeMirror skin. The `.tool-card-path-link` hover treatment goes
  with the click handler.
- dashboard/codemirror.js — 36-line CDN loader stub, gone.
- scripts/bundle-codemirror.mjs — the build-time CodeMirror bundler,
  no longer needed.
- src/server/api/file.ts — the `/api/files` + `/api/file/<path>`
  endpoints had no consumer outside the editor panel.
- src/server/router.ts — drops the `files` / `file` route cases.
- src/server/assets.ts — drops the `codemirror.js` serving branch.
- package.json — drops `dashboard/codemirror.js` from the npm
  files list and removes the `build:cm` script.

Out of scope: the new §7 Edit review surface (Stage 4 PR 4.15)
will live in `dashboard/src/panels/edit-review.tsx` and replaces
this slot in the IA conceptually, but that's later in the rollout.
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
The design mockup deleted §7 Editor in esengine#26 — Reasonix's value is the
agent loop, not a VSCode-in-a-tab. The code follows. Net −1535 LoC
across nine files; the dashboard bundle shrinks from 137 KB to 121 KB.

Removed:

- dashboard/app.js — EditorPanel + the lazy CodeMirror loader (~540
  lines), the editor drawer overlay in App, the `editor` entry in
  TABS, the `openFileInEditor` helper, the `open-file` event-bus
  path, and the four tool-card path-link click handlers (now plain
  code spans).
- dashboard/app.css — 590 lines of editor-drawer / file-tree /
  CodeMirror skin. The `.tool-card-path-link` hover treatment goes
  with the click handler.
- dashboard/codemirror.js — 36-line CDN loader stub, gone.
- scripts/bundle-codemirror.mjs — the build-time CodeMirror bundler,
  no longer needed.
- src/server/api/file.ts — the `/api/files` + `/api/file/<path>`
  endpoints had no consumer outside the editor panel.
- src/server/router.ts — drops the `files` / `file` route cases.
- src/server/assets.ts — drops the `codemirror.js` serving branch.
- package.json — drops `dashboard/codemirror.js` from the npm
  files list and removes the `build:cm` script.

Out of scope: the new §7 Edit review surface (Stage 4 PR 4.15)
will live in `dashboard/src/panels/edit-review.tsx` and replaces
this slot in the IA conceptually, but that's later in the rollout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant