Skip to content

docs: prefer shadcn/ui for frontend components - #6

Closed
Roy-Kid wants to merge 2 commits into
devfrom
claude/issue-5-shadcn-pref
Closed

Roy-Kid wants to merge 2 commits into
devfrom
claude/issue-5-shadcn-pref

Conversation

@Roy-Kid

@Roy-Kid Roy-Kid commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Document a frontend component-library preference in CLAUDE.md. Adds a short
"Component library preference" subsection inside the existing UI Layer section
so contributors know to reach for shadcn/ui first and to justify any deviation
in the PR description.

Changes

  • CLAUDE.md — add 4 lines (one heading + two bullets + blank line) under the UI Layer section.

Out of scope (per the issue)

  • No shadcn dependency added.
  • No example components written.
  • No other files touched.

Test plan

  • git diff shows only additions to CLAUDE.md.
  • New section contains both required statements verbatim.
  • Markdown renders cleanly (subsection lives next to other UI Layer conventions).

Closes #5

Roy-Kid and others added 2 commits April 18, 2026 19:09
* update

* feat: add molexp run command with ExperimentDef and SLURM/molq support

- Add ExperimentDef dataclass and standalone_run() helper in runner.py
  for declarative parameter sweep definitions with GridSpace support
- Add top-level `molexp run` CLI command (renamed old sub-group to `runs`
  to free the name); supports --dry-run and --slurm flags
- SLURM submission powered by molq plugin with inline CLI resource args
  (--partition, --gpus, --gpu-type, --mem, --time, --cpus, --account)
  instead of JSON resource files
- Add RunContext.open(run_dir) classmethod for reconstructing full
  workspace hierarchy from a run directory path
- Add dry_run: bool and labels: dict[str,str] fields to RunMetadata
  so dry-run records are visible in the UI with appropriate badge
- Re-export ExperimentDef and standalone_run at molexp package level

* refactor: architecture convergence to pydantic-graph + PydanticAI

Major refactoring replacing the custom workflow engine with pydantic-graph
based runtime, and adding PydanticAI-powered agent layer.

- Replace workflow/compiler, engine, control, plugin with _pydantic_graph runtime
- Add functional DSL (@wf.step) and OOP builder (WorkflowBuilder) APIs
- Add agent layer (plugins/agent) with PydanticAI integration
- Add remote execution plugins (SLURM/molq backends)
- Restructure workspace layer (simplified Project/Experiment/Run)
- Add ParamSpace (GridSpace, UniformSpace) to workspace
- Update server routes and schemas for new architecture
- Reorganize tests to mirror source structure
- Update UI with AgentViewer, SnapshotViewer, mock handlers
- Add CLAUDE.md, LICENSE, architecture docs
- Add uv.lock for reproducible builds

* refactor: establish lint/type baselines and remove dry_run late-bind

Python:
- Add ruff config (E/F/I rules) to pyproject.toml; fix all 46+32 issues
  (unused imports, unused vars, unsorted blocks, F821 WorkflowDeps)
- Add ExecutionConfig(frozen dataclass) to workspace/models.py
- RunContext: replace _execution_dry_run with _execution_config at
  construction time; remove _bind_execution_mode late-bind entirely
- _execution_scope in GraphWorkflowRuntime: raises immediately when
  run_context + dry_run=True; creates RunContext(run, ExecutionConfig)
  directly instead of calling _bind_execution_mode post-construction
- Run.start() always creates normal-mode RunContext; RunContext.open()
  restores dry_run from persisted metadata
- Tests: RunContextStub no longer has _bind_execution_mode; new test
  asserts run_context+dry_run=True raises ValueError

Frontend:
- Add Biome 2.4.11 + biome.json; add lint/lint:fix/format/typecheck scripts
- Fix 5 tsc errors (fixture type mismatch, unused vars, missing agent
  entry in metadata.ts, RendererEntry.Component return type)
- Fix 144 Biome errors: noExplicitAny, noArrayIndexKey, noNonNullAssertion,
  useButtonType, a11y keyboard/role, useIterableCallbackReturn, noUselessFragments

* fix: promote pydantic-graph to core dependency

GraphWorkflowRuntime is the only concrete runtime implementation —
keeping pydantic-graph as optional made pip install molexp silently
unusable for any workflow execution. Also removed the dead
_NotImplementedRuntime fallback and the now-empty [workflow] extra.

* fix: tighten pydantic/pydantic-graph/pydantic-ai version floors

Old lower bounds (>=0.0.20, >=2.5) accepted pre-1.0 releases that have
completely incompatible APIs. Align with the 1.x series that the
codebase is actually built and tested against.

* chore: update backend, frontend, and tests

* refactor: plugin-driven multi-backend CLI with no fake defaults

- Replace monolithic `molexp run --slurm` with sub-app:
  `molexp run slurm/pbs/lsf` (auto-registered by submit_molq plugin)
