Skip to content

docs: document sash.store one-way-seed intent and tech debt#58

Merged
ohxyz merged 1 commit into
mainfrom
docs/sash-store-rationale
Jun 11, 2026
Merged

docs: document sash.store one-way-seed intent and tech debt#58
ohxyz merged 1 commit into
mainfrom
docs/sash-store-rationale

Conversation

@ohxyz

@ohxyz ohxyz commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

What

Expands the comment on Sash.store (src/sash.js) from a one-liner into a /* */ block documenting its intended design and a known tech-debt gap.

Why

store is meant to be a one-way construction seed — config props flow from the top-level API into pane/glass construction, then stop. Data exchange for moves (attach/detach/swap) happens at the DOM layer, which is visible and debuggable in the browser.

But the code doesn't fully honor that yet: onDrop (droppable.js) is read at drop time and resizable (muntin.js) when a pane is split — both long after construction. So anyone who tries to clear store in onPaneCreate (a reasonable thing to attempt) would silently break per-pane onDrop callbacks and resizable-on-split.

The comment now records:

  • RATIONAL — the one-way-seed / DOM-is-the-exchange-layer intent.
  • TECH DEBT — the two late readers, and the concrete consequence: store can't be cleared until onDrop/resizable are moved onto the DOM/closures at build time.

Scope

Comment only — no behavior change.

@ohxyz ohxyz merged commit 7eb7ffb into main Jun 11, 2026
@ohxyz ohxyz deleted the docs/sash-store-rationale branch June 11, 2026 02:55
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.

1 participant