feat: server-parity — load_compare, /load fields, permissions fix#4
Open
paddymul wants to merge 1 commit into
Open
feat: server-parity — load_compare, /load fields, permissions fix#4paddymul wants to merge 1 commit into
paddymul wants to merge 1 commit into
Conversation
… fields + permissions fix
Brings the buckaroo-tauri plugin to full parity with `buckaroo.server`'s
HTTP surface. Adds the remaining `/load_compare` passthrough, the two
optional `/load` fields the plugin wasn't forwarding (`prompt`,
`component_config`), and fixes the permissions registration that the
prior expand-surface PR missed for `load_expr` and `diagnostics`.
## Rust (crates/buckaroo-tauri/src)
- New `LoadCompareArgs` + `buckaroo_load_compare` command. POSTs
`/load_compare` with `{session, path1, path2, join_columns, how?,
no_browser: true}` and opens the internal WS to the returned session
— same end-of-call wiring as `buckaroo_load_path` / `_load_expr`.
Unlike the other two, `session` is a required field on the Rust side
because the server's `/load_compare` requires it.
- `LoadPathArgs` gains `prompt` and `component_config` (forwarded
verbatim into the POST body when present). Mirrors what
`LoadExprArgs` already accepts. Pre-existing callers that omit these
fields are unaffected.
- `buckaroo_load_compare` registered in `init()`.
- `build.rs` `COMMANDS` updated to list all seven commands. Previously
it still listed only the original four — `load_expr` and
`diagnostics` (added in the prior PR) weren't being registered with
the Tauri 2 permission system, so a host that opted into
`buckaroo-tauri:default` could not actually call them. The
autogenerated per-command tomls are regenerated by `cargo build`.
- `permissions/default.toml` updated to allow all seven commands.
## JS adapter (packages/buckaroo-tauri-adapter)
- New `loadCompare(path1, path2, join_columns, { session, how? })`
helper paired with `buckaroo_load_compare`. Required-`session`
signature surfaces the server-side contract at the type level so
callers don't discover it via a 400.
- `loadPath` opts gain `prompt` and `component_config`, forwarded to
the Rust command.
- `loadCompare` exported from `index.ts`.
## Parity matrix
| Server route | Plugin command | Status (before → after) |
|--------------------|------------------------|-------------------------|
| `GET /health` | `buckaroo_health` | unchanged (Rust-side liveness, not a `/health` proxy by design) |
| `GET /diagnostics` | `buckaroo_diagnostics` | unchanged (passthrough) |
| `POST /load` | `buckaroo_load_path` | adds `prompt`, `component_config` |
| `POST /load_expr` | `buckaroo_load_expr` | unchanged |
| `POST /load_compare` | `buckaroo_load_compare` | **new** |
| `WS /ws/<id>` | `buckaroo_send` + events | unchanged (passthrough) |
## Test plan
- [x] `cargo build` clean.
- [x] Existing Playwright DOM tests on the example app still pass (6/6).
- [x] `tsc --noEmit` clean on the adapter package.
- [ ] Manual: `loadCompare(p1, p2, ["id"], { session: "s1" })` against
a sidecar with two parquets that share an `id` column produces
a merged view with diff styling and `eqs` populated.
- [ ] Manual: a host using `buckaroo-tauri:default` capability can
invoke `buckaroo_load_expr`, `buckaroo_diagnostics`, and
`buckaroo_load_compare` without Tauri's permission system
rejecting the call (verifies the build.rs fix).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Stacks on #1 (
feat/load-backend-xorq). Closes the remaining gaps between the plugin's IPC surface and whatbuckaroo.serveractually exposes.Summary
buckaroo_load_compareRust command +loadCompare()JS helper. Mirrors serverPOST /load_compare— diff two files viacol_join_dfs, return the merged frame with diff styling and per-columneqs.buckaroo_load_pathnow forwardspromptandcomponent_config(already accepted by the server's/load, already accepted by ourbuckaroo_load_expr, was the one missing spot).build.rs+permissions/default.tomlnow register all seven commands. The prior expand-surface PR (Docs recommend non-existent 'buckaroo[xorq]' extra; sidecar fails to import tornado #1) addedbuckaroo_load_exprandbuckaroo_diagnosticsas IPC handlers but forgot to list them inCOMMANDS— so a webview usingbuckaroo-tauri:defaultcouldn't actually call them. Fixed here while the file was already being touched.Parity matrix (after this PR)
GET /healthbuckaroo_health(Rust-side liveness; not a proxy by design)GET /diagnosticsbuckaroo_diagnosticsPOST /loadbuckaroo_load_path(+prompt,component_confignow)POST /load_exprbuckaroo_load_exprPOST /load_comparebuckaroo_load_comparenewWS /ws/<id>buckaroo_send+ eventsThe only remaining intentional gap is
buckaroo_pick_file, which is still a stub pendingtauri-plugin-dialogintegration (called out in the README).Test plan
cargo build -p buckaroo-tauriclean (regenerates autogenerated permission tomls).tsc --noEmitclean onbuckaroo-tauri-adapter.loadCompare(p1, p2, ["id"], { session: "s1" })against a sidecar with two parquets that share anidcolumn produces a merged view with diff styling and a populatedeqs.buckaroo-tauri:defaultcan invokebuckaroo_load_expr,buckaroo_diagnostics, andbuckaroo_load_comparewithout Tauri's permission system rejecting the call (verifies thebuild.rsfix).🤖 Generated with Claude Code