Skip to content

docs(datagrid-web): source reorganization proposal (feature-slices + kernel/shell) - #2368

Draft
iobuhov wants to merge 3 commits into
mainfrom
worktree-datagrid-reorg-doc
Draft

docs(datagrid-web): source reorganization proposal (feature-slices + kernel/shell)#2368
iobuhov wants to merge 3 commits into
mainfrom
worktree-datagrid-reorg-doc

Conversation

@iobuhov

@iobuhov iobuhov commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

What

Adds packages/pluggableWidgets/datagrid-web/docs/architecture-reorganization.md — an RFC-style proposal for reorganizing the widget's src/ module structure. Docs-only; no code moved.

Why

A structural review of datagrid-web/src (module tree + static import-coupling analysis) surfaced:

  • Three competing organizing principles at the top level — components/ (by type), features/ (by slice), model/ + helpers/ (by layer) — so a single capability is smeared across all of them.
  • Stateful MobX stores in 3+ places (model/stores/, helpers/state/, plus feature view-models & services); no principled split.
  • Four directory-level dependency cycles (components↔features, model↔features, model↔helpers, and an indirect loop), hubbed on model/tokens.ts.
  • Components acting as service locators (reaching into DI mid-render) rather than presentational.

Proposal (summary)

Keep the good model/ internal DI/MobX pattern, but redistribute it into feature-slices + a thin shared kernel:

shell → features → kernel → shared (acyclic, lint-enforceable). Delete helpers/, give each store one home in its feature, and split tokens.ts so each feature owns its DI wiring.

Includes an incremental, shippable migration path (5 steps) and a reduced-scope option (kill helpers/ + split tokens.ts) capturing ~70% of the value for ~30% of the risk.

Notes

  • Draft — this is a discussion artifact, not an implementation.
  • Coupling traced via static import analysis, not runtime.

🤖 Generated with Claude Code

…s + kernel/shell)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
iobuhov and others added 2 commits July 31, 2026 11:12
… external, slices are adapters, 5-tier layering)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant