Repository navigation
New controls and their protocol, client actions, local auth, and review follow-ups - #72
Merged
Merged
Conversation
fix: return milliseconds from Ruflet.duration
feat: add Stepper control
fix: keep DSL prop controls out of block children
fix: collect Ruflet.* helpers called inside DSL blocks
test: signal the reload child only after it has booted
fix: queue a hot reload requested while the app is still booting
fix: keep the reload readiness pipe private to the app and safe across restarts
fix: deliver default page view events to page handlers
chore: export the control surface for the engine contract
docs: note docked FAB locations float on iOS
fix: send sliding from cupertino_sliding_segmented_button
fix: send inline from cupertino_date_picker
#50 keeps overlays out of implicit DSL block children by wire type, and DatePicker is one of them. #62 then made cupertino_date_picker send the same DatePicker wire type with inline: true, so it renders in place. Together they dropped every inline picker from its block: `column { text("When?"); cupertino_date_picker(value: t) }` sent a Column with only the Text, and a top-level or page.mount picker never reached the page body. Page.presented_control? now treats an overlay built with inline: true as an ordinary control. cupertino_date_picker (inline by default) and date_picker(inline: true) stay children of WidgetBuilder blocks, Ruflet::DSL app blocks and roots, and Page#mount. A plain date_picker, or either picker with inline: false, is still the dialog the page presents and is not captured. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Ruflet had the on_views_pop_until event but no way to trigger it. page.pop_views_until(route, result:) follows Flet's Page.pop_views_until: it pops every view above the first view whose route matches, makes that route current, calls on_views_pop_until with the route, the result and the destination view, fires route_change when the route changed, and sends one view patch. An unknown route raises ArgumentError and leaves the stack alone. It runs on the server only, so no client change is needed. The views_pop_until event now has a typed payload (ViewsPopUntilEvent) with route, result and view; value stays the route, so client-sent events behave as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
PropControls.reclaim walked a control's props in argument order and
searched each owner list from its end with rindex. Prop controls are
attached in that same order, so they sit at the tail of the list and
every lookup scanned past all the later ones: building
list_view(controls: items.map { text(...) }) inside a block or at the
top level of a DSL app did n(n+1)/2 comparisons (8000 items: 1.47s, was
0.17s before #48).
reclaim now collects the owned controls and takes them back last-first,
so each lookup stops at the end of the list (8000 items: 0.18s).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Two follow-ups to #50 (overlays and services kept out of implicit DSL block children): - An engine service built through control()/widget() or a widget-style helper (control(:audio_recorder), interstitial_ad(...), widget(:flashlight)) inside a Ruflet::DSL app block or Page#mount was neither laid out nor registered as a service, so it was lost. DSL::App#control now adds such a control to the app's services, and Page#mount gives its WidgetBuilder (and every nested one) a services list that it adds to the page afterwards. Standalone builder blocks (Ruflet.column { ... }) still return services to the caller. - Since #50, Ruflet.* helpers inside a block attach to it, so page.appbar = Ruflet.app_bar(...) inside page.mount made the AppBar both the page app bar and a body control (same for the FAB, navigation bar, drawers and bottom app bar). The chrome setters and every page or view prop assigned through assign_split_prop (set_view_props, the DSL page(...), update(:page, ...)) now reclaim the control from the block. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Two follow-ups to #55 (page handlers for the default page View): - page.on_resize = nil (or any page-level, non-View event) deleted the on_resize flag from the page props, so the next patch sent nothing and the client, which merges page props, kept on_resize: true. A flag that was on is now set to nil so the client receives it; View flags are still dropped, since the View is rebuilt from its props on every patch. - reset_for_reload! cleared the page's controls and chrome but kept @page_event_handlers. Since #55 every page.on_x = handler lives there, so a handler the reloaded code no longer set kept running after a hot reload (and page.on(...) / on_route_change= ones already did). The server re-runs the app block on reload, so the handlers are cleared with the rest and registered again by the block. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Follow-up to #58. "R" marks the app not ready, but the ready-watcher thread only checked that child_pid had not changed, and it does not change until the respawn. An app that reported ready just after "R" (it ignored TERM while booting, which escalate_child_shutdown exists for, or its byte was already in flight) set ready = true again. The run loop then clears the restart flag before the respawn takes the lock, so an "r" in that gap signalled the reaped app, got ESRCH and ended the key reader for the rest of the session. mark_restarting now records the pid it retires, the watcher ignores a byte from that pid, and spawn_app_child clears it for the next app. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Two follow-ups to #59 (tools/control_surface.rb): - Chart, map, media, ad, color picker, code editor and DataTable2 classes have no keyword list and take **props, so ControlFactory.build passes any key through, but the export listed them with "keywords": [], which reads as "Ruby sends nothing". Entries and wire types now carry "open_keywords" (true for 51 wire types), so the engine contract test can tell "any key" from "none". The field is additive; contract_version stays 2. - --check compared raw text, so the same content was "stale" under a different json gem (Ruby 3.3's json 2.7 pretty-prints empty arrays over several lines, 3.4's json 2.9 as []). It now compares the parsed JSON; unreadable files are still stale. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
A bare page.update skipped every changed control that had a changed ancestor, on the assumption that the ancestor's patch re-sends it. It only re-sends the props (or children list) that changed: after `text.props["value"] = "b"; column.props["spacing"] = 3; page.update` the client got the new spacing and never the new text. The same hit a Stepper whose steps changed along with the stepper. A changed control is now left out only when one of the values its changed ancestor actually re-sends contains it; otherwise it gets its own patch, after its ancestors as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
main now holds the 12 PRs this branch had merged locally; the trees are identical.
…ointer and SliverPadding
Flutter layout widgets Ruflet had no control for. Each is a new wire
type with a control class, registry entries (snake_case and compact
names) and Ruflet.* / bare DSL / DSL app helpers:
- fractionally_sized_box(content, width_factor:, height_factor:,
alignment:): sizes its content to a fraction of the available space.
Negative or non-numeric factors raise, like Flutter's assertion.
- intrinsic_height(content) and intrinsic_width(content, step_width:,
step_height:): size to the content's intrinsic size (a Row of
equal-height cards, a Column of equally wide buttons).
- ignore_pointer(content, ignoring: true) and absorb_pointer(content,
absorbing: true): taps pass through to what lies behind, or are
swallowed (a form locked while it saves). Both default to on and keep
an explicit false.
- sliver_padding(slivers, padding:) { ... }: insets one or more slivers
inside a custom_scroll_view; block children arrive in `controls`.
The box controls accept the common layout keywords like other
single-content controls. The engine renderers are in ruflet-engine.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Regenerated by tools/sync_engine_service_types.rb from the engine's new ruflet_local_auth package, which registers LocalAuthentication with createService. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
LocalAuthenticationControl sends the engine's LocalAuthentication wire type and exposes authenticate(localized_reason:, biometric_only:, sensitive_transaction:, persist_across_backgrounding:, android_messages:, ios_messages:, macos_messages:), can_check_biometrics, is_device_supported (device_supported?), get_available_biometrics and stop_authentication. Each is asynchronous like every other service (returns the call id, answers through on_result) and has a *_sync form that blocks for the answer and raises Ruflet::LocalAuthError, whose code is parsed from the engine's "... failed [<code>]: <message>" error. authenticate waits 60 seconds by default, since it waits for the user. The service is in the RufletServices registry (local_authentication, localauthentication), on the page (local_authentication, local_auth) and in the DSL helper tables. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
<local-authentication> already routes to the service slot, because Rails service tags derive from the engine service types; this adds the ERB helper and tests for both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
`extensions: [local_auth]` or the new `biometrics` service in services.yaml selects the ruflet_local_auth client package. The build writes the iOS NSFaceIDUsageDescription from the biometrics description and switches the generated client's MainActivity between FlutterActivity and FlutterFragmentActivity, which local_auth's Android prompt requires, as the selection changes. The plugin's own manifest declares USE_BIOMETRIC. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet's Page device methods, both answered by the client's Page control
(control id 1):
- page.get_device_info(on_result:, timeout:) calls on_result with a
Ruflet::DeviceInfo (or nil when the platform has no record) and the
error; page.get_device_info_sync(timeout:) waits like invoke_sync and
returns it. DeviceInfo carries the device_info_plus record as Flet's
snake_case fields (info.model, info["version"]["sdk"], info.to_h) and
the client platform ("web" in a browser, so a browser record's own
navigator "platform" field stays reachable as info["platform"]).
- page.set_allowed_device_orientations(orientations) sends Flet's wire
values (portraitUp, portraitDown, landscapeLeft, landscapeRight) for
Ruflet::DeviceOrientation constants or snake_case names; [] restores
the system default. Unknown names raise ArgumentError and, like Flet's
FletUnsupportedPlatformException, a client known not to be a native
iOS/Android app (web, desktop, android_tv) raises
Ruflet::UnsupportedPlatformError, both before anything is sent. A
client that did not report its platform is left to answer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.5's ScrollableControl.auto_scroll_animation: the animation
auto_scroll uses to move to the end ({duration:, curve:}, a duration in
milliseconds, or true; 0 jumps). Column, Row, ListView, GridView,
ReorderableListView, View (and page.auto_scroll_animation on the
implicit view) and CustomScrollView accept it.
ResponsiveRow and ExpansionPanelList are ScrollableControls in Flet but
had no scroll surface here, so they gain scroll, auto_scroll,
auto_scroll_animation, scroll_interval, on_scroll and scroll_to.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.3's TextField.on_paste_files on text_field and cupertino_text_field (both the TextField wire type). The paste_files event is typed: event.files (also event.value) lists Ruflet::Events::PastedFile values with name, mime_type and bytes, the contents as a binary String. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet's SearchBar.on_tap_outside_view: fired by taps outside the open search view, while on_tap_outside_bar stays the event of the closed, focused bar. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.2's Semantics.identifier: a stable ID for native accessibility tools and widget tests (Android resource-id, iOS accessibilityIdentifier, web flt-semantics-identifier). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0's DropdownM2.menu_border_radius rounds the open menu while border_radius keeps rounding the field. dropdown_m2 is a protocol alias of Dropdown, so the key is sent under its own name and listed as a Material 2 keyword every Dropdown renderer draws (MATERIAL2_SHARED_KEYWORDS). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Ruflet only had implicit animations (animate_* props, AnimatedSwitcher,
Hero), so a repeating animation (a pulsing badge, a spinning icon, a
breathing loader) needed a Ruby patch per frame. Each of these is a new
wire type the engine drives with an AnimationController:
- fade_transition(content, begin: 0, end: 1) opacity, 0..1
- rotation_transition(content, begin: 0, end: 1, alignment:) turns
- scale_transition(content, begin: 0, end: 1, alignment:)
- slide_transition(content, begin: { x: 0, y: 1 }, end: { x: 0, y: 0 })
offsets in fractions of the content's size
- size_transition(content, begin: 0, end: 1, axis:, axis_alignment:)
They share the timing keywords duration: (ms, default 1000, see
Ruflet.duration), curve: (the engine's curve names, matched without
case or underscores), repeat:, reverse: (ping-pong while repeating),
animating: (false pauses) and delay: (ms before the first run), and
report on_animation_end (data "transition") when a run that does not
repeat finishes. A page.update of begin/end/duration/animating
retargets or pauses the mounted animation.
Two clips Ruflet had no counterpart for:
- clip_oval(content, clip_behavior:): the oval of the content's box,
for round avatars from any control (a container's shape: circle
clips to a circle and needs its own decoration).
- clip_rsuperellipse(content, border_radius:, clip_behavior:):
continuous (iOS "squircle") corners; a container's border_radius only
rounds with circular arcs. ClipRRect and ClipRect stay covered by
container border_radius/clip_behavior.
Every control takes the common layout keywords, raises on unknown ones
and drops nil values. Ruby checks what Flutter would assert on or
silently ignore: non-negative durations, numeric begin/end (opacity in
0..1, size factors non-negative), offsets and alignments as { x:, y: },
known axes, curves and clip behaviours. Each has snake_case and compact
registry names and Ruflet.* / bare DSL / DSL app helpers. The engine
renderers are in ruflet-engine.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
…llipse Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flutter's Form/FormField let a group of inputs validate, reset and save
together. In a server-driven app the validators have to be Ruby
callables, so the form logic runs in Ruby and the client only lays the
form out (the Form renderer is in ruflet-engine).
form(controls, **layout) { fields } is a new wire type ("Form") laid out
like a Column (spacing, alignment, horizontal_alignment, scroll, tight,
the common layout keywords; expanded children get their share). Its
fields are the inputs anywhere below it, outside nested forms:
TextField (and cupertino_text_field), Dropdown, Checkbox, Switch,
RadioGroup, Slider, RangeSlider, DatePicker, TimePicker and
SegmentedButton. Each takes Ruby-only options that, like handlers, are
never serialized and are not part of the exported control surface:
validator: ->(value) { "error message" or nil }
on_saved: ->(value) { ... }
autovalidate_mode: "disabled" (default) | "always" |
"on_user_interaction" | "on_unfocus" (form or field)
signup = form(on_submit: ->(e) { create(e.control.save) if e.control.validate }) do
text_field(key: "email", validator: ->(v) { "Required" if v.empty? })
checkbox(key: "terms", validator: ->(v) { "Please accept" unless v })
end
- form.validate runs every visible, enabled field's validator on its
current value, shows the result and pushes one page update; it
returns true when all pass. TextField shows the message in `error`,
Dropdown in `error_text`, Material Checkbox turns on `error`; Switch,
RadioGroup, Slider (and CupertinoCheckbox) have no error prop, so the
message is only in field.validation_error and form.errors.
- form.reset restores each field's value from when it joined the form
(mounted or first used), clears errors and the interaction state.
- form.save calls each visible field's on_saved with its value and
returns form.values ({ key or id => value }).
- autovalidate_mode follows Flutter: "always" validates on every page
refresh and field change, "on_user_interaction" once the user changed
the field (on the form: any field, until reset), "on_unfocus" on blur
(a RadioGroup listens to its Radios). The form sets the on_change /
on_select / on_blur flags it needs on its fields and takes them back
when no longer needed (unless the app handles that event).
- on_submit needs no engine help: the form sets on_submit on its text
fields and Page#dispatch_event routes a field's events to its form
after the field's own handler, so Enter in a field fires the form's
on_submit (and any field change its on_change) with event.control set
to the form.
The page links a form's fields whenever it (re)registers the form, so
flags and errors go out with the first patch and fields added later
(page.update(container, controls: [...])) join it. page.update(field,
validator: ...) and merge_props replace the options without touching
the wire. ruflet_rails' in-place re-render rebinds validator, on_saved
and autovalidate_mode from the fresh tree, the way it rebinds handlers;
a server hot reload rebuilds the form with the new block's validators.
Tests: ruflet_core test/form_compatibility_test.rb (24 runs: layout
props, Ruflet.* / bare DSL / DSL app, options never on the wire,
validate/reset/save/values per control, visibility and disabled
ancestors, nested forms, each autovalidate mode, flags, on_submit and
on_change through page.dispatch_event change/blur/submit events);
ruflet_server test/form_wire_test.rb (3 runs: register response,
client messages, hot reload); ruflet_rails test/control_diff_test.rb
(2 runs). Full suites, one process per file: ruflet_core 922 runs, 0
failures; ruflet_server 49 runs, only the known
wire_codec_test#test_full_trace_prints_exact_bytes_and_decoded_data
failure; ruflet_rails 283 runs, 0 failures.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ # Conflicts: # packages/ruflet_core/lib/ruflet_ui/ruflet/dsl.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_controls.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/material_control_methods.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb
… body
Flutter's NestedScrollView, so the "collapsing app bar over tabs" layout
is possible: header slivers that collapse (and pin) as the body scrolls.
New wire type NestedScrollView with a control class, registry entries
(nested_scroll_view and nestedscrollview) and Ruflet.* / bare DSL / DSL
app helpers:
tabs(length: 2) do
nested_scroll_view(body: tab_bar_view([list_view(inbox), list_view(sent)])) do
sliver_app_bar(title: text("Mail"), pinned: true,
bottom: tab_bar(tabs: [tab(label: "Inbox"), tab(label: "Sent")]))
end
end
- Header slivers come as the positional argument / `header_slivers:` or
as block children (`controls`), like custom_scroll_view's slivers.
- `body:` is one control and is required; anything that is not a
Ruflet::Control raises ArgumentError. A body built inside a DSL block
is reclaimed like any prop control, so it is never also a block child.
- float_header_slivers, horizontal and reverse default to false;
clip_behavior, scroll, auto_scroll, scroll_interval, on_scroll and the
common layout keywords pass through; unknown keywords raise.
- scroll_to (ScrollableMethods) acts on the outer scroll: offset 0
expands the header and returns the body lists to their top.
The engine renderer (ruflet-engine) keeps a pinned header clear of the
body: a list_view, grid_view, custom_scroll_view or column/row with
`scroll:` as the body, or as each tab_bar_view page, scrolls with the
header and starts below it; any other body is placed below it.
Tests: test/nested_scroll_view_compatibility_test.rb (serialization,
positional/keyword/block forms, prop controls not duplicated as block
children, the tabs layout, aliases and DSL entry points, body
validation, unknown keywords, wire ids and independent patches, scroll
event dispatch, scroll_to invoke): 12 runs. Full ruflet_core suite, one
process per file: 177 files, 910 runs, 0 failures, 0 errors. ruflet_rails
html_dsl_test and html_dsl_helpers_test (every registry control from
markup): 80 runs, 0 failures.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0's ClientAction for Ruflet. Browsers only allow clipboard writes,
new tabs, file pickers and the share sheet while they handle the user's
tap; a Ruby click handler replies too late, so page.launch_url,
set_clipboard, pick_files and share_* from on_click are dropped on the web
(iOS Safari above all). A control's `action:` now carries the work for the
client to do inside the tap, before it sends `click`:
button("Docs", action: Ruflet.client_action(:launch_url,
url: "https://ruflet.dev", web_window_name: "_blank"))
button("Upload", action: Ruflet.client_action(:pick_files, allow_multiple: true),
on_action_result: ->(e) { e.files })
- Ruflet::ClientAction (Ruflet.client_action): launch_url (alias open_url),
copy_to_clipboard (alias set_clipboard), pick_files, share_text,
share_uri, share_files, each option validated. On the wire it is Flet's
{service, method, args} with the service named by its wire type; args
are exactly what the matching page method sends to that service.
- `action:` (one action or a list; ClientAction, {type:} hash or wire hash)
and `on_action_result:` on every button, cupertino button and dialog
action, icon button, floating action button, container, list tile,
cupertino list tile and text span. The value is checked and stored as
plain wire data (also through page.update).
- on_action_result delivers each action's outcome to the tapped control as
Events::ActionResultEvent (action, index, result/value, files, error).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ # Conflicts: # packages/ruflet_core/lib/ruflet_ui/ruflet/dsl.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_controls.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/material_control_methods.rb # packages/ruflet_core/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb
… props Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Three helpers could never succeed:
- animation(...) and animation_style(...) built Ruflet::Animation and
Ruflet::AnimationStyle, classes that do not exist, so every call (from
Ruflet.*, Ruflet::UI, the DSL app or the bare DSL) raised NameError.
They now return the plain values the engine reads: animation gives
{"duration" => ms, "curve" => name} (parseAnimation, for the animate_*
props) and animation_style any of duration, reverse_duration, curve,
reverse_curve (parseAnimationStyle, for BottomSheet, ExpansionTile,
Chip, PopupMenuButton, page theme_animation_style). Durations are
milliseconds or Ruflet.duration parts (seconds: 1, milliseconds: 500);
negative or non-numeric durations and unknown keywords raise.
- textfield, the compact alias of text_field, took no positional value
while every forwarder (Ruflet.*, Ruflet::DSL, bare DSL) passed one, so
it always raised ArgumentError. It now takes the value like
text_field. A scan of every forwarder against its target found no
other arity mismatch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Brings in #64 (reclaim only from child-control slots), #65 and #66 (Dropdown change event name and spellings) and #68 (inline date pickers in DSL blocks). Conflicts: - Page.presented_control?: #68 and this branch both exempt inline date pickers; kept this branch's inline_overlay? rule (any presented overlay built with inline: true), which #68's new tests also pass. - PropControls.reclaim: kept #64's child-slot walk and mounted-control rule together with this branch's last-first order; the comment covers both. Page#claim_prop_control now passes its value as a one-slot props hash, since reclaim reads props. - Dropdown contract and its test file: both sides' additions kept. ruflet_core 186/186 files (1039 runs), ruflet_rails 16/16, ruflet_record 5/5; ruflet_server and ruflet only the two environment-specific failures that also fail on main here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
AdamMusa
added a commit
that referenced
this pull request
Nov 8, 2026
…ess-fallback main (#72) now guards readiness after "R" with :retired_pid. This branch had its own :restarting flag for the same race; it now uses main's :retired_pid in mark_child_ready instead, so the readiness fallback and a late "." are both refused for the app "R" retired. "r" between the reap and the respawn is queued, as on main.
AdamMusa
added a commit
that referenced
this pull request
Nov 8, 2026
…per-shadowing Conflict in shared_control_forwarders.rb, resolved by meaning rather than by side: #72 added 31 bare helpers to SharedControlForwarders, which is included into Kernel, so each became a method of every object in the process (absorb_pointer, fractionally_sized_box, ignore_pointer, intrinsic_height, intrinsic_width, sliver_padding, clip_oval, clip_rsuperellipse, the five *_transition helpers, form, nested_scroll_view, their compact spellings, and the local_auth/local_authentication service). Keeping main's lines would have failed this branch's v0.0.23 surface test and brought the audit regression back for `form`: Nokogiri::HTML::Builder.new { form(action: "/x") { input(type: "text") } } raised ArgumentError from FormControl instead of building <form>. All 31 move to ScopedControlForwarders and HELPERS, so Kernel keeps exactly the v0.0.23 set and every entry point #72 tests (Ruflet.*, Ruflet::UI.*, Ruflet::DSL.*, WidgetBuilder, DSL.app, builder blocks, bare calls with or without arguments) still builds the same control. #72's tests pass unchanged. Tests: NEW_HELPERS and the extension collision NAMES list all 63 scoped names; the Nokogiri probe also builds a <form>; a test builds every #72 helper bare inside Ruflet.run; explicit-receiver cases cover form, ignore_pointer, fade_transition and local_auth. The Rails test now expects local_auth to be the one scoped name that is not a view helper: views get helpers from the control registry, where the service is local_authentication, as on main.
2 tasks
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.
Ruby half of AdamMusa/ruflet-engine#102. The branch also follows up on the review of PRs #36–#62, and
main(#64–#68) is merged in.New controls and their protocol
fractionally_sized_box(content, width_factor:, height_factor:, alignment:)intrinsic_heightandintrinsic_width(step_width:, step_height:)ignore_pointer(ignoring:)andabsorb_pointer(absorbing:)sliver_padding(slivers, padding:) { ... }formwith Ruby validators:validator: ->(value) { "message" or nil },on_saved:andautovalidate_mode:("disabled", "always", "on_user_interaction" or "on_unfocus"). Validators stay in Ruby and are never serialized.validate,reset,save,values,errors,on_submit(a field's Enter) andon_change.erroron TextField,error_texton Dropdown, anderroron the Material Checkbox. Controls without an error prop expose the message throughfield.validation_error.nested_scroll_view(header_slivers, body:, float_header_slivers:): a collapsing header over a scrolling or tabbed body.fade_transition,rotation_transition,scale_transition,slide_transitionandsize_transition, each takingbegin:,end:,duration:,curve:,repeat:,reverse:,animating:,delay:andon_animation_end:. Alsoclip_ovalandclip_rsuperellipse.action: Ruflet.client_action(:launch_url | :copy_to_clipboard | :pick_files | :share_text | :share_uri | :share_files, ...): on the button, icon button, FAB, Container, ListTile and TextSpan family, a list of actions is also accepted. Results reachon_action_result.page.local_auth: theLocalAuthenticationservice, withauthenticate,can_check_biometrics,is_device_supported,get_available_biometrics,stop_authenticationand*_syncvariants. It also adds a Rails helper and the CLI selection (extensions: [local_auth]), which writesNSFaceIDUsageDescriptionand switches the Android activity toFlutterFragmentActivity.page.get_device_info/get_device_info_sync, returning aRuflet::DeviceInfopage.set_allowed_device_orientations(%i[portrait_up landscape_left]), which validates the names and raises on non-mobile clientspage.pop_views_until(route, result:)auto_scroll_animationon_paste_files(event.files)on_tap_outside_viewidentifiermenu_border_radiusFixes
Page#mountwere lost; page chrome assigned inmountwas also laid out as a body control.nilstayed on in the client; stale page handlers survived hot reload.open_keywordsfor controls that accept any key, and a--checkthat compares content instead of text.Ruflet.animationandanimation_styleraised NameError, andtextfield(the alias) always raised ArgumentError.Merge with main
Page.inline_overlay?rule; fix: lay out inline date pickers built in DSL blocks #68's tests pass on it.reclaimis kept together with this branch's last-first order.Verification
wire_codec_test#test_full_trace_prints_exact_bytes_and_decoded_dataandupdate_command_test#test_command_build_ios_uses_unbundled_env_for_flutterfail, and they fail onmainin the build container too (Ruby 3.3Hash#inspectformat, host PATH).tools/sync_engine_service_types.rb --checkagainst the engine branch: current. The engine'ssync_ruby_surface.rb --checkagainst this branch: current.Known limits
ruflet_local_auth(steps in the engine PR).Generated by Claude Code