Commit Graph
7 Commits
Author SHA1 Message Date
Claude bf1c4ddc74 style: apply cargo fmt across workspace (as on main)
Formats the branch the way main's 9cf9ff2 did, so merging main only
conflicts where the code itself differs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
2026-10-11 18:29:37 +00:00
Claude b12a29b233 Dock: review fixes - hover, preview width, stale indexes, config healing
Fixes:
- Hover state no longer drops when the pointer moves up from one strip
  icon, group grip or title bar to the one above: iced handles the
  element above first, so the old element's "left" (None) cleared the
  hover just set. Leave messages now carry the element and only clear
  their own hover.
- The drop preview used the pallets' own widths; it now uses the
  group's width, matching where the pallet lands.
- Group indexes from messages (group grab, splitter) are looked up
  safely, so a message from before a layout change no longer panics.
- Floating placements read from the config are healed (finite, positive,
  at least the minimum size), like the group weights already were.
- The shown group's edge bar is centred in its row: a stack takes its
  height from its first layer, and the icon column was shorter than the
  row. The "Drag to move group" tooltip is removed.

Simplifications (no behaviour change):
- dock_open_at_default / dock_unpeek replace seven copies of "dock on
  the right if unplaced, then reveal" and four of "stop peeking".
- The drop target takes the grab offset as a parameter, so a drag
  update stores its state once.
- dock_set_open, ensure_settings, the shown-index bookkeeping after a
  group is removed and the on-screen width clamp each lose duplication.
- VBarLabel drops options its single caller never varied.
- The drop preview's landing computation is one helper.

Naming and consistency: pallet names in the + menu, the drag ghost and
the floating title bar go through t!(); StripHit::Tab becomes
StripHit::Join; stale comments updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
2026-10-09 20:53:42 +00:00
Claude 4db24b3bbd Dock: simplify drag, peek, width and open/close state
No intended behaviour change except the fixes noted below.

- One drag state: a single `DockDrag` (move pallet / group, width,
  splitter, floating size, Layer Manager column) replaces nine fields
  (dragging, dragging group, resizing, split, float resizing, origin,
  target, grab offset, layer column flag) that had to be kept in sync.
- `dock_expanded` becomes `dock_peek` with one meaning: a pallet revealed
  although it auto-hides. `dock_reveal(id)` shows a pallet's group and
  peeks it; commands that open a pallet now use it, so opening a pallet
  also switches its edge to that pallet's group.
- Each group stores its own width (falling back to its widest pallet's
  width until first sized), instead of every pallet's width being kept in
  sync. Pallet widths now only size floating pallets and new groups.
- One `dock_set_open(id, open)` holds every pallet's open and close path.
- Leftovers removed: the tab-group config format that never reached main,
  the multi-tab drag ghost header, the separate icon-hover message.

Fixes:
- Hovering a strip icon reveals an auto-hiding edge again (the icons had
  lost the hover message in the option B strip). Covered by a test that
  moves the pointer over the icon in the real view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
2026-10-09 20:15:09 +00:00
Claude 76883695c3 Dock: floating panels, tab groups and adjustable slot heights
Panels can now float over the workspace, share a docked slot as tabs,
and split an edge at heights the user picks.

- Dropping a panel away from the edges floats it at the pointer. Floating
  panels move by their title bar, resize from a corner grip, and come to
  the front when clicked.
- Dropping in the top or bottom quarter of a docked slot docks the panel
  above or below it, as before. Dropping in the middle adds the panel as
  a tab of that slot. Pressing a tab shows that panel; dragging a tab
  pulls the panel out again.
- While dragging, a blue ghost previews the result: the new slot, the
  slot with its future tab row, or the floating window.
- A splitter between stacked slots sets their heights; double-click it
  to make the slots equal again. Heights persist.
- A press only becomes a drag after 5 px of movement, so clicking a title
  bar or tab never moves the panel.

The persisted layout now stores each edge as tab groups with a height
weight, plus a list of floating panels. Configs with the old
bare-panel-id stacks still load as single-panel slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
2026-10-08 19:10:36 +00:00
Hakan SevenandClaude Opus 5.5 3013c1b570 feat(graph): node library as a docked panel; shared dock chrome
The node library leaves the overlay and becomes a dock panel (PanelId::
NodeGraph), docked on the right the first time the graph opens and movable
like any other panel; closing it closes the graph. It follows the block
palette's layout: title bar, then a search box with New / Open / Save
beside it, then the categories, of which only Objects starts open. Entries
are clicked (placed at the canvas top-left) or dragged onto the canvas.

The title bar (title, auto-collapse pin, close, drag to re-dock), the
toolbar icon button and the panel frame were copied across Properties,
Block Palette, External References and Browser; they are now
dock::title_bar, dock::tool_button and dock::frame, used by all of them.
Block Palette's two tool buttons gain tooltips, and External References'
Auto / Close tooltips are now translated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:17:44 +03:00
Hakan SevenandClaude Opus 5.5 857f2f2e58 feat(graph): save and open node graphs as .ocg files
The graph panel gets New, Open and Save. A .ocg file is JSON holding the
graph (nodes, parameters, links), the canvas (positions, open sections,
pan, zoom) and each object node's entity handles, plus the fingerprint
GUID of the drawing those entities live in. On open, handles are reused
only in that same drawing and only while the entity is still the node's
kind; otherwise evaluation creates new entities, so a graph opened in
another drawing never takes over unrelated objects. A drawing without a
fingerprint gets one when its graph is first saved.

Pins opencadcodec d6d534f (DXF now writes $FINGERPRINTGUID and
$VERSIONGUID), opencadkernel 5d9e921 and opencadgraph 5c9b004 (graph
JSON round trip).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 08:14:56 +03:00
Hakan SevenandClaude Opus 5.5 f537aff75c feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph
The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 07:34:23 +03:00