Skip to content

feat!: native single-pass shader renderer (0.2.0) - #6

Merged
rehmatsg merged 81 commits into
mainfrom
feat/native-shader-renderer
Nov 16, 2026
Merged

rehmatsg merged 81 commits into
mainfrom
feat/native-shader-renderer

Conversation

@rehmatsg

@rehmatsg rehmatsg commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Showing a beam heated phones. The 0.1.0 renderer emulated the React library's CSS layer stack on a Canvas: per frame 3–4 saveLayers, an ImageFilter.blur plus a MaskFilter.blur, five anti-aliased path clips, and full-rect dstIn masks, all re-rasterized on every vsync. The pulse variants' "30fps cap" only skipped repaints; the ticker still produced a frame every vsync.

Result

Nine 230×110 cards (three each of rotate, pulse, and 0.1's pulse-outside), dark theme, flutter run --profile -d macos --enable-impeller, FrameTiming over 6 s after a 3 s warm-up, measured during development:

raster avg raster p99 build avg frames in 6 s
0.1.0 (main) 54.03 ms 56.96 ms 8.25 ms 108 (~18 fps)
this PR 0.45 ms 1.13 ms 0.35 ms 713 (display-bound)

About 120× less raster time. Release builds run smoothly on an iPhone at 120 Hz, but no FrameTiming profile has been taken on a phone.

What changes

Renderer. shaders/beam.frag evaluates every layer of an effect per pixel and composites them in one draw call — no saveLayer, clip, ImageFilter, or MaskFilter. Each layer follows the original design's construction (radial colour-blob stacks, conic windows and highlights, an edge-faded inner glow with an inset shadow, a hairline ring, a colour filter); every blur is analytic. test/render/frame_budget_test.dart asserts the one-draw budget across every effect × theme × palette × shape × instant.

Effects. BorderBeam(effect: BeamEffect.rotate() | line() | pulse()). small folds into rotate (compact tables at a short side ≤ 56 px); rotate gains length, count, and comet; line takes an edge. pulseOutside has no direct replacement (the CHANGELOG points at pulse() or rotate(comet: true)).

Motion. Fades run on critically damped springs (BeamSpringCurve, Apple's damping-ratio + response model): about 0.5 s in, 0.6 s out, in real time regardless of speed. The 0.1 spring overshot and was clamped, so its "0.5 s" fade-out actually cut to zero at 135 ms. The pulse's corners breathe in quicker than out.

Superellipse corners follow Flutter's own RSuperellipse construction (ported from impeller), so a beam sits on RoundedSuperellipseBorder at every aspect ratio: a 270×56 pill went from 3.5 px off to under 0.02 px, and a 200 px circle from 12.6 px to 0.02 px. A test renders the real shader at 3× and checks its distance against the Dart mirror.

Palettes. 19 presets (the 4 originals, 7 existing extras, 8 new), plus BeamColors(colors, stops:), .solid, .fromSeed, .fromScheme, .lerp, .scaleAlpha.

API. The CSS-emulation knobs are gone (renderScale, themeConfig, opacity factors, blur/brightness/saturation hooks, sparkle, arbitrary contours, …); BorderBeamThemeData gains effect; BorderBeam.precache() loads the shader early. Full migration table in the CHANGELOG.

Fixes (a defect list that had been pinned by skipped tests, now all passing): fades no longer scale with speed; a controller can move between beams in a frame and its speed composes with speedListenable; a cycleGap-only change keeps the sweep in place; a BeamSync member's retime no longer moves the group; releasing follow keeps a bouncing beam's direction; debugFrozenAt toggles at runtime; BeamDecoration honours repeat; non-finite inputs count as unset; the line's bloom stays blurred under a fixed hue (gold).

Example. A one-screen showcase: swipe between the three effects, each on the kind of widget it's for, with palette swatches and a theme toggle, on continuous corners. The playground, snippet generator, and share links are gone; CI gates the example on analyze and a web build.

Docs & media. README, doc/, CHANGELOG 0.2.0 (with migration table), CONTRIBUTING, and CLAUDE.md are checked against the code — every Dart snippet analyzes, every link resolves. Screenshots and the showcase reel are re-captured from this renderer.

CI & packaging. Actions pinned to SHAs with least-privilege permissions and timeouts; .pubignore no longer ships gitignored files (CI's archive had been 18 MB); stricter lints including comment_references; pana must score full marks. Decoupled from upstream: the transcribed constants, spec fixtures, parity tests, tool/spec/, and the drift workflow are removed; credits and the MIT notice are kept.

Since the first review

  • material_ui, Flutter ≥ 3.47. The package, tests, and example import material_ui instead of the deprecated package:flutter/material.dart. Its Theme/ColorScheme are separate types from the framework's, so BeamTheme.auto reads a material_ui theme and fromScheme takes a material_ui ColorScheme; README, the theming guide, and the CHANGELOG give apps on the old import the migration command. The floor moves to Flutter 3.47.0 / Dart 3.13 (material_ui's), and the min-SDK job is now named Minimum supported Flutter with no version so later bumps don't rename a required check.
  • CI pins Flutter 3.50.0; all 92 goldens pass unchanged on it.
  • API decisions: attach/detach and clockOf/reducedMotionOf are hidden; BeamFocusRing.colors is nullable, so style and theme colours reach it; controller.start() resumes a paused beam.
  • Reduced motion now holds a controller-driven beam still (start()/resume() no longer tick under staticFrame/hide). A non-finite controller or BeamSync speed throws in release builds too.
  • cubic review: all 64 threads triaged against the current code: 47 fixed (one commit each), 12 obsolete after the effect removals, 5 declined with reasons on the thread.
  • Dependabot ci: bump the github-actions group across 1 directory with 6 updates #5 is merged to main and folded in: each action keeps its SHA pin, moved to the major Dependabot chose.

Verification

analyze tests goldens
Flutter 3.50.0 (CI pin) --fatal-infos clean 910 passed, 0 skipped 92 / 92
Flutter 3.47.0 (min) clean passed (CI) —
  • pana full marks in CI; dart pub publish --dry-run: no warnings, shaders/beam.frag included.
  • Example: flutter analyze --fatal-infos clean, flutter build web succeeds.

For review

  1. Superellipse corners with uneven radii keep each corner to its own quarter of the box rather than Flutter's proportional split: exact in ordinary use, off by about 2% of the radius only where a half-short-side corner meets a square one.
  2. Branch protection still lists the old required check Minimum supported Flutter (3.35.0); it should become Minimum supported Flutter.
  3. After merge, watch the first Pages deploy from this branch's workflow: the build job has pages: read; give it pages: write if configure-pages refuses.
  4. Follow-ups, not in this PR: the shader's per-layer colour matrix is now always the identity (filters fold on the CPU) and the dither toggle is always on, so both can be dropped from the uniform block. rotate's inner glow and pulse's bloom replace the palette's alpha with a fixed design alpha, so scaleAlpha doesn't dim those two layers.

🤖 Generated with Claude Code

rehmatsg and others added 12 commits November 15, 2026 02:40
Replaces the CSS-emulation canvas renderer (saveLayers, image/mask blurs,
path clips) with one fragment shader drawn in a single pass. Introduces
the sealed BeamEffect (rotate, line, pulse, halo, flow, spin, shimmer,
charge), stop-based BeamColors with new presets, and pruned value types.
Removes the transcribed upstream constants.

Tests, example, and docs are migrated in follow-up commits on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drops what only made sense for the CSS-emulation renderer: the upstream
spec fixtures and transcription parity tests, the painting tests (ring
geometry, colour matrix, saveLayer budget, segment/surface paint), the
oscillator and line-period tests, the research-feature tests, and every
test of removed API (BeamVariant, BeamThemeConfig, BeamBlob, fps cap).

Migrates the value objects, BeamColors, BeamConfig.resolve, the clock,
spring, phases (including the seeded property test), BorderBeam's
behaviour, and the four interaction widgets to the BeamEffect API.

Adds test/render/: the shader's uniform layout against
beamUniformFloats, a frame budget (one draw call, no saveLayer, clip,
or image/mask filter, balanced saves) across every effect, theme,
palette, shape, and instant, emission sanity and segment confinement,
boundary cases, a pixel smoke sweep, and pixel-level structure checks.

Rebuilds the goldens around effects in five families (beam, palette,
motion, surface, widgets) staged in a shared margin-padded scene.

Sixteen tests document defects the code does not have fixed yet and
are skipped with a one-line reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recalibrates all eight emitters against the 0.1 goldens and in both themes:

- rotate: a long lit window (soft lead, plateau, slow tail through the
  corner) with a white-hot core behind the head, and a broad, dim inner
  glow along the tail.
- line: wider streak that swells mid-run and fades near the ends; seven
  soft spikes of varied height and breathing rate plus a hot core; spike
  height capped on tall surfaces.
- pulse: dim ring with breathing corner/edge patches and a shallow wash.
- halo: thin rim plus large soft clouds standing off the border, sized to
  the widget (capped on large surfaces).
- flow, spin, shimmer, charge: refined weights; shimmer keeps its angle true
  in pixels and lights the edge where the glint crosses it; charge brightens
  toward a soft, white-hot tip.
- Achromatic palettes are dimmed (x0.5 for greys), light-theme glows are
  lifted to full value, and the light-theme highlight deepens a colour into
  its own ink instead of greying it.

Shader (same uniform layout and float count): a bump plateau factor, bump
width capped at half the ring (no seam on wide/widened bumps), and segment
and dash ends that soften with distance from the stroke. Ambient anchors
are cached per outline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er-renderer

# Conflicts:
#	shaders/beam.frag
Merges the visual tuning pass. Two emission tests asserted pre-tuning
structure (one bump per rotate beam, a unit-length sweep direction); they
now check the invariants instead. Goldens regenerated on macOS with
Flutter 3.47.4. Removes the throwaway render harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- phaseOffset now shifts the ambient breathing clock too, so two pulse or
  halo beams on different offsets are out of step.
- glow below 1 fades the bloom, halo, and point lights as well as
  shrinking them; glow 0 leaves only the stroke, as documented.
- follow takes the shortest way round only for a full-ring rotate; line,
  shimmer, charge, and a segment-bound rotate follow linearly within 0–1
  instead of wrapping through their ends.

Un-skips the five tests that documented these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrites the README, doc/, CLAUDE.md, and CONTRIBUTING.md for the
single-pass shader renderer and the BeamEffect model: eight effects, 19
palettes, a Performance section (one draw, no offscreen work, 120Hz setup,
precache, Impeller notes), and an architecture guide covering the frame
pipeline, the d/u light model, point lights, the BeamOutline mirror, and
the uniform layout contract. doc/effects.md replaces doc/variants.md;
doc/parity.md is removed.

Adds the 0.2.0 CHANGELOG section with the rationale, breaking changes,
and a migration table, and bumps pubspec to 0.2.0 with a new description.

Finishes the decoupling from upstream border-beam: removes the drift
workflow and tool/spec/, drops the spec fixture from .pubignore (shaders/
still ships), and pins CI, release, and pages to Flutter 3.47.4, the SDK
the goldens are generated on. Templates and labels speak of effects and
the one-draw budget instead of variants and the saveLayer table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the docs in line with the phaseOffset fix and removes leftover
React/upstream references and removed-API examples from library doc
comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gallery, playground, reels, and tests now speak BeamEffect instead of
BeamVariant and the named constructors.

- main(): awaits BorderBeam.precache() after ensureInitialized.
- Gallery: Rotate/Pulse tabs on the new API (small folds into rotate,
  pulse-outside becomes an unclipped halo); new sections for flow, spin,
  shimmer, and charge on their own mock surfaces, every effect in
  BeamEffect.values, all nineteen presets (the eight new ones tagged), and
  a charge filling an upload row to a looping progress value.
- Playground: effect picker with per-effect params (rotate
  length/count/comet, line edge, shimmer angle); every preset plus
  custom/seed/lerp; the 0.2 BeamStyle, BeamShape (dashes, all eight
  segment presets), and BeamTiming fields; effect-aware defaults and
  gating. Removed fields are gone from controls, snippet, and codec.
- Snippet: always names the effect; every emitted snippet compiles.
- Share codec: reads 0.1 links (variant ids, moved fields) and ignores
  unknown keys.
- Reels: the harness precaches the shader; the showcase covers all eight
  effects; pulse_outside_demo.dart becomes halo_demo.dart (prefix HALO).
- Fixes two phone-width overflows (focus field, playground toolbar).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rehmatsg
rehmatsg marked this pull request as ready for review November 15, 2026 20:35

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 349 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread test/widget/beam_sync_test.dart Resolved
Comment thread doc/motion.md Resolved
Comment thread lib/src/models/beam_config.dart Resolved
Comment thread CHANGELOG.md Resolved
Comment thread test/models/beam_config_test.dart Resolved
Comment thread README.md Resolved
Comment thread lib/src/effects/beam_effect.dart Resolved
Comment thread example/README.md Resolved
Comment thread lib/src/animation/beam_phases.dart Resolved
rehmatsg and others added 5 commits November 15, 2026 13:17
The shader now evaluates the reference design's layers per pixel — an
edge-faded inner glow with an inset shadow, the 1px stroke with its blob
stack under a white/black conic highlight, and the bloom band — composited
in order, with the colour filter folded into each colour on the CPU. Blurs
become analytic: the bloom is a gaussian across the ring times the
pre-blurred conic band. Boxes 56px or shorter use the compact chip tables.

The original palettes' blob tables, theme presets, conic stops, line and
pulse tables return as owned design data under lib/src/look/. Custom
palettes sample their stops into colorful's blob geometry; the extras cycle
their colours over it. Tests are rebuilt in a following commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line paints its three original layers: the inner glow and hairline
stroke seen through the radial window that rides the edge, and the bloom of
seven spikes plus the travelling dot and ambient glow (a soft shadow on light
surfaces), animated by the width, height, spike and edge-fade keyframes with
the bloom on its own wider hue swing. Mono softens its spikes instead of
halving opacity. Blurred blobs become energy-preserving gaussians, cut at
the edge before the blur so light below it never spills back in. Other edges
turn the frame; a segment runs the streak in path space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pulse paints the original inward pulse: the 17-oscillator bank breathes the
border blobs (size, drift, corner opacity, height) on the inner glow with
its corner accents and on the hairline, under a static bloom on the blurred
ring. halo paints the tuned outward glow — a wide static wash and a
breathing core, both blurred blob stacks scaled about the centre and seen
only outside the child, with their own brighter colour filter applied to
the composite — around the breathing hairline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l's language

The four newer effects now share the reference look: a hairline colour
ring of soft blobs laid along the outline (coloured from the palette where
each sits, their axes following the outline's normal so corners stay
seamless), an edge-faded inner glow with the inset shadow, a conic
highlight over the ring at the head, and the analytic bloom.

spin turns the full ring with a bright head; flow is the pulse's breathing
field streaming around the border; shimmer is a narrow glint band sweeping
the ring; charge fills the ring to the progress with a hot head. Chips get
the compact tuning, and edge fades stop at 0.4 of the box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dens

beam_frame_test replaces the emission test: every frame finite and in
range, each effect's layers built the way the design builds them (rotate's
three layers and compact tables, line windows riding each edge in reading
order, the charge fill, the shimmer sweep, streaming flow and spin), the
palette tables (own, cycled, sampled from stops, scaled), and tracks kept
inside segments. The frame budget counts a frame with no lit layer as
drawing nothing; the uniform layout test checks the arrays against the
frame data's slot counts and the shader's loop bounds.

The comet's glow outside the border fades out again. Goldens regenerate on
the restored look; the architecture, performance, effect, and palette docs
and CLAUDE.md describe the layer model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 156 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread test/render/uniform_layout_test.dart Resolved
Comment thread test/render/uniform_layout_test.dart Resolved
Comment thread doc/architecture.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/src/animation/beam_phases.dart Resolved
Comment thread doc/performance.md Resolved
Comment thread test/render/render_utils.dart Resolved
Comment thread doc/effects.md Resolved
Comment thread CLAUDE.md Resolved
Comment thread doc/performance.md Resolved
rehmatsg and others added 6 commits November 15, 2026 23:47
0.2.0 ships the four effects carried over from the original — rotate,
line, pulse, and halo — on the single-pass shader. The 19 palettes,
including the eight new ones, stay.

- BeamEffect.flow/spin/shimmer/charge and their classes are removed, along
  with their emitters and the follow mapping for shimmer and charge.
- The shader's linear band window and the overlay-above-blobs option,
  which only those effects used, are removed. The uniform layout is
  unchanged; the freed slots are unused.
- BeamFocusRing defaults to BeamEffect.rotate(), which takes the compact
  chip look on small controls, as 0.1's `small` default did.
- Tests and goldens retargeted or removed; the palette goldens now render
  on pulse with the hue drift off. Docs describe four effects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gallery and the playground gave the beams little room among dense
controls. The example is now one screen: a large stage you swipe between
the four effects, each on the kind of widget it is made for (a task card,
a chat composer, a "thinking" card, a call-to-action pill), a caption
with the matching code, an effect selector, and one row of palette
swatches. Tap the stage to fade the beam out and in; a toggle flips dark
and light, and the beam's theme follows.

- Removes the playground, its snippet generator and share links, and the
  example's tests; CI gates the example on analyze and the web build.
- Keeps the recording reels (showcase, halo_demo, demo_harness).
- The live site and issue templates now point at the demo rather than
  share links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fixed hue — the gold preset, or `hueMode: BeamHueMode.none` on any
palette — set the line's bloom blur to zero, so its spikes rendered as
hard needles. The bloom now keeps its blur whatever the hue mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fade envelope ran an under-damped spring that overshot past its
target and was clamped, so a nominal 0.5s fade-out dropped 45% in the
first 50ms and cut to nothing at 135ms. Fades now run on `BeamSpringCurve`,
a spring described as Apple's APIs describe one (damping ratio and
response): critically damped, about 0.48s in and a gentler 0.58s out,
easing from rest and settling without overshoot. The pulse and flash
accents keep a light bounce on their rise.

