Clean up the spaday UI modules and re-record the demo gif - #349
Merged
Conversation
Copy each `server_views` entry before popping `table` off it. The dict is user configuration and is read again at the top of `_connect_all_tables`, so a second `connect()` raised `KeyError: 'table'`. Move the lazy `Region` import to the top of the `ui()` hooks that had it in the middle of the body or buried in a branch. They still have to be deferred, since they belong to the optional spaday provider, but there is no reason to scatter them. Say what the eight `# separate to avoid circular` comments actually guard. The `csp_gateway.server` package re-exports `.modules` before `.web`, so the package is only partially initialized while these modules are imported and only the leaf module works. Verified by merging one of them: five of six import entry points then fail with `cannot import name 'GatewayWebApp' from partially initialized module`. Import `Wire` with the rest of spaday rather than inside `mount()`, and point the spaday `ImportError` at `csp-gateway[server]`, which is the extra those packages actually live in. Collapse four copies of the `_bare_ui` test helper into one, and assert that choosing a layout clears `graph_focus` to the empty string rather than merely mentioning the field somewhere in the serialized tree. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Client-only installs legitimately omit the server dependency group, but the broad ImportError handlers also hid failures raised inside modules that were present. A circular import introduced in `channels_graph.py` left `import csp_gateway` reporting success, and only surfaced later as an unrelated `cannot import name 'MountChannelsGraph' from 'csp_gateway'`. Suppress an ImportError only when it names a dependency of the extra being guarded, or when it names one of our own modules that an earlier suppressed failure left half-populated -- and that second case only while a dependency is genuinely absent. Asking merely whether *any* optional dependency is missing would keep swallowing real errors on every partial install, which is the case this guard exists to make visible. The import names are listed separately from `pyproject.toml` because several distributions import under a different name than they are published under. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
`perspective_thread` and `get_schema_from_field` have no callers anywhere in the package, tests, or docs. Both predate the current table setup: schemas are now derived in `_connect_all_tables`, and the Perspective event loop is started by `run_perspective`. They are public names, so this is a breaking change for anyone who imported them or overrode `get_schema_from_field` in a subclass, which is why it goes in with the 3.0 major. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
The spaday send form reached through Channels registration state and GatewayWebApp type helpers, coupling presentation code to two private implementations. Keep send-channel registration order, form model normalization, and basket keys behind one Channels accessor so UI builders consume a documented seam without exposing the underlying adapter mapping. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Two things made the component tree differ on every boot. Tables are registered from a set, so `get_hosted_table_names()` came back in hash order and the generated layout put panels in a different order each time; `_get_tables` now sorts. And `confirm_button` derived its dialog id from `hash((label, url))`, which is salted per process, so the id changed on every restart; it now uses a digest. Neither was visible as a bug, but both defeat caching and made it impossible to diff two renders to check a change was inert. Two runs of the demo now produce byte-identical `/tree.json`. Lift the main region's tab assembly out of `build_page` into `_main_content` while that check is available to prove nothing moved. `build_page` was 172 lines covering config, chrome, drawers, tabs and layout state at once. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
The old recording predates the spaday frontend entirely: it shows the React UI, the standalone dagre page, and a layout that no longer exists. The new one walks the same ground the README claims -- workspace, Perspective's config sidebar, the channels graph, the REST docs -- plus the two things that are new: clicking a channel node to focus its table, and the light/dark toggle. It is 1.8 MB rather than 7.3 MB, since identical beats collapse to one frame with a longer duration instead of repeating. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
timkpaine
requested review from
arhamchopra,
emilybarrettp72,
feussy,
hintse,
ptomecek and
vstolin
as code owners
September 3, 2026 01:48
Contributor
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #349 +/- ##
==========================================
+ Coverage 86.84% 86.87% +0.02%
==========================================
Files 156 158 +2
Lines 18697 18714 +17
Branches 1762 1768 +6
==========================================
+ Hits 16238 16257 +19
+ Misses 2459 2457 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
No description provided.