Skip to content

Shell: drag between windows, desktop icons + Trash, undo/redo, find - #4

Merged
BunsDev merged 2 commits into
mainfrom
ui-rows-2
Sep 26, 2026
Merged

BunsDev merged 2 commits into
mainfrom
ui-rows-2

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 26, 2026

Copy link
Copy Markdown
Member

What & why

Builds the remaining dev-shell rows Val asked for: drag between windows, desktop icons, undo, find.

  • Drag and drop — Finder rows / desktop icons draggable; drop on a Finder list, folder row, the desktop, or the Trash. Plain = move, Option/Alt = copy.
  • Desktop icons — /Desktop as icons under every window; Trash bottom-right with empty/full state.
  • TextEdit — undo/redo (500-step history), Edit menu, find bar with "n of m", Enter/Shift+Enter cycling, and highlighted matches that stay visible while typing in Find.

Bugs the new tests caught (all fixed here)

  1. Window drag hijacked by native DnD once rows became draggable — Chromium re-hit-tests the original press point after the window moves and starts dragging the Finder row now beneath it.
  2. Desktop icon double-click never fired — selection re-rendered the icon layer between the two clicks.
  3. False "someone changed this" conflict after a rename — rename bumps the node's rev but not its content; TextEdit now adopts metadata-only rev changes (also fixes a false banner on case-only renames).

Spec rows covered

FND-04, FND-07, TXT-03, TXT-04, TXT-06 (+ FND-04b, FND-07b, TXT-03b ≥100 steps, TXT-04b, TXT-06b).
Kernel 43/43 · shell e2e 29/29 (full suite ×2 green; TXT-04 ×16 green).
Still not built: icon view (§6.3), Shift/⌘/marquee multi-select (§6.5).

Clean-room attestation

  • By opening this pull request I certify, in the sense of the Developer Certificate of Origin, that I have the right to submit this work under the project licence. I have not read, cloned, decompiled, or inspected the source code, deployed DOM/CSS, or asset files of ryOS or Puter, and this contribution was written from the Cauldron specification and general knowledge only. If an AI tool assisted, it was operated under the same constraint and its session had no access to those repositories.

🤖 Generated with Claude Code

Spec rows FND-04, FND-07, TXT-03, TXT-06 (+ TXT-04 e2e).

- Drag and drop (dnd.ts): Finder rows and desktop icons are draggable;
  Finder lists, folder rows, the desktop and the Trash accept drops.
  Plain drop moves, Option/Alt-drop copies; Trash drop trashes.
- Desktop (desktop-icons.ts): /Desktop as a right-aligned icon column
  under all windows, Trash bottom-right showing empty/full.
- TextEdit: own undo/redo history (500 steps; spec asks >= 100), Edit
  menu, find bar with match count, Enter/Shift+Enter cycling, and a
  highlight layer so matches stay visible while typing in Find.

Bugs found by the new tests:
- Title-bar drag was hijacked by a native HTML5 drag once rows became
  draggable: after the first move Chromium hit-tests the original press
  point, now over a Finder row. preventDefault on window-drag pointerdown.
- Double-clicking a desktop icon never fired: selection re-rendered the
  layer between clicks. Selection now toggles a class in place.
- TextEdit raised a false E_CONFLICT on save after its file was renamed:
  rename bumps rev, not content. Metadata-only rev changes are adopted.

Tests: kernel 43/43; shell e2e 29/29 (repeat x2 green; TXT-04 x16).

Clean-room attestation: written from the Cauldron spec and general
knowledge only; no ryOS or Puter source, DOM, CSS, or assets consulted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 26, 2026 03:42
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cauldron-shell Ready Ready Preview Sep 26, 2026 3:45am UTC

Request Review

CI (Linux) caught WM-04: the find highlight layer made the textarea
position:absolute with z-index 1, which stacked it over the window's
resize grip, so TextEdit windows could not be resized by hand. The grip
now sits at z-index 5; WM-04b asserts the grip is the hit target (fails
without the fix, passes with it).

Why local runs missed it: port 5178 is also used by Modex's Vite dev
server (on ::1), and reuseExistingServer let local runs attach to
whatever answered. Dev port moves to 5188 and the test server is never
reused.

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

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Moderate issues remain in accessibility, drag/drop behavior, and TextEdit state synchronization.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds shell drag-and-drop, desktop icons/Trash, and TextEdit undo/redo/find functionality.

Changes:

  • Added Finder and desktop drag-and-drop.
  • Added desktop icons and Trash state handling.
  • Added TextEdit history, find highlighting, and rename tracking.
  • Added E2E and screenshot coverage.
File Summary
apps/​shell/​src/​textedit.ts TextEdit history, find, highlighting, and document tracking
apps/​shell/​src/​slate.css Editor and desktop icon styling
apps/​shell/​src/​shell.ts Desktop integration and window drag handling
apps/​shell/​src/​finder.ts Finder drag/drop targets
apps/​shell/​src/​dnd.ts Shared drag/drop behavior
apps/​shell/​src/​desktop-icons.ts Desktop icons and Trash
apps/​shell/​e2e/​screenshots.spec.ts Screenshot coverage
apps/​shell/​e2e/​rows2.spec.ts Feature acceptance tests

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

this.#text.value = r.content;
this.#last = r.content;
this.#past = [];
this.#future = [];
@BunsDev
BunsDev merged commit 0eb3fbb into main Sep 26, 2026
2 checks passed
@BunsDev
BunsDev deleted the ui-rows-2 branch September 26, 2026 03:47

This branch was successfully deployed

1 active deployment
Preview — c74885bf Deployed Sep 26, 2026 by vercel[bot]
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.

2 participants