`BeamClock.fadeInSeconds` / `fadeOutSeconds` are the springs' settling
times, and the tests derive their timings from them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pulse's four corner-opacity oscillators swung on an even cosine. They
now follow a breath: a swell over the first 40% of each cycle and a
slower fade back over the rest, both on Apple's ease-in-out, so light
arrives with intent and leaves gently. Size and drift keep their even
swing. Pulse-based goldens regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.2.0 ships three effects: rotate, line, and pulse. The halo — 0.1's
pulse-outside — is gone, with the geometry only it used (the glow behind
the child), its look data and presets, its oscillator tuning, its tests
and goldens, and its example page and demo reel. `BeamDecoration`'s
golden now shows a pulse.

Tests that used the halo as a stand-in now use another effect; the
dashes structure test reads the pulse's hairline with the glows off.

The example's surfaces and beams also move to continuous (superellipse)
corners, so each beam sits exactly on its card's edge, and the example
takes `START`, `PALETTE`, and `THEME` defines for captures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 167 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread doc/palettes.md Resolved
Comment thread doc/effects.md Resolved
Comment thread pubspec.yaml Resolved
Comment thread doc/accessibility.md Resolved
Comment thread doc/motion.md Resolved
Comment thread README.md Resolved
Comment thread lib/flutter_border_beam.dart Resolved
Comment thread test/animation/spring_curve_test.dart Resolved
Comment thread CLAUDE.md Resolved
Comment thread CLAUDE.md Resolved
rehmatsg and others added 3 commits November 16, 2026 01:50
`BeamShape(superellipse: true)` approximated Flutter's `RSuperellipse`
with one fitted p-norm curve. That held for ordinary card corners but
drifted as the radius approached half the short side: on a 270×56 pill
the beam sat up to 3.5 px off a `RoundedSuperellipseBorder`, leaving dark
crescents at the ends, and a 200 px circle was 12.6 px off.

