-
Notifications
You must be signed in to change notification settings - Fork 2
Add TUIKit cross-language component spec system #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1d4bc40
Add TUIKit cross-language component spec system
basiclines a561b26
Add missing specs, CI workflow, and repo restructure
basiclines a63c584
Refactor linter, add lint-rules config, polish scripts
basiclines c242c1b
Update README with current repo structure and commands
basiclines 7459cfa
Index-style prompts, token providers, sidebar preview, foundations
basiclines 19b3d18
Add CLI test flags to demo spec (--list, --component, --snapshot)
basiclines d4b5e34
feat(bun): add CLI flags and smoke tests to demo app
basiclines 41e9bf1
feat(go): add CLI flags, smoke tests, fix Select nil-pointer bug
basiclines c4e9123
Add modular demo architecture and snapshot verification to specs
basiclines 0eebdb2
feat(rust): add demo CLI flags, SelectAutocomplete preview, and smoke…
basiclines 183cc4e
Rename bun target to node (Node.js + npm + Ink + vitest)
basiclines 773677e
Update bun target to use @opentui/react (React reconciler)
basiclines 4d31fb0
Document multi-pass compilation in README
basiclines ada4d06
Remove tracked dist/ files from index
basiclines 17016f1
Simplify README repo structure to folder-level overview
basiclines 4dc123f
Remove duplicate 'Building your own library' section from README
basiclines 77ec4db
Reference docs/foundations.md in README design principles
basiclines 1e95fa9
Fix PR review comments: spec inconsistencies
basiclines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Specs CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| specs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Spec lint | ||
| run: bun scripts/lint.ts | ||
|
|
||
| - name: Discover targets | ||
| id: targets | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| TARGETS="$(find targets -maxdepth 1 -name '*.md' -type f -exec basename {} .md \; | sort | tr '\n' ' ')" | ||
| TARGETS="$(echo "$TARGETS" | xargs)" | ||
| if [ -z "$TARGETS" ]; then | ||
| echo "No targets found under targets/*.md" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "targets=$TARGETS" >> "$GITHUB_OUTPUT" | ||
| echo "Discovered targets: $TARGETS" | ||
|
|
||
| - name: Compiler health (all targets) | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| for t in ${{ steps.targets.outputs.targets }}; do | ||
| echo "== status: $t ==" | ||
| bun scripts/compile.ts status --target "$t" | ||
| done | ||
|
|
||
| - name: Prompt generation smoke test (all targets) | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| for t in ${{ steps.targets.outputs.targets }}; do | ||
| echo "== prompt: $t ==" | ||
| bun scripts/compile.ts prompt --target "$t" | ||
| done | ||
|
|
||
| - name: No generated output committed | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| if git ls-files --error-unmatch dist >/dev/null 2>&1; then | ||
| echo "dist/ is tracked but must remain generated-only." >&2 | ||
| exit 1 | ||
| fi | ||
| if git diff --name-only "origin/${{ github.base_ref || 'main' }}"...HEAD | grep -E '^dist/'; then | ||
| echo "PR includes files under dist/; remove generated output from commits." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Changed-spec completeness | ||
| if: github.event_name == 'pull_request' | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| BASE="origin/${{ github.base_ref }}" | ||
| git fetch --no-tags --depth=1 origin "${{ github.base_ref }}" | ||
| CHANGED="$(git diff --name-only "$BASE"...HEAD)" | ||
| FAIL=0 | ||
| while IFS= read -r file; do | ||
| [ -z "$file" ] && continue | ||
| case "$file" in | ||
| components/*/*.md) | ||
| case "$file" in | ||
| *.test.md|*.preview.md) continue ;; | ||
| esac | ||
| dir="$(dirname "$file")" | ||
| name="$(basename "$file" .md)" | ||
| test_file="$dir/$name.test.md" | ||
| preview_file="$dir/$name.preview.md" | ||
| if ! echo "$CHANGED" | grep -Fxq "$test_file"; then | ||
| echo "Missing changed test spec: $test_file (required when $file changes)" >&2 | ||
| FAIL=1 | ||
| fi | ||
| if ! echo "$CHANGED" | grep -Fxq "$preview_file"; then | ||
| echo "Missing changed preview spec: $preview_file (required when $file changes)" >&2 | ||
| FAIL=1 | ||
| fi | ||
| ;; | ||
| esac | ||
| done <<< "$CHANGED" | ||
| [ "$FAIL" -eq 0 ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| dist/ | ||
| node_modules/ | ||
| targets/*.lock.json |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.