- DefaultLocalGroup auto-resolves `molexp run train.py` to local
- All resource options Optional with no defaults (scheduler decides)
- Rename plugins: agent → agent_pydanticai, new submit_molq
- Delete plugins/remote/ (RunSubmission, ExecutionBackend, MolqBackend)
- Plugin uses molq types (JobResources, JobScheduling) directly
- Remove dead capabilities (REMOTE_EXECUTION, EXECUTION_BACKEND, TRANSFER)

* feat: add --bg flag for background local execution

molexp run train.py --bg forks a detached subprocess and logs to
<workspace>/molexp_bg.log. Also adds cli/__main__.py for python -m
molexp.cli invocation.

* chore: remove tracked __pycache__ files

These were committed before .gitignore had the __pycache__/ rule.

* refactor: flat `molexp run SCRIPT --backend` CLI replacing subcommands

Replace the `run local/slurm/pbs/lsf SCRIPT` subcommand tree with a
single flat command: `molexp run SCRIPT [--local|--slurm|--pbs|--lsf]`.

- Remove `_DefaultLocalGroup` hack and `run_cmd` sub-app
- Delete `plugins/submit_molq/commands.py` (absorbed into cli/__init__.py)
- Cluster backends imported lazily; molq is no longer required at import time
- Options grouped via rich_help_panel into Backend / HPC / SLURM / PBS+LSF
- Fix worker.py: move load_projects() inside RunContext to ensure FAILED
  status is written when script loading raises before the with-block
- Update test to verify new grouped-panel help structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* replace logger and config with mollog and molcfg

* fix: block mode prints OK after wait(), not before monitor panel

* feat: split run dir into artifacts/ + logs/, add cancel and job-id tracking

- workspace: introduce logs/ alongside artifacts/; error.txt moves out of
  artifacts (drops error.json since RunMetadata.error already captures it)
- run: add update_job_ids() and cancel(); rename run dir to run-{id};
  retry run.json load on Lustre/NFS to tolerate metadata-cache staleness
- cli/server: surface cancel + slurm/molq job IDs; new /runs/{id}/logs and
  /runs/{id}/execution endpoints; UI RunViewer renders them

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix zombie

* feat: add molq plugin runtime

* update workspace model

* improve ui

* update molexp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(submit_molq): move worker logic into molexp core

- Add `RunMetadata.script` field: persisted at submit time so any node
  can reconstruct the full execution from run_dir alone.
- Add `molexp execute <run_dir>` CLI command: loads the script, finds the
  matching workflow via `find_workflow_for_run()`, and runs it. This is
  the new worker entry point for cluster backends.
- Add `entry.find_workflow_for_run()`: extracts the workspace-traversal
  logic from the old plugin worker into core where it belongs.
- Simplify `SubmitHandler`: argv now calls `molexp execute <run_dir>`;
  removes the execution_id pre-computation that duplicated RunContext
  internals. stdout/stderr go to run_dir/{stdout,stderr}.log.
- Delete `plugins/submit_molq/worker.py`: plugin now only handles
  scheduler interaction; all execution logic lives in core.
- Drop `script` from `RunHandler` signature and all call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(workspace): track per-execution history and per-execution error files

- Add ExecutionRecord to execution_history on every RunContext enter/exit
- Generate execution_id (exec-{run_id}[-N]) that mirrors the workflow runtime
- Write timestamped run.log entries for start and finish
- Save error.txt under execution/{exec_id}/ instead of logs/
- Fix monitor.py: read cluster_name from executor_info dict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update cmd

* build: switch to hatchling + manual npm build:ui, aligned with molvis

Drop the custom setup.py build_py hook and MOLEXP_SKIP_UI_BUILD escape
hatch. Frontend is now compiled by `npm run build:ui` (root workspace
script) which populates src/molexp/_webapp/; hatchling packages it via
the artifacts declaration. Release flow: `npm run build:ui && python
-m build --wheel`.

* ci: add pre-commit config and GitHub Actions CI workflow

- ruff-format, ruff lint, ty type check on every commit
- pytest matrix on Python 3.12/3.13 with coverage

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Document the component-library preference in the UI Layer section of
CLAUDE.md so contributors know to reach for shadcn/ui first and to
justify any deviation in the PR description.

Closes #5
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying molexp with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3caa369
Status:🚫  Build failed.

View logs

@Roy-Kid

Roy-Kid commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing as stale — this branch is 207 commits behind dev. Its CI/pre-commit commit is already on dev, and its only live content (the shadcn/ui CLAUDE.md note) is re-landed cleanly in #9.

@Roy-Kid Roy-Kid closed this Jun 1, 2026
@Roy-Kid
Roy-Kid deleted the claude/issue-5-shadcn-pref branch June 2, 2026 10:54
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.

Frontend: prefer shadcn/ui components (document in CLAUDE.md)

1 participant