The outline now ports Flutter's own construction (impeller's
`round_superellipse_param`): each corner is two halves, each a
superellipse from the middle of its edge to a joint and then a circular
arc to the diagonal, with the exponent and joint taken from the ratio of
the edge's half-length to the radius. `BeamOutline` and the shader's
`outline()` mirror it exactly; the shader derives each corner per pixel
from the existing uniforms, so the layout is unchanged (`uShape.x` is
now the corner model). Deviation from Flutter's path is now ≤ 0.06 px
across cards, pills, stadiums, and circles. 3.47.4 and 3.50 build the
shape identically.

Tests compare the outline with Flutter's path both ways over twenty
shapes, check inside/outside against `RSuperellipse.contains`, check
continuity off the border, and render the real shader at 3x to check its
distance against `BeamOutline.locate`. One golden moved:
surface_rotate_squircle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playback:
- Fades and the pulse/flash accents run on real active time: `speed`,
  `seek`, retiming, and reduced-motion `slow` move only the animation, so
  "about 0.5s in, 0.6s out" holds at any speed. Pause still freezes them.
- A controller's `speed` composes with `speedListenable` and the
  reduced-motion rate; a controller can move to a new beam in the same
  frame; `seek` notifies listeners like every other command.
- A `cycleGap`-only change retimes in place; under `BeamSync` a member's
  cycle change no longer moves the rest of the group.
