Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(bind-template): let a bind declare an interactive filter, including a context filter#629

Open
mattcfilbert wants to merge 1 commit into
feature/desktoptableau/tableau-mcp:feature/desktopfrom
claude/m7-declarative-filterstableau/tableau-mcp:claude/m7-declarative-filtersCopy head branch name to clipboard
Open

feat(bind-template): let a bind declare an interactive filter, including a context filter#629
mattcfilbert wants to merge 1 commit into
feature/desktoptableau/tableau-mcp:feature/desktopfrom
claude/m7-declarative-filterstableau/tableau-mcp:claude/m7-declarative-filtersCopy head branch name to clipboard

Conversation

@mattcfilbert

Copy link
Copy Markdown
Contributor

Decision

Let a bind carry an interactive filter, and emit a region filter as a context filter so a "top N within a selected dimension" ask builds correctly in one call. This is a new capability on bind-template, not a change to how existing binds behave (no filter, no new behavior).

The problem it fixes: asked for "top 10 products by sales, and let me filter to one region," the agent built a plain Top-N plus an ordinary region filter. Tableau computes the global top 10 first and then filters by region — the wrong list. A context filter runs before the Top-N (Tableau's order of operations), so a selected region gets its own top 10.

Scope

  • Optional filters[] on the bind proposal: { field, values?, context? } (values optional — a "let me filter" ask names no region, so the control enumerates all members).
  • Emit context='true' on the filter and declare its column, spliced after the Top-N so the Top-N planner still sees a single dimension and does not refuse.
  • Emit a shown filter card, so the user gets a real interactive control — not just a hidden context filter (this is the difference between "correct order of operations" and "the user can actually pick a region").
  • Fold filters into the proposal signature, so adding one counts as a changed proposal on re-bind.

What future work must preserve

The context filter must be spliced after the Top-N (or the Top-N planner refuses on two dimensions), and a context filter must ship with a shown card (order of operations alone, with no control, is not what the user asked for).

Change / evidence / risk

Full suite green: 5062 tests, typecheck and lint clean, verified firsthand (the lone config-test failure is the discovery-dir env fixture, not this change). New tests assert the emitted XML: context='true' on the region filter, the filter column in datasource-dependencies and slices, the shown card in the window, and the Top-N groupfilter unaffected.

Not yet verified: the live apply round-trip. Whether Desktop preserves the emitted context filter and actually reorders the operations as intended is a live probe I have not run — the XML forms are copied from confirmed real-workbook evidence, but the end-to-end behavior on Desktop is unconfirmed. This needs a live sing before we trust it.

Reviewer decision

Approve = bind-template can build a top-N-within-an-interactive-filter correctly, pending the live round-trip check.

Posted by MattGPT (automation) on Matt Filbert's behalf.

🤖 Generated with Claude Code

…ing a context filter

A bind could not express 'top 10 products, and let me filter to one region' correctly.
The agent built a plain Top-N plus an ordinary region filter, so Tableau computed the
global top 10 first and then filtered by region — the wrong list. The fix is to let a
bind carry filters, and to emit a region filter as a context filter (Tableau runs it
before the Top-N), so a selected region gets its own top 10.

- Add an optional filters[] to the bind proposal (field, optional values, optional context).
- Emit a context filter (context='true') and declare its column, spliced AFTER the Top-N
  so the Top-N planner still sees a single dimension and does not refuse.
- Emit a shown filter card so the user has an interactive control, not just a hidden filter.
- Fold filters into the proposal signature so adding one counts as a changed proposal on re-bind.

Full suite green (5062 passing; the lone config-test failure is the discovery-dir env
fixture, not this change). Live apply/order-of-operations round-trip is not yet verified
against Desktop. No version bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.