Skip to content

Promote integration snippets in the schema pages#631

Merged
jviotti merged 1 commit intomainfrom
usage-section
Feb 13, 2026
Merged

Promote integration snippets in the schema pages#631
jviotti merged 1 commit intomainfrom
usage-section

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 13, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@augmentcode
Copy link

augmentcode bot commented Feb 13, 2026

🤖 Augment PR Summary

Summary: This PR enhances schema pages by surfacing copyable “integration snippets” and refactors the tab UI logic to support multiple independent tab groups.

Changes:

  • Adds a “Use with” section on schema pages with tabbed snippets for CLI, OpenAPI, and Deno usage (plus copy-to-clipboard buttons).
  • Introduces a new client-side copy.js script to copy snippet text and provide visual feedback.
  • Updates tabs.js to scope tab behavior per data-sourcemeta-ui-tab-group container and optionally sync selection to a configurable URL query parameter.
  • Wraps the existing schema “details” tabs in a tab-group container and preserves the ?tab=... deep-link behavior.
  • Adjusts Bootstrap styling defaults by setting $btn-border-radius to match the project’s square-corner look.

Technical Notes: The schema page now has two tab groups (usage snippets and details), and the copy feature relies on the Clipboard API in the browser.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

@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.

2 issues found across 5 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="src/web/scripts/copy.js">

<violation number="1" location="src/web/scripts/copy.js:4">
P2: `navigator.clipboard.writeText()` returns a Promise that is not being handled. If the copy fails (permissions denied, non-secure context, etc.), this produces an unhandled promise rejection **and** the checkmark icon is still shown, misleading the user into thinking the copy succeeded. The icon feedback should only appear on successful copy.</violation>
</file>

<file name="src/web/scripts/tabs.js">

<violation number="1" location="src/web/scripts/tabs.js:26">
P2: When the URL contains a value for `urlParam` that doesn't match any tab (e.g., `?tab=nonexistent`), no tab gets selected and no fallback occurs. The `forEach` silently finds no match, leaving all tabs in an indeterminate state. Consider tracking whether a match was found and falling back to the first tab if not.</violation>
</file>

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 3c0c03f into main Feb 13, 2026
5 checks passed
@jviotti jviotti deleted the usage-section branch February 13, 2026 19:10
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