- Releasing `follow` keeps a bouncing beam's direction and stays out of
  the gap rest; `debugFrozenAt` can be toggled at runtime;
  `BeamDecoration` honours `playback.repeat`; a completed fade-out ends
  any boost.
- The monochrome seed harmony keeps its documented saturation floor.

Inputs: NaN `progress`, non-finite `follow`, and non-finite style and
shape numbers are treated as unset; a negative feather asserts.

Code: unused members removed across the renderer, frame data, colour
maths, and look tables; doc comments corrected (three effects, CPU-side
palette blending) and every dartdoc reference resolves. The two
`package:flutter/material.dart` imports carry a targeted ignore with the
reason, since 3.50 deprecates them and earlier supported SDKs lack
`material_ui`.

Tests: all eleven `defect:` skips are fixed and un-skipped. Equality
tests now compare distinct instances; the render sweeps fail on a blank
frame; new tests cover the pulse breath, controller notifications, the
palette cache, and more; duplicated tests are removed; fade waits derive
from the clock's fade lengths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `.pubignore` replaces `.gitignore` for pub, so the published archive
  was picking up gitignored files — in CI, the 17 MB Codecov uploader and
  coverage data. It now repeats the `.gitignore` entries and excludes
  coverage and the uploader; `shaders/` and `screenshots/` stay in.
