Skip to content

plugins: Add line scope API for overview/detail filtering#44

Merged
robinebers merged 4 commits into
mainfrom
feat/primary-secondary-shape-api
Feb 2, 2026
Merged

plugins: Add line scope API for overview/detail filtering#44
robinebers merged 4 commits into
mainfrom
feat/primary-secondary-shape-api

Conversation

@robinebers
Copy link
Copy Markdown
Owner

@robinebers robinebers commented Feb 2, 2026

Add scope field to plugin manifest lines to control visibility on Overview vs Detail pages.

Summary

  • Adds required scope: "overview" | "detail" field to manifest lines
  • Overview page shows only lines with scope: "overview"; detail pages show all
  • Removes stale bundled_plugins from repo (now gitignored, generated during CI)

Changes

  • Type definitions updated in TypeScript and Rust
  • All dev plugin.json files updated with scope values
  • ProviderCard filters lines by label matching against manifest scope
  • Documentation and spec added

Made with Cursor


Note

Medium Risk
Introduces a required lines[].scope field in plugin manifests and changes UI rendering based on it; missing/incorrect scopes could break plugin loading or hide metrics unexpectedly.

Overview
Adds a required scope: "overview" | "detail" to every manifest line, propagating it through both the Rust manifest loader/DTOs and the TypeScript ManifestLine type.

Updates the UI to filter provider card skeleton + runtime lines on the Overview page (only overview scope), while provider detail pages show all lines; tests and docs/specs are updated accordingly. Also stops tracking bundled plugin build artifacts by gitignoring src-tauri/resources/bundled_plugins/* and removing the previously committed bundled plugin files.

Written by Cursor Bugbot for commit cd82b15. This will update automatically on new commits. Configure here.


Summary by cubic

Adds a required scope field to plugin manifest lines and updates the UI to show overview lines on the Overview page while detail pages show all lines. Also removes bundled plugin assets from the repo and ignores them as build artifacts.

  • New Features

    • Added lines[].scope: "overview" | "detail" to plugin manifests (TypeScript and Rust types).
    • ProviderCard filters by scope; Overview uses "overview", provider detail shows all.
    • Updated all dev plugin.json files, tests, and docs; added a short spec.
    • Removed stale bundled_plugins and added to .gitignore.
  • Migration

    • Add scope to every line in each plugin’s plugin.json.
    • Use "overview" for summary metrics; use "detail" for deeper stats.
    • Update any test fixtures to include scope.

Written for commit cd82b15. Summary will update on new commits.

- Added a `scope` property to plugin lines to differentiate between "overview" and "detail" views.
- Updated various plugin configurations to include the new `scope` property for better line categorization.
- Implemented filtering logic in the `ProviderCard` and `OverviewPage` components to display lines based on the selected scope.
- Enhanced tests to validate the new filtering behavior and ensure correct rendering of lines based on scope.
- Deleted the Claude and Codex plugin files, including their icons, JavaScript logic, and configuration files, as they are no longer in use.
- Cleaned up associated test files for both plugins to maintain a tidy codebase.
- Added entry for bundled_plugins directory to .gitignore to prevent build artifacts from being tracked in the repository.
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented Feb 2, 2026

Add line scope API and filter provider lines by scope in pages.overview.OverviewPage and components.provider-card.ProviderCard

Introduce a required scope on manifest lines, include scope in list_plugins DTOs, and filter rendered lines by scope on Overview vs. Detail. Update tests, schema, and docs; remove bundled plugin assets.

📍Where to Start

Start with manifest deserialization changes in plugin_engine.manifest.ManifestLine in manifest.rs, then follow list_plugins in lib.rs and the filtering logic in components.provider-card.ProviderCard in provider-card.tsx.


Macroscope summarized cd82b15.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f59faea77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 8 to +11
#[serde(rename = "type")]
pub line_type: String,
pub label: String,
pub scope: String,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid breaking existing installed plugins by requiring scope

Existing installations already have app_data/plugins/*/plugin.json without a scope field, and load_plugins_from_dir silently skips plugins that fail serde_json::from_str. With scope now required, those legacy plugins will fail to deserialize, leaving users with an empty plugin list after upgrade (install_dir isn’t emptied, so bundled plugins are not copied over). This is a regression for any user upgrading from a version that wrote manifests without scope.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 31 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="docs/specs/2026-02-02-line-scope.md">

<violation number="1" location="docs/specs/2026-02-02-line-scope.md:34">
P2: Documentation inconsistency: This line claims bundled plugins were "updated" but according to the PR description, `bundled_plugins/` was removed from the repo and added to `.gitignore`. This spec entry should either be removed or updated to reflect that these files are now gitignored and generated during CI rather than being tracked/updated.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread docs/specs/2026-02-02-line-scope.md Outdated
- Updated .gitignore to keep the bundled_plugins directory while ignoring its contents, ensuring CI-generated files are not tracked.
- Removed outdated reference to bundled plugins in the line scope documentation, reflecting the latest plugin structure.
@robinebers robinebers merged commit 6a72419 into main Feb 2, 2026
1 check passed
@robinebers robinebers deleted the feat/primary-secondary-shape-api branch February 2, 2026 16:16
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

{ "type": "progress", "label": "Session", "scope": "overview" },
{ "type": "progress", "label": "Weekly", "scope": "overview" },
{ "type": "progress", "label": "Sonnet", "scope": "detail" },
{ "type": "progress", "label": "Extra usage", "scope": "detail" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manifest missing line declarations causes hidden data

Medium Severity

The Claude plugin can output an "Opus" line (line 231 in plugin.js) and the Cursor plugin can output a "Bonus spend" line (line 225 in plugin.js), but neither is declared in their respective plugin.json manifests. With the new scope filtering, the overview page only shows lines whose labels match manifest entries with scope: "overview". These undeclared lines will be hidden from the overview page even when they contain valid usage data. This creates an inconsistent experience where data appears on the detail page but not on overview.

Additional Locations (1)

Fix in Cursor Fix in Web

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