Context
Feedback from bench, a ~6.5k-line production app built on stx + crosswind (a judge/review platform). I audited its client code to find every place it reaches past the framework into vanilla JS / raw DOM. The surprising result: nearly every workaround maps to an stx primitive that is already exported — so this is an adoption problem, not a missing-feature problem.
Filing it so (a) the delivery path can be verified against a released build, and (b) there's a migration story for existing apps.
Hack in the app → primitive that already exists
| What the app hand-rolls today (evidence) | Already-exported stx API |
|---|---|
window.location.pathname.match(...) for route params (ArticleView.stx:78, JudgeDirectory.stx:26, ~20 files) | useRoute · useRouteParams · useRouteParam |
URLSearchParams + history.replaceState filter state (stores/search.ts:32) | useSearchParams |
window.location.assign() redirects (stores/auth.ts:108) | navigate · redirect · goBack |
hand fetch on mount + manual AbortController (34 components, every store) | useFetch · useAsyncData · query |
setInterval(fetch, 30000) notification polling (stores/notifications.ts:82) | useEventSource · useSSE · useWebSocket · useChannel |
per-store setTimeout debounce; dropdown blur race ×4 (stores/judges.ts:136, BenchHeader.stx:24) | useDebounce · useClickOutside |
getElementById().focus(); navigator.clipboard/share (SettingsView.stx:106, ProfileHeader.stx:100) | useFocus · useClipboard · useShare |
hand-built ToastHost/ConfirmHost signal-array portal (stores/toast.ts:15) | StxToastBuiltin · StxModalBuiltin · Teleport |
"can't call ref.show()" (stores/toast.ts:15-20) | defineExpose |
N signals + manual error flags + manual focus per form (ReviewForm.stx:90-254) | defineForm · validateFields · defaultFormClasses |
effect(() => { void a(); void b() }) watcher hack ×12 (ReviewForm.stx:337) | watch · watchEffect · watchMultiple |
Suspected cause
This app was written while the runtime-delivery layer was broken — the batch of now-closed issues where composables existed in source but never reached the client (#1804, #1805, #1819, #1832). The team correctly fell back to vanilla JS at the time and never migrated back.
Ask
- Confirm these composables reach the client runtime in a released (non-fork) build, via a small smoke app.
- Publish an adoption / migration guide (or codemod) for apps that hand-rolled these before the delivery fixes landed.
- If any still don't reach the client in a release, treat that as the residual bug.