Skip to content

Make examples the canonical gallery source - #2

Merged
batuhan merged 3 commits into
masterfrom
batuhan/canonical-examples
Jul 16, 2026
Merged

batuhan merged 3 commits into
masterfrom
batuhan/canonical-examples

Conversation

@batuhan

@batuhan batuhan commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • make this repository the only source for prompts and gallery metadata
  • generate and publish a public JSON manifest through GitHub Pages
  • update only changed existing Spacefast spaces from GitHub Actions
  • reject local badge bundles and require the shared badge
  • improve all 47 prompts and add the missing Notes build dependency

Why

The website and a draft badge branch had separate prompt copies. Published examples could therefore carry stale prompts and stale badge behavior. This moves the data contract here and makes the website a consumer.

Verification

  • generated a 47-item manifest and checked the prompt contract
  • built every buildable example from a clean install
  • validated every publish directory and every HTML page
  • confirmed no output contains a local sf-badge.js
  • workflow YAML and git diff checks pass

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

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

Copy link
Copy Markdown

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: 7c9d84e583

ℹ️ 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".

push:
branches: [main]
paths: ["examples/**"]
branches: [master]

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 Keep publishing triggers on the main branch

This repository's existing branch is main (the previous workflow also targeted main), so changing the push trigger to master means normal pushes to main will no longer publish the manifest or examples; the same mismatch also prevents PR validation for PRs targeting main via the pull_request branch filter above.

Useful? React with 👍 / 👎.

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fetch enough history before diffing push ranges

With fetch-depth: 2, a push that contains more than one new commit does not include github.event.before in the checkout, but the script later runs git diff --name-only "$BEFORE" "${{ github.sha }}"; in that common multi-commit push scenario the discover job exits with a bad-object error and nothing gets published. Use full history or otherwise fetch BEFORE before diffing.

Useful? React with 👍 / 👎.

slug,
title: requiredString(meta.title, "title", slug),
name: requiredString(meta.name, "name", slug),
vertical: requiredString(meta.vertical, "vertical", slug),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point manifest repo links at the real branch

The generated feed now hard-codes every example's repoUrl under /tree/master/..., but this repo only has main as the canonical branch, so the gallery will emit broken source links for every example instead of linking users to the files that actually exist.

Useful? React with 👍 / 👎.

@batuhan
batuhan merged commit a63e82d into master Jul 16, 2026
50 checks passed
@batuhan
batuhan deleted the batuhan/canonical-examples branch July 16, 2026 13:30
@indent

indent Bot commented Jul 16, 2026

Copy link
Copy Markdown
PR Summary

Generating summary...

Issues

Review closed.

CI Checks

1 CI check failed on 2d3069f.

Failing discover
  • discover finished with failure.

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