- Every action is pinned to a commit SHA, checkouts don't persist
  credentials, each job has a timeout, and Pages gets least-privilege
  permissions per job. Only PR runs cancel each other, so `main` always
  finishes its goldens.
- The publish dry run runs before tests touch the checkout; pana installs
  the WebP tools and requires full marks; a shader-only change redeploys
  the Pages site.
- `analysis_options.yaml` adds correctness lints (unawaited futures,
  dynamic calls, sinks, `==` types) and `comment_references`.
- `tool/record_demo.sh` takes `--display` for multi-display simulators
  and its usage points at the showcase reel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rehmatsg and others added 28 commits November 16, 2026 10:34
beam_presets.dart holds the presets' stops and only references the blob
tables and the extras' table colours; the data itself lives in
look/palette_tables.dart and look/extra_palettes.dart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BorderBeam.effect takes one BeamEffect, so "rotate + line" suggested a
combination the API cannot express.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The presets' first stops sit past 0, so the sweep painted the first
colour flat from 12 o'clock to that stop and squeezed the last-to-first
blend into the end of the ring. Put the palette's own colour at 12
o'clock (its sample at 0) at both ends of the sweep, so the swatch wraps
the way the beam does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unknown name looked up null, so the beam drew its default palette
while the caption advertised the bad name and no swatch was selected.
Accept the define only when BeamColors.presets knows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pumping past the deadline let a leaked timer fire into the State's
mounted guard and pass. Ending short of it leaves the timer pending, which
the binding fails the test for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The case ran on the default rotate only, so no ambient effect was ever
given a gap here. Run it over every effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renderFrame reads back a box with a fixed margin around it, so a light
reaching past the margin was cropped without a word and every region read
short. Check each draw fits the image first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layout test checked names, sizes, and the total, so two declarations
swapped on one side passed. Work out each uniform's float offset from the
shader's declaration order, drive every BeamFrameData writer on a fresh
frame, and check its values arrive in the uniform the shader declares for
them, and nowhere else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
224 vec4s is 896 floats, but the bound allowed 900, one vec4 past what
OpenGL ES 3.0 guarantees a fragment shader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The loop-bound test read only BLOB_STACK's call sites, so the macro
could loop to a smaller bound and skip blob slots unnoticed. Check the
macro loops over its SLOTS parameter, and that TABLE_LOOKUP walks every
stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single long pump runs one frame, so the fade-out only started on it
and the beam was still ticking when each test ended. Wait out the hold
or minimum, settle the fade frame by frame, and check no ticker is left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unequal values may share a hash code, and Object.hash is seeded per run,
so the check could fail a correct BeamEffect. Equality alone shows each
parameter is part of the value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unequal configs may share a hash code, and Object.hash is seeded per
run, so the check could fail a correct BeamConfig. Equality is what
shouldRepaint compares, and what the test is about.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The direction test compared one horizontal centroid at a quarter turn,
where a mirrored sweep and one trailing its tail the wrong way nearly
coincide. Compare the centroid in both axes off the quarter turns, and
check on the frame data that every window and overlay, read at a screen
angle through the conic start, is the forward one reflected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frame sanity check let a table's stops stray past 0-1 as long as
they ascended. Require every stop of a table in use to lie in 0-1, every
stop of an unused one to be the padding 2, and every table a lit layer
reads to be in use, since a first stop past 1 drops the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test compared later samples only with the global peak, so a wobbling
rise or a second, smaller overshoot passed, and the settle band its
comment promised was never checked. Require a monotone rise to the
peak, a monotone fall back through 1, and nothing over 1 or under 0.99
after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The case dropped paintEverywhere's draw count, so a renderer that bailed
out on every frame passed. Non-finite inputs resolve to their defaults
and full strength, so the card must be lit, as in the other sanitised
positive-strength cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The table of playback commands left seek out, so a seek that stopped
notifying would pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BorderBeamController.attach/detach and BeamSync.clockOf/reducedMotionOf
were public members documented as internal, and their signatures used
BeamClock, which the package does not export. attach/detach move to an
unexported extension in the controller's library (it can still reach the
private clock), and the two lookups move to the unexported BeamSyncScope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BeamFocusRing.colors was a non-nullable field defaulting to ocean and fed
BorderBeam's colors shorthand, which wins over style.colors, so a ring's
own style colours and every BorderBeamTheme colour were silently ignored.
colors is now BeamColors?, like BeamHover's and BeamPress's: null inherits
style.colors, then the theme, and ocean applies only when neither sets one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A controller's start() or resume() set the clock ticking straight through
the reduced-motion guard, so under staticFrame or hide the beam still spent
frames (and under staticFrame it animated until something rebuilt it). The
beam now hears every controller command: under a still mode it holds the
clock at full opacity, so it shows the still frame (or nothing) without
ticking, and leaving reduced motion resumes it from there. stop() still
runs its fade-out down. Static mode follows the clock's visibility, so a
command or a finished fade rebuilds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start() was a documented no-op on any visible beam, paused or not, so a
caller who paused a beam and then pressed "play" saw nothing happen. On a
paused beam that is still showing it now carries on from the held frame,
as resume() does. A hidden or fading-out beam still fades in, and a
running one is still left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BorderBeamController.speed only asserted that its value was finite and
positive, so a release build let NaN or infinity into the clock and on to
every phase and shader uniform. A new validateSpeed helper, alongside the
other release-mode checks, throws an ArgumentError in every build mode and
leaves the rate in force untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BeamSync's constructor asserted only speed > 0, so double.infinity passed
in every build and NaN slipped through in release, making the group clock's
timeline non-finite. The const assert now also bounds the rate below
infinity, and the state runs validateSpeed before the rate reaches the
shared clock, so release builds throw instead of rendering garbage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layout test now derives each uniform's offset from the shader and runs
every BeamFrameData writer against it, and bounds the total at the 224
vec4s GLES 3.0 guarantees. CLAUDE.md and the architecture guide still said
it could not check the order and quoted a ~900-float budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flutter 3.47 deprecated package:flutter/material.dart in favour of the
standalone material_ui package. The package, its tests, and the example
now import material_ui alone (via the official migrate_design_widgets
fix), so the deprecation ignores are gone and analyze is clean on 3.50.

