Repository navigation
Ariadne on a phone: text wraps, rows flow, pictures fit; a plain pressed-in look; a tray avatar and an always-there bell; the app's HTTP cache with a settings window - #1450
Merged
Conversation
…sed-in look; a tray avatar and an always-there bell A phone's window is a little over 400 px wide, and nicotina's views were laid out for 600 with text clipped to 65 columns: lines ran past the window's right edge, behind a horizontal scroll bar, and buttons after them out of reach. ImGui (§5.8): - A plain text: wider than the line's room wraps at a word there; one that fits draws as before. The room is the window's (a table cell's), or, in a window whose width fits its content, the view's right edge, as a rich text paragraph measures it (line_room()). - A horizontal row with no col_widths flows: a cell that would run past the room goes to the next line, decided from the width it had the frame before (kept in ImGui's storage under the row's id), so a row settles in a frame. - A picture with a fixed size wider than the room is drawn smaller, its shape kept (draw_image, draw_image_fit). §5.27 the chosen button, pressed in, plainly so where a picture covers most of its face: a deep shadow two steps wide on the top and left, its face lit in the active colour, its content two steps down and right, a picture a shade darker; the row's others raised with a shadow two steps wide. The old darker face was hidden behind an emoji picture at a phone's size. §5.22 a tray icon's icon: a picture in place of its glyph (a URI with auth:, a published picture, or an expression: an account's avatar URL), drawn round and as tall as the bar, cover-fitted; an animated GIF or WebP moves and a video URL plays there as a decorative video. The glyph shows until it loads, if it fails, and in a terminal. §5.24 notifications: always keeps the bell in the tray with an empty feed. Tests: ariadne_loader_test's TrayIconPictureAndBellAlways; ariadne_runtime_test's ADocumentPlacesOrTurnsOffTheBell covers always; cvcgl_imgui_group_click lays a six-button row and a long line out in a 200 px window (the row flows, the line wraps, both stay inside).
enable_net now registers the caching http(s) handler (uri_http_cache)
in place of the plain one, so import:/load:/source:, (fetch ...),
pictures and native video and audio are kept and served from the app's
state tree while fresh. NetHostConfig::http_cache = false keeps the
plain handler; disable_net still removes http(s).
The cache:
- reads its policy from sys.net.http_cache.policy.* at each access,
seeded at registration where unset: enabled (1), max_bytes (256 MiB,
48 MiB in a browser), max_entry_bytes (64 MiB), freshness_secs (60),
retention_secs (3600), plus max_mib / max_entry_mib mirrors for a
slider. A lowered budget applies at once.
- drops the least recently used entries past max_bytes, after each
store, and keeps each entry's size on its node's value.
- mirrors stats.{entries,bytes,hits,misses,revalidated,evicted,fill,
used} into the state tree.
- empties on a write to sys.net.http_cache.clear (the key is reset),
on clear_http_cache(app), or on AppRuntime's bare action
http_cache.clear.
- checks every request, and every cached body it serves, against the
NetPolicy it was registered with, and keeps the plain handler's
response cap, redirect rules and >= 400 mapping; the store side is
checked too.
- has a non-blocking form (register_uri_async_handler), so a browser
build without threads keeps starting its requests.
Pictures (ImageCache's fetch_bytes and start_fetch) and the native
player's download go through http_cache_get / http_cache_start when the
request names no credential; one with auth: still goes through
host_get, uncached. In the browser an auth: video keeps
cache: 'no-store' (the browser's cache keys by URL alone).
components/http_cache.ari is the cache's settings window (entries, the
budget's fill, hits/misses/revalidated/evicted, the budget and largest
entry in MiB, freshness, Enabled, Clear). AppRuntime::set_host_windows
puts a host's windows in every document, closed until tree.<id>.open;
arigl uses it for the component and adds Settings > Network cache...
(window and terminal) while the network is on.
docs/ARIADNE.md describes the cache (10.3), the component (6.5), the
Settings item and set_host_windows, and updates the caveats (11).
…er wraps Two regressions of the narrow-window wrap, from CI: - cvcgl_imgui_view_shrink: a window that fits its content and opened near the view's right edge wrapped its text there instead of being moved in. Its room is now the widest it can be, the view less ImGui's safe-area padding, wherever it opened. - cvcgl_ari_golden volume_grid: the "pts" column heading broke between its letters. Only a line of several words wraps now. The windows golden's line that said text wraps nowhere now wraps at a word, as the change means it to: windows.png is made again under llvmpipe (mesa-dist-win 26.1.7, CI's pin).
…d-look-and-http-cache
…d-look-and-http-cache # Conflicts: # docs/ARIADNE.md # src/cvc/ariadne/components/INDEX.ari
…s its label room volume_grid_contours (new on master) never settled: its side panel's Tiling bar took ImGui's default width, 65% of the window, wherever it stood, so beside the views the panel ran 280 px past the window. The row sent it below the views, where it filled its line, so it came back, ran past again, and went down again, every frame. - A labelled progress bar or plot shrinks to leave its label room, as a slider does (reserve_label_width); one that already fits keeps ImGui's width. - A flowing row's cell that fills a line of its own keeps the width it went there with, so a row settles; beside other cells, one that fills to the line's end still keeps 0 and stays. - A child region that fits its widgets measures its room to its parent's right edge, not the view's width: only a window is moved in from the view's edge. volume_grid_contours.png shows the Tiling bar beside its label now; it needs cvc::planar to tile, so it is made again from CI's Linux render.
transfix
enabled auto-merge (squash)
November 23, 2026 06:49
The labelled progress bar now leaves room for its label, so the panel's Tiling bar ends inside the panel and shows "Tiling". Rendered by CI's Linux llvmpipe lane (run 45094891007); the Windows lane differed from the old golden by the same 3449 px.
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
The closed schema lands after the PRs that add loader keys, so it carries their keys now: - notifications: always, as well as a flag (#1450); - a tray_icon's icon: and auth: (#1450); - a color picker's fmt: rgb | hex (#1452); - a load:'s name:, a key or an expression that names the application (#1485); - scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and in a scene of its own (#1475). Master's own new keys need none: #1472's look: wheel:, wheelbase: and track: sit in world:, which the world rules check, and #1399's region: is a custom node's own key. AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs finds fmt: cmyk and notifications: sometimes.
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
loader.cpp conflicted where master edited the inline schema this branch replaces (#1450's notifications: always); the closed schema already has it, so the branch's side stays. The schema gains the keys master now reads: - #1495 (merged): a camera's position, target, up, fov, near, far, orthographic and height; - #1491 (open): a scene node's on_pick.
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
… into p9/volume-grid-segment INDEX.ari keeps both new entries (volume_grid_segmentation, http_cache). volume_grid_contours.png conflicted (#1450 re-rendered it for rows that flow); kept ours until CI renders the merged panel.
transfix
added a commit
that referenced
this pull request
Nov 23, 2026
…w keeps its side panel (P9) With five tabs (Segmentation beside #1451's Contours), volume_grid's side panel went below its views once its Contours page grew taller than the window: the vertical scroll bar left 358 px, less than the tabs' least width (372), so ImGui scrolled them, and the tabs scrolled out of the bar still counted as the line's width. #1450's flowing row saw the panel run past its room and moved it to the next line for good. ImGui also spans the bar to the window's work rect, under the scroll bar (its arrows hidden there), and as wide as last frame's content in a window that scrolls sideways, which kept that content too wide frame after frame (a spurious horizontal scroll bar in volume_grid_segment, the clipped last tab in the earlier goldens). tab_bar now lays the bar out in the visible room and does not count the tabs scrolled out of it. 57 ImGui and Ariadne tests pass locally; the golden harness keeps the panel beside the views.
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
) * Ariadne: a closed .ari schema every load checks, and ari validate The .ari document's structure gets a formal definition, roadmap section 15, now docs/ARIADNE.md section 14: - src/cvc/ariadne/schema/ari.v1.schema.json: one JSON Schema for every top-level block, all 35 built-in widget types, the scene, include: and load: sites, with descriptions. Every map is closed: an unknown key is an error, except x- keys, a custom widget's or node's own keys, and a block an app registered or the document declares in customs:. A widget's type is its first type key in the loader's order. It keeps to json-schema-validator's draft-7 subset. - CMake embeds it (CvcEmbedText.cmake) for ari_schema_json() and installs it under share/libcvc/ariadne/schema/. - With the validator built in, every load checks the document, its import:ed libraries, its load: fragments and each include: expansion (placed in the unit's own file), as warnings and LoadResult::schema_issues with line and column. The compiled validators live in a cvc::app slot. - validate_string / validate_file check without loading, the document's own units instantiated with their declared args. - ari validate [--structural-only] [--strict] [--json] and ari schema. - ci.yml: package-linux's configure assertion also requires the validator. All 176 shipped documents are valid; reopen_refit.ari gains its missing meta.min_libcvc. Five loader tests that feed bad values count the loader's own warnings and check the schema flags the same pointer. New ariadne_schema_test and ctests for ari validate and ari schema. * Ariadne schema: scene: clock: hz, the world's rate OW8 (#1441) gave the scene's clock an hz key: a whole number of ticks a second from 10 to 240, as sim_rate_valid takes it. The schema takes it the same way in both clock entries, and ClockBlockTakesAWorldsRate checks that the schema accepts hz: 60 and flags each rate the loader warns about. * Ariadne schema: the hosts' blocks in their short forms wasm: takes a guest's path alone and relay: a relay's URL alone, as their readers do; a bare server: or world: sets nothing, as theirs do. The schema took a map only, so WasmWasiTest's `wasm: all.wat`, under min_libcvc 3.7.13, failed its load on Linux. * Ariadne schema: the keys the open PRs add to the loader The closed schema lands after the PRs that add loader keys, so it carries their keys now: - notifications: always, as well as a flag (#1450); - a tray_icon's icon: and auth: (#1450); - a color picker's fmt: rgb | hex (#1452); - a load:'s name:, a key or an expression that names the application (#1485); - scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and in a scene of its own (#1475). Master's own new keys need none: #1472's look: wheel:, wheelbase: and track: sit in world:, which the world rules check, and #1399's region: is a custom node's own key. AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs finds fmt: cmyk and notifications: sometimes.
transfix
added a commit
that referenced
this pull request
Nov 24, 2026
…es in 3D (P9) (#1452) * volume_grid segmentation core: class_surfaces and the tab's stepper (P9) cvc::class_surfaces: the surface of every class of a label volume in one marching-cubes pass (midpoint vertices shared within a class, closed at the volume's faces), Taubin smoothing and outward normals, as a resumable stepper with its job and a parameter table. cvc::volume_grid_segment_stepper: segment_stepper, then class_surfaces on its labels, as one stepper with one progress bar and one Stop, keeping the labels so far for the slices while it marches (segment_stepper::labels_so_far). The Segmentation tab's view table, its rows (coloured as the seeding point classes), color_labels for the slice layer, and grid.segment.* in grid sessions. Tests: class_surfaces_test, volume_grid_segment_test (ports lane). * volume_grid: the Segmentation tab (segment, labels on the slices, class surfaces) (P9) VolumeGridSegmentation, owned by VolumeGridNode: grid.request `segment` runs volume_grid_segment_stepper on the grid's volume, seeded by its shown point classes, as a sliced task (the §1.9 job keys under grid.*); `stop` keeps the last result; a new volume clears it. The labels draw on each plane as a see-through `labels` layer (live while the fronts advance), and each class's surface in a `segments` group under the grid's surfaces. The result is on the data channel (grid.segment.labels, classes, border, surfaces.<n>), its classes as rows under grid.segment.rows; parameters from the seeded_segmentation, view and class_surface tables, seeded from a document's segment: props. Component volume_grid_segmentation.ari, the volume_grid component's Segmentation tab. Ariadne's volume encoder writes a list of volumes as one file's variables (Save classes: VolumeGridRover's SegTmp.rawv). register_cvcgl_extensions installs the segmentation intrinsics per app; segment.surfaces (class_surfaces) joins segment.seeded. Test: cvcgl_volume_grid_segment (and its cooperative run). * volume_grid segmentation: pycvc, segment.surfaces tests, demo, golden, web smoke (P9) pycvc: class_surfaces (keywords, its result, its job), the tab's rows and colour layer, its view table, and volume_grid_segment_job (the tab's run as one job); test_pycvc_volume_grid_segment.py. segmentation_intrinsics_test covers segment.surfaces in its three forms; ariadne_data_test the volume encoder's list of volumes (one .rawv, variables named after the volumes). Demo examples/ariadne/documents/volume_grid_segment.ari: VolRover's Visible Human CT (examples/data/fem/vh4.rawiv) with a seed on the spine and in each arm, segmented above 72 on open, the classes' surfaces in a Bones view; in the gallery as volume_grid_segment_ari. Golden volume_grid_segment.ari (its PNG follows from CI's llvmpipe render), arigl-web smoke case volume_grid_segment.ari (a pick, then segment on the page). The Segmentation tab: volume_grid_segmentation (a window) and volume_grid_segmentation_tab (the controls), included with tab: so the tab adds no nesting level. cvcgl_ariadne_volume_grid gets the 8 MB document host stack (it overflowed Windows' 1 MB on the deeper component). Ariadne's color widget takes fmt: hex (one #rrggbb field beside the swatch, Backend::color_hex); the volume_grid class tables use it. ci.yml: class_surfaces_test and volume_grid_segment_test join SAN_CXX_TESTS. Docs: ARIADNE.md (the grid's segmentation keys, the encoder, the components), the roadmap's "What P9 built". * volume_grid segmentation: goldens from CI's llvmpipe artifact; the stop check no longer races a fast cooperative run (P9) - src/cvcGL/test/golden: volume_grid_segment.png (new), volume_grid.png and volume_grid_quad.png (the Segmentation tab, the Point classes table's hex colour fields), from run 44992251035's ari-golden-Linux-libcvc-release artifact at 6e568ef. - cvcgl_volume_grid_segment: on the Linux package runners a cooperative 24^3 run ended within the frame after `segment`, before `stop` reached it ("stop ends the run" failed). Between `segment` and the next request the test now ticks the nodes without stepping the scheduler, so a cooperative run has not begun when `stop` (or a second `segment`) comes. * volume_grid_segment golden: the default headlight, not the three_point rig (P9) On CI's package-linux lanes the golden's surface views (live mirrors of the main view) were lit by the document's three_point rig in the Release build and by the default headlight in the Debug one, so volume_grid_segment.png (from the Release artifact) failed on libcvc-debug: 1.17% of pixels, all on the surfaces. Rendered locally in Release without the rig, the surfaces look as the Debug lane drew them. The golden now declares no lights; its PNG follows from this run's artifact. * volume_grid_segment golden: the headlight-lit image from CI (P9) Taken from run 45042979740's ari-golden-Linux-libcvc-release artifact at 1084dfd, the first run of the golden without the three_point rig. * extensions.cpp: one space before the segmentation include's comment (clang-format, P9) * goldens: volume_grid, _quad, _segment and _contours from this PR's CI render (P9) The tab bar now holds both Contours and Segmentation, and the class colours show as hex. Taken from run 45078206762's ari-golden-Windows-libcvc-release artifact; every other document there matched its Linux-made golden within 1. * goldens: volume_grid_quad from this PR's CI render after the master merge (P9) The merged panel: the Probe tab's Source combo (#1443) under the five-tab bar. From run 45106838969's ari-golden-Linux-libcvc-release artifact; the Windows render of the same run agrees (no pixel beyond 8). * ImGuiBackend: a tab bar fits the line's visible room, so a flowing row keeps its side panel (P9) With five tabs (Segmentation beside #1451's Contours), volume_grid's side panel went below its views once its Contours page grew taller than the window: the vertical scroll bar left 358 px, less than the tabs' least width (372), so ImGui scrolled them, and the tabs scrolled out of the bar still counted as the line's width. #1450's flowing row saw the panel run past its room and moved it to the next line for good. ImGui also spans the bar to the window's work rect, under the scroll bar (its arrows hidden there), and as wide as last frame's content in a window that scrolls sideways, which kept that content too wide frame after frame (a spurious horizontal scroll bar in volume_grid_segment, the clipped last tab in the earlier goldens). tab_bar now lays the bar out in the visible room and does not count the tabs scrolled out of it. 57 ImGui and Ariadne tests pass locally; the golden harness keeps the panel beside the views. * goldens: volume_grid_contours, _segment and _quad from this PR's CI render after the tab-bar fix (P9) The Contours panel stays beside the views, its tabs scrolled behind arrows in the visible room; the segment window lost its spurious horizontal scroll bar (one more row shows); quad's right edge moved a few pixels. From run 45274811851's ari-golden-Windows-libcvc-release artifact (Windows and Linux renders have agreed within 8 on every earlier run).
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.
For nicotina on a phone: text and rows that fit a narrow window, a pressed-in look you can see, an avatar and an always-there bell in the tray, and an HTTP cache for pictures and media with a settings window. Joe asked for each of these on 2026-11-21.
On a phone (ImGui, §5.8)
nicotina's views were laid out for 600 px. In a phone's window of about 410 px, lines ran past the right edge behind a horizontal scroll bar, and buttons placed after them were out of reach.
text:wider than the line's room now wraps at a word. One that fits draws as before. The room is the window's (or a table cell's); in a window whose width fits its content, it is the view's right edge, measured as rich text measures it (line_room()).col_widthsnow flows: a cell that would run past the room goes to the next line. The decision uses the width each cell had the frame before, so a row settles within a frame.size:wider than the room is drawn smaller, keeping its shape.The chosen button (§5.27)
The old pressed look was a darker face, which an emoji picture hid almost entirely at a phone's size. Now the chosen button has:
The row's other buttons are raised, with a shadow two steps wide.
The tray (§5.22, §5.24)
tray_icon'sicon:draws a picture in place of the glyph: a URI (withauth:), a published picture, or an expression such as an account's avatar URL. It is round, as tall as the bar and cover-fitted. An animated GIF or WebP moves, and a video URL plays as a decorative video. The glyph shows until the picture loads, if it fails, and in a terminal.notifications: alwayskeeps the bell showing with an empty feed.The app's HTTP cache (§10.3)
On by default.
enable_netnow registers the caching http(s) handler (uri_http_cache) in place of the plain one, on the same allowlist. It covers imports,(fetch ...), pictures, and native video and audio. A request that names a credential (auth:) still bypasses it.NetHostConfig::http_cache = falsekeeps the plain handler, anddisable_netstill removes http(s).Its settings are read under
sys.net.http_cache.policy.*:Past the budget, the least recently used entries go first.
Stats are kept in
stats.*. Clearing it is a write tosys.net.http_cache.clear,clear_http_cache(app), or the bare actionhttp_cache.clear.The NetPolicy is enforced on every request and on every kept body it serves. A non-blocking form keeps a browser build without threads working.
Browser video: an
auth:video keepscache:'no-store'. The browser's cache keys by URL alone, so a later user in the same browser could otherwise be served the earlier user's video.The settings window is
components/http_cache.ari: Enabled, how full it is, entries, hits, misses, revalidated, evicted, the budget, the largest entry, freshness, and Clear. arigl adds Settings > Network cache... while the network is on, through the newAppRuntime::set_host_windows.Tests
uri_http_cache_test: 31 passed (19 new);ariadne_media_test: 62 passed (new:APictureFetchedTwiceComesFromTheHttpCache);ariadne_loader_test: 252 passed, 3 skipped (new:TrayIconPictureAndBellAlways);ariadne_ftxui_test: 114 passed;cvcgl_imgui_group_click: passed. It now lays out a six-button row and a long line in a 200 px window; the row flows, the line wraps, and both stay inside.ariadne_runtime_test: 345, then 349, passed. New: thenotifications: alwayscases inADocumentPlacesOrTurnsOffTheBell,ATrayIconsPictureReachesTheBackend, andHostWindowsAndTheHttpCacheWindowsClear. This suite links on that box's shared gtest only with the threeGTEST_FLAG_SET(death_test_style…)lines commented out, so they were commented out locally to run it and restored before committing.