Skip to content

Feature/tags models migration#130

Open
pepijndevos wants to merge 4 commits intomainfrom
feature/tags-models-migration
Open

Feature/tags models migration#130
pepijndevos wants to merge 4 commits intomainfrom
feature/tags-models-migration

Conversation

@pepijndevos
Copy link
Collaborator

No description provided.

Pepijn de Vos and others added 3 commits March 19, 2026 19:20
Adds a reusable recursive-editor component (common.cljc) that handles
leaf fields (text/textarea/select/csv) and nested lists of maps with
add/remove. Replaces the bespoke parameters-editor in libman with a
declarative field descriptor schema.

Collaborative Work Statement:
- Originated from plan to unify nested data editors across the app
- Pepijn designed the field descriptor schema (:type, :children, :csv)
  and the recursive approach in plan mode
- Claude implemented the three functions (leaf-editor, list-editor,
  recursive-editor) and CSS, Pepijn caught the spec validation failure:
  adding empty {} violated ::parameter requiring :name — fixed by
  pre-populating from children
- Pepijn directed the UI polish: subgrid for column alignment, SVG
  Bootstrap Icons (XCircle/PlusCircle) with CSS fill-on-hover swap,
  "untitled" default for empty names
- Iterative CSS refinement over several rounds based on Pepijn's
  visual review of screenshots

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Refactors dbfield to store raw display text instead of a full copy of
the atom state. changefn is now called exactly once per edit (debounced,
on the real cursor) instead of twice. This enables a clean on-change
callback in recursive-editor without spurious double-fires.

Replaces the bespoke device property loop in editor.cljc with
recursive-editor, using post-action! as the on-change callback for
undo checkpoints and wire splitting.

Also adds :default support to leaf-editor field descriptors — model
parameter defaults now show as actual values in device property inputs
when the device hasn't set that prop explicitly.

Collaborative Work Statement:
- Pepijn identified that the double changefn call in dbfield was a
  design problem, not just a callback inconvenience — proposed storing
  raw text in the internal atom instead of the full map
- Claude traced through all dbfield callers and the mount/render/
  debounce lifecycle to verify the redesign was safe, Pepijn validated
  the reasoning
- Pepijn caught that :default from model params wasn't reaching the
  device property inputs — led to clarifying the semantics: :default
  maps to fallback value, :placeholder maps to HTML placeholder
- Claude implemented the editor.cljc refactor replacing the 8-line
  for loop with a single recursive-editor call

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the old category (hierarchical vector) and templates (map of
language → template list) with tags (flat list, first 2 form tree,
rest are badges) and models (flat list of model entries). Uses
kebab-case field names throughout (spice-type, port-order).

ClojureScript: updated specs, has-code-models? helper, tree/filter
use first 2 tags, model-list shows tag badges, recursive-editor
replaces bespoke template editor in libman, all detection checks
updated across libman/editor/anywidget/platform_web.

Python: _select_model_entry reads flat models list, spice-type
replaces use-x boolean, port-order for explicit connection ordering,
library+sections for .lib/.include directives, ModelEntry Pydantic
model with kebab-case aliases, api.py Mango selector uses tags.{i}.

Collaborative Work Statement:
- Originated from metadata.md schema design for gfp2-server/IHP PDK
  integration — Pepijn designed the tags/models schema
- Pepijn decided kebab-case throughout with gfp2-server as conversion
  boundary (already implemented snake_case in IHP/gfp2)
- Claude explored all 10 files for category/templates references,
  Pepijn validated the migration plan in plan mode
- Claude implemented CLJS changes (specs, tree/filter, detection
  checks, recursive-editor model entry editor, tag badges)
- Claude delegated Python changes to subagent (netlist, schemas, api,
  mcp_server), verified compilation and kebab-case consistency
- Pepijn directed git workflow: commit before rebasing onto new branch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Update model database to support both simulation models and p-cells Reevaluate taxonomy Recursive property editor

1 participant