Skip to content

Add credential and download gating to tool cards in notebook - #825

Open
Irozuku wants to merge 2 commits into
developfrom
feat/tool-download-credential-gating
Open

Add credential and download gating to tool cards in notebook#825
Irozuku wants to merge 2 commits into
developfrom
feat/tool-download-credential-gating

Conversation

@Irozuku

@Irozuku Irozuku commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Explorer and converter tool cards now gate on the same credential/download rules as the model rows in the models side bar. A tool that needs an authenticated platform credential opens the credentials dialog on click; one that needs a model download starts the download instead of opening the config form. Cards show a key icon and/or a download/spinner/delete icon for their state, and the icons stay in full color instead of inheriting the card's dimmed style. Backend exposes requires_download / download_size_bytes in converter and explorer metadata so the frontend can gate on it.

image image

Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

Backend

  • DashAI/back/converters/base_converter.py: emit requires_download (from REQUIRES_DOWNLOAD) and download_size_bytes (from DOWNLOAD_SIZE_BYTES) in the converter metadata.
  • DashAI/back/exploration/base_explorer.py: same two metadata keys for explorers.
  • tests/back/converters/test_base_converter_metadata.py: new, asserts the metadata defaults and the declared attribute path.
  • tests/back/exploration/test_base_explorer_metadata.py: new, same coverage for explorers.

Frontend

  • DashAI/front/src/components/notebooks/tool/useToolGate.js: new shared hook. Combines dataset incompatibility (disabled), credential lock and download state into blocked / gated / locked / requiresDownload, plus a resolve() that routes a click to the credentials dialog, the download start, or the normal use action.
  • DashAI/front/src/components/notebooks/tool/ToolGrid.jsx: split onClick into onUse / onDownload / onNeedsCredentials, wire startComponentDownload and CredentialsDialog, and route the pending drag and drop tool through the same gate via a small ResolveDrop child (resolves once per dropped tool so a rerender can't restart a download or reopen the dialog).
  • DashAI/front/src/components/notebooks/tool/ToolList.jsx: same handler split, download and credentials wiring, and gated drop resolution.
  • DashAI/front/src/components/notebooks/tool/ToolGridItem.jsx: consume useToolGate; render the key icon and ModelDownloadStatusIcon in the card header; dim the preview, category icon and text individually instead of the whole card so the status icons keep their color, and lift them above the hatch overlay; hover description popover and lift animation now key off disabled only, so a credential locked or not yet downloaded tool still previews on hover.
  • DashAI/front/src/components/notebooks/tool/ToolListItem.jsx: same gating and status icons for the list layout, with the icons kept outside the dimmed subtree and the slide animation restored for gated but not incompatible tools.

…oads

Add download and credential gating to the ToolList/ToolGrid explorer and
converter cards, mirroring the model rows in the models sidebar. A card is
blocked when a required credential is not authenticated or a required
download is still pending, and clicking it resolves the blocker (opens the
credentials dialog or starts the download) instead of opening the config.

Emit requires_download/download_size_bytes in BaseConverter and
BaseExplorer metadata so the frontend can detect downloadable explorers
and converters, and extend the metadata tests accordingly.
Card level opacity/grayscale grouped the download and credential icons
with the dimmed content, so a gated card greyed its own affordances.
Dim the preview, icon and text individually and lift the status icons
above the hatch overlay.

Hover state now keys off `disabled` (dataset mismatch) instead of the
full gate, so credential locked and not yet downloaded tools still show
their description popover and hover animation.
@Irozuku Irozuku added front Frontend work back Backend work labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back Backend work front Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant