Repository navigation
Conversation
…arch, and recall guidance A user published pages as a durable memory store and a later agent session could not find them. Three causes, all on the discovery path: 1. `superset pages list` silently defaulted `--workspace` to `$SUPERSET_WORKSPACE_ID`, which every Superset terminal sets. Inside a workspace the command only ever listed pages published from that one workspace, while the desktop Pages tab, the MCP `pages_list` tool, and the page skill all treat "no workspace" as the whole organization. The skill even documented `# or omit --workspace for the whole org`, which the CLI did not do. A page published from any other workspace, machine, or session was invisible to the agent and visible to the user. 2. Slugs are minted as `<title-slug>-<6 random chars>`, so an agent that tries `pages get <title-slug>` gets "Page not found" for a page that exists. Nothing told agents to list first, and there was no way to filter the list by title. 3. `page.list` had no search, so recall meant scanning the entire org list and hoping the client did not truncate it. Fix: - CLI `pages list` lists the whole org unless `--workspace` is passed explicitly; adds `--search` and an UPDATED column. - `page.list` accepts an optional `search` (case-insensitive contains over title, description, slug; LIKE metacharacters escaped). - MCP `pages_list` exposes `search`; `pages_get`/`pages_pull`/`pages_versions` say slugs cannot be guessed and point at `pages_list`. - Page skill gains a "Find a page and read it back" section and a troubleshooting row for the guessed-slug failure; docs get a "Find a Page Later" section.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe PR adds page search across the page API, CLI, and MCP tools. It removes the CLI workspace environment fallback, displays page update times, and documents listing pages before using IDs or slugs. ChangesPage Discovery
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Caller
participant PageListAPI
participant PageSearchFilter
participant Database
Caller->>PageListAPI: Submit optional search and workspaceId
PageListAPI->>PageSearchFilter: Build search condition
PageSearchFilter->>PageListAPI: Return field filters
PageListAPI->>Database: Query matching pages
Database-->>Caller: Return page list
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The page discovery changes align across API, CLI, MCP, and documentation, with no actionable merge-blocking issue identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No installed development build can load this pull request as an update: its native fingerprint is |
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
Problem
A user published Superset Pages expecting a later agent session to read them back, and the agent could not find them.
Root causes (discovery path only; publish and permissions were fine)
pages listwas silently workspace-scoped.packages/cli/src/commands/pages/list/command.tsdefaulted--workspaceto$SUPERSET_WORKSPACE_ID, which every Superset terminal sets (apps/desktop/src/main/lib/terminal/env.ts:485,packages/host-service/src/terminal/env.ts:265). Inside a workspace the agent only ever saw pages published from that workspace. The desktop Pages tab (PagesView.tsx:54,page.list.useQuery({})), the MCPpages_listtool, and the page skill all treat "no workspace" as the whole org, and the skill literally said# or omit --workspace for the whole org. So the user saw the page in the Pages tab and the agent's list came back without it.mintPageSlugappends a random 6-char suffix (packages/shared/src/page-slug.ts), sopages get <title-slug>returns "Page not found" for a page that exists. No tool description or skill text said to list first.page.list. Recall meant scanning the whole org list.Not a cause, but checked: visibility defaults to
orgat the app layer (publish.ts:551,page.ts:173; the DB-leveljust_medefault inschema.ts:1385is only reachable by rows created before #6932). The list's visibility filter includes the caller's ownjust_mepages, so a same-user agent always sees its user's private pages. Org scoping is correct: MCP API keys and host-service terminals are pinned to one org, so a multi-org user whose page lives in another org gets a FORBIDDEN "belongs to X" onget, and a list that simply lacks it.Fix
pages list: whole org by default,--workspaceonly when passed; new--search/-s; UPDATED column. Test added.page.list: optionalsearch, case-insensitive contains over title/description/slug, LIKE metacharacters escaped (search.ts+ test).pages_list:searchparam, description says it is the only way to discover a page and to omitworkspaceIdwhen looking one up.pages_get/pages_pull/pages_versionsnow say slugs cannot be guessed and point atpages_list.superset:page: "Find a page and read it back" section replaces the incorrect comment; troubleshooting row for the guessed-slug symptom.pages.mdx;pages_listrow inmcp-server.mdx.Verification
bun testoverpackages/trpc/src/router/page,packages/mcp,packages/cli/src/commands/pages: 88 pass.tsc --noEmitclean inpackages/trpc,packages/mcp,packages/cli.bun run check:pluginspasses (thesupersetplugin is bundled, not marketplace-published, so no version bump applies).Follow-ups not in this PR
pages_listbut its system prompt says nothing about pages; the improved tool description is what it will see.page.liststill returns every row with signed view/thumbnail tickets and nolimit; fine for current org sizes, worth alimitwhen the list grows.Summary by cubic
Fixes agent recall of published pages by making
pages listdiscover all pages the agent can read and by guiding agents to list before fetching. Previously the CLI silently scoped to$SUPERSET_WORKSPACE_ID, so pages published from another workspace, machine, or session were invisible to agents while visible to the user. Now the command is org-wide by default, supports--search, and only scopes to a workspace when--workspaceis passed. Search (case-insensitive, escaped LIKE) was added topage.listand the MCPpages_listtool, and MCP, skill, and docs guidance now instructs agents to find pages by name via list because slugs end in a random suffix and can't be guessed.Migration
--workspaceexplicitly.Written for commit c9a4847. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation