Skip to content

refactor: collapse the table views into a generic TableView and drop dead code - #38

Merged
alvgaona merged 8 commits into
mainfrom
refactor/generic-table-view
Aug 22, 2026
Merged

alvgaona merged 8 commits into
mainfrom
refactor/generic-table-view

Conversation

@alvgaona

@alvgaona alvgaona commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Ponytail audit pass over the viewer. Same three panels, same status bar, same CLI, about 40% less source and two fewer direct dependencies. The Topics, Nodes and Diagnostics views were the same ViewClass, ViewState and visualizer copied three times; everything else here is smaller cuts the same audit turned up.

Changes

  • src/views/table.rs is a generic TableView<S> / TableSystem<S> over a TableSpec trait; topics.rs, nodes.rs and diagnostics.rs are now 70–110 line specs (columns, descriptors, row parse, cmp, cell). The public TopicsView / NodesView / DiagnosticsView names survive as type aliases, so main.rs and web.rs registration is untouched. Start the review here.
  • Sort headers draw re_ui::icons::ARROW_UP / ARROW_DOWN instead of a hand-painted triangle and take a column index instead of per-view enums.
  • The visualizer no longer advertises rewire's untagged descriptors as queried, which removes the "won't show in the defaults ui" toast. queried only feeds the selection panel and visualizability is gated by constraints, which stays None.
  • ControlServer is a control::spawn() function, the status bar's two count helpers are one latest_len, RelayLink::forward returns Option<bool>, and the bare use <crate>; lines are gone.
  • rerun and re_types_core were unreferenced and are dropped. wasm-bindgen-futures stays with a comment, since the #[wasm_bindgen] expansion of async fn start names it.
  • The web loader reassembles the wasm bytes with new Blob(chunks).arrayBuffer() instead of a manual copy loop.

Checklist

  • PR title follows Conventional Commits
  • cargo fmt --check is clean
  • cargo clippy --all-targets -- -D warnings is clean (native)
  • cargo build --lib --target wasm32-unknown-unknown --no-default-features builds (wasm) — ran cargo check for that target locally, leaving the full build to the build-wasm CI job
  • cargo test passes
  • Public items have /// docs

Breaking changes

Library API only. The icons and util modules and control::ControlServer are removed from the rewire_viewer crate. CLI flags, ports and the bridge/viewer protocol are unchanged.

…eView

Topics, Nodes and Diagnostics were the same ViewClass, ViewState and
visualizer copied three times. They are now TableSpec impls behind a
generic TableView<S>/TableSystem<S>. The sort header draws re_ui's arrow
icons and takes a column index instead of a per-view enum, view icons are
inlined into their specs, and the Arrow text helper moves next to its
only caller.

The visualizer no longer advertises rewire's untagged descriptors as
queried, which removes the "won't show in the defaults ui" warning.
node_count and topic_count differed only in entity path and component.
The struct only kept the MessageProxyHandle alive and its addr() had no
caller outside its own tests.
The two-variant Forward enum had a single consumer.
Neither is referenced from src; re_sdk_types re-exports re_types_core.
wasm-bindgen-futures stays because the #[wasm_bindgen] expansion of an
async fn names it directly.
@alvgaona
alvgaona merged commit aafd813 into main Aug 22, 2026
4 checks passed
@alvgaona
alvgaona deleted the refactor/generic-table-view branch August 22, 2026 09:37
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