material_ui needs Flutter >=3.47.0 and Dart ^3.13.0, so both floors move,
and with them the min-sdk CI job. Its job name drops the version so a
floor bump no longer renames a required status check. On the 3.13
language version two constructors take private initializing formals, and
the offscreen test uses ScrollCacheExtent in place of the deprecated
double cacheExtent.

material_ui's Theme and ColorScheme are separate types from the
framework's: BeamTheme.auto reads a material_ui theme and fromScheme takes
a material_ui ColorScheme. README, the theming guide, and CHANGELOG say so,
with the migration command for apps still on the old import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves FLUTTER_VERSION in ci.yaml, release.yaml, and pages.yaml together,
with the docs that quote the pin. No golden needed regenerating: the whole
golden suite (92 scenes) passes unchanged on 3.50.0 on macOS, before and
after the material_ui move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main bumped the GitHub Actions by tag (checkout v7, codecov-action v7,
upload-artifact v7, configure-pages v6, deploy-pages v5,
upload-pages-artifact v5). This branch pins every action to a commit SHA,
so the conflicts resolve to this branch's workflows with each pin moved to
the latest release of the major Dependabot chose. upstream_drift.yaml stays
deleted, as this branch removed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rehmatsg
rehmatsg merged commit 45baeac into main Nov 16, 2026
6 checks passed
@rehmatsg
rehmatsg deleted the feat/native-shader-renderer branch November 16, 2026 18: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