feat(workflows): batch enable toggles into the save queue, dither on truth - #25
Merged
Conversation
`hasData` lost its only consumer when the stat card stopped gating the chart on a non-empty series — noUnusedVariables and typecheck both failed on main. `.turbo/preferences/tui.json` is written by `bun dev` and is gitignored but not biome-ignored, so `bun run check` failed locally for anyone who had run the dev server. Excluded alongside .output/.tanstack/.vercel.
…truth
the grid's on/off switches wrote straight to the server on every flip. they
now bind through useSaveQueueField like the rules page, so a run of toggles
collects into one batch and the unsaved-changes bar commits or discards it.
mounting the bar is also what arms the nav guard while dirty.
commit fans out one write per flipped workflow. enabling runs the strict
validator server-side and can refuse — those keys stay queued via failedKeys
so the toggle keeps the user's intent on screen while the rest clear.
the dither now animates in and out, gated on `workflow.enabled` — the SERVER's
flag, never the queued toggle. texture on a card therefore always means the
workflow is genuinely live: flipping the switch does nothing to it until the
batch saves and the list refetches. easing is a quantized ramp so the texture
materialises in bands the way an ordered dither thresholds a gradient, rather
than a generic fade. opacity-only, so it survives reducedMotion as a
crossfade, and initial={false} keeps already-live cards from animating on load.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
useSaveQueueFieldlike the rules page, so a run of toggles collects into onebatch that the unsaved-changes bar commits or discards. mounting the bar is
also what arms the nav guard while dirty.
enableMutationis gone entirely — the save-queue contract is explicit that acontrol keeping its own mutation splits the source of truth.
validator server-side and can refuse; those keys stay queued via
failedKeysso the toggle holds intent on screen while the rest clear.
workflow.enabled— theserver's flag, never the queued toggle. texture on a card therefore always
means the workflow is genuinely live. the old optimistic cache update is gone,
it would have lied about exactly this.
materialises in bands the way an ordered dither thresholds a gradient rather
than a generic fade. opacity-only, so it survives reduced-motion as a
crossfade, and
initial={false}keeps already-live cards static on load.ci was red on main
two of four ci steps fail on main as of #24. both fixed here:
hasDatalost its only consumer when the stat card stopped gating the charton a non-empty series — failed noUnusedVariables and typecheck.
also excluded
.turbofrom biome:bun devwrites.turbo/preferences/tui.json, gitignored but not biome-ignored, sobun run checkfailed locally for anyone who had run the dev server. ci neversaw it on a fresh checkout.
still red, not from this branch
bun run typecheckfails onpackages/utils/src/guarded-fetch.ts:335—Uint8Array<ArrayBufferLike>is not assignable toBlobPartunder the webworkspace's lib settings.
@tripwire/utilstypechecks clean on its own; onlythe web workspace trips it. untouched here and needs its own change — widening
the
MultipartFile.bytestype ripples into the worker's economics digest andthe png encoder, which is not this pr's business.
checks