diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..1372fd4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Maintainer review for every contribution, including CI and policy changes. +* @wilkinsantana diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..56f73fe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,36 @@ +name: Bug report +description: Report a reproducible problem in TendUI. +title: "[Bug]: " +labels: [bug] +body: + - type: markdown + attributes: + value: "For vulnerabilities, email security@tendstack.com privately. Do not include credentials or user data." + - type: input + id: version + attributes: + label: Version or commit + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Minimal reproduction + description: Include steps and a small code example or public reproduction repository. + validations: + required: true + - type: textarea + id: behavior + attributes: + label: Expected and actual behavior + validations: + required: true + - type: textarea + id: environment + attributes: + label: Browser and environment + description: Browser/version, operating system, Go version, theme, viewport and reduced-motion settings when relevant. + - type: textarea + id: evidence + attributes: + label: Screenshots or sanitized diagnostics diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..782bf72 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation and examples + url: https://tendui.com/docs + about: Start with the guides and working examples. + - name: Private security report + url: mailto:security@tendstack.com + about: Do not disclose vulnerabilities in public issues. diff --git a/.github/ISSUE_TEMPLATE/proposal.yml b/.github/ISSUE_TEMPLATE/proposal.yml new file mode 100644 index 0000000..594017e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/proposal.yml @@ -0,0 +1,24 @@ +name: Component or feature proposal +description: Discuss an addition before starting a large implementation. +title: "[Proposal]: " +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: User need + description: What task is difficult with the existing components? + validations: + required: true + - type: textarea + id: approach + attributes: + label: Proposed behavior and alternatives + description: Include native HTML semantics, keyboard/mobile behavior and the no-bundled-JavaScript contract. + validations: + required: true + - type: textarea + id: compatibility + attributes: + label: Compatibility and scope + description: Identify API changes, dependencies and a bounded first implementation. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..fb19001 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +## Problem and change + +Explain the user-visible problem and the resulting behavior. Link the issue. + +## Validation + +List checks actually run and results. Include screenshots for visual changes. + +## Compatibility and sources + +Describe API changes, migration steps, dependencies, reused material and significant +AI assistance. Omit private infrastructure, credentials and personal data. + +- [ ] I have read CONTRIBUTING.md and the DCO. +- [ ] My non-merge commits have my `Signed-off-by` trailer. +- [ ] Tests/docs and generated templ Go are updated where applicable. +- [ ] I checked keyboard, narrow-screen and theme behavior for UI changes. diff --git a/.github/scripts/check-dco.py b/.github/scripts/check-dco.py new file mode 100644 index 0000000..42ec9f5 --- /dev/null +++ b/.github/scripts/check-dco.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +"""Check author-matching DCO trailers without executing contribution code.""" +import re +import subprocess +import sys + + +def signed_off(name, email, message): + trailers = subprocess.run( + ["git", "interpret-trailers", "--parse"], input=message, + text=True, capture_output=True, check=True, + ).stdout + for line in trailers.splitlines(): + match = re.fullmatch(r"Signed-off-by:\s*(.+?)\s*<([^<>\s]+@[^<>\s]+)>", line, re.I) + if match and match[1].strip() == name.strip() and match[2].casefold() == email.casefold(): + return True + return False + + +def main(): + if len(sys.argv) != 3 or not all(re.fullmatch(r"[0-9a-f]{40}", s) for s in sys.argv[1:]): + raise SystemExit("Usage: check-dco.py BASE_SHA HEAD_SHA (full commit hashes)") + commits = subprocess.check_output( + ["git", "rev-list", "--no-merges", sys.argv[1] + ".." + sys.argv[2]], text=True, + ).splitlines() + failed = [] + for commit in commits: + author, email, message = subprocess.check_output( + ["git", "show", "-s", "--format=%an%x00%ae%x00%B", commit], text=True, + ).split("\0", 2) + if not signed_off(author, email, message): + failed.append(commit[:12]) + if failed: + print("Missing author-matching DCO sign-off in: " + ", ".join(failed)) + print("Read CONTRIBUTING.md; sign only your own contributions with git commit -s.") + return 1 + print(f"DCO: {len(commits)} non-merge commits have author-matching sign-offs.") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.github/scripts/test_dco.py b/.github/scripts/test_dco.py new file mode 100644 index 0000000..241ca58 --- /dev/null +++ b/.github/scripts/test_dco.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +import importlib.util +from pathlib import Path +import unittest + +spec = importlib.util.spec_from_file_location("dco", Path(__file__).with_name("check-dco.py")) +dco = importlib.util.module_from_spec(spec) +spec.loader.exec_module(dco) + +class DCOTests(unittest.TestCase): + def test_matching_trailer(self): + self.assertTrue(dco.signed_off("Example Contributor", "123+dev@users.noreply.github.com", "Fix spacing\n\nSigned-off-by: Example Contributor <123+dev@users.noreply.github.com>\n")) + def test_missing_or_wrong_author(self): + self.assertFalse(dco.signed_off("Dev", "dev@example.com", "Fix spacing\n")) + self.assertFalse(dco.signed_off("Dev", "dev@example.com", "Fix\n\nSigned-off-by: Someone Else \n")) + def test_body_text_is_not_a_trailer(self): + self.assertFalse(dco.signed_off("Dev", "dev@example.com", "Signed-off-by: Dev \n\nThis is an example, not a sign-off.\n")) + def test_another_trailer_can_follow(self): + self.assertTrue(dco.signed_off("Dev", "dev@example.com", "Fix\n\nSigned-off-by: Dev \nReviewed-by: Reviewer \n")) + +if __name__ == "__main__": + unittest.main() diff --git a/.github/settings/README.md b/.github/settings/README.md new file mode 100644 index 0000000..928fd27 --- /dev/null +++ b/.github/settings/README.md @@ -0,0 +1,27 @@ +# Owner-applied repository settings + +This directory is a reviewable configuration, not proof that GitHub settings +are active. An owner with repository administration access should apply the +main ruleset once the contribution workflow is merged and its check names exist. + +```sh +gh api --method POST repos/Tend-Stack/TendUI/rulesets --input .github/settings/main-ruleset.json +``` + +Read existing rulesets first. If one already has this name, update it by its ID +with PUT rather than creating duplicates. The ruleset requires DCO and all CI, +one approving code-owner review, dismissal of stale approvals, approval of the +latest push, resolved conversations and an up-to-date branch. It blocks force +pushes and deletion. Repository admins have an explicit PR-only bypass for +maintainer exceptions; record the reason in the PR and preserve contributor DCO. + +Also enable GitHub private vulnerability reporting and web commit sign-off, +disable squash/rebase merges to preserve commit trailers, and allow merge commits. +Require approval for fork workflows according to the organization's trust policy. +Never run untrusted fork code on private self-hosted runners or with deployment +secrets. Workflows use hosted runners, read-only PR permissions and no +`pull_request_target` code execution. Tag release credentials run only on maintainer tags. + +Use existing `bug`, `enhancement`, `documentation`, `good first issue` and +`help wanted` labels. Curate bounded starter tasks; do not label complex API or +security changes as beginner work merely to attract contributions. diff --git a/.github/settings/main-ruleset.json b/.github/settings/main-ruleset.json new file mode 100644 index 0000000..9f2f0b8 --- /dev/null +++ b/.github/settings/main-ruleset.json @@ -0,0 +1,83 @@ +{ + "name": "Reviewed main contributions", + "target": "branch", + "enforcement": "active", + "bypass_actors": [ + { + "actor_id": 5, + "actor_type": "RepositoryRole", + "bypass_mode": "pull_request" + } + ], + "conditions": { + "ref_name": { + "include": [ + "refs/heads/main" + ], + "exclude": [] + } + }, + "rules": [ + { + "type": "deletion" + }, + { + "type": "non_fast_forward" + }, + { + "type": "pull_request", + "parameters": { + "required_approving_review_count": 1, + "dismiss_stale_reviews_on_push": true, + "require_code_owner_review": true, + "require_last_push_approval": true, + "required_review_thread_resolution": true + } + }, + { + "type": "required_status_checks", + "parameters": { + "strict_required_status_checks_policy": true, + "do_not_enforce_on_create": false, + "required_status_checks": [ + { + "context": "ubuntu-24.04 / Go 1.26.0", + "integration_id": 15368 + }, + { + "context": "ubuntu-24.04 / Go 1.27.3", + "integration_id": 15368 + }, + { + "context": "macos-15 / Go 1.26.0", + "integration_id": 15368 + }, + { + "context": "macos-15 / Go 1.27.3", + "integration_id": 15368 + }, + { + "context": "windows-2025 / Go 1.26.0", + "integration_id": 15368 + }, + { + "context": "windows-2025 / Go 1.27.3", + "integration_id": 15368 + }, + { + "context": "Known vulnerabilities / Go 1.27.3", + "integration_id": 15368 + }, + { + "context": "browser", + "integration_id": 15368 + }, + { + "context": "DCO", + "integration_id": 15368 + } + ] + } + } + ] +} diff --git a/.github/workflows/contributions.yml b/.github/workflows/contributions.yml new file mode 100644 index 0000000..eb3a428 --- /dev/null +++ b/.github/workflows/contributions.yml @@ -0,0 +1,36 @@ +name: Contribution checks +on: + pull_request: +permissions: + contents: read +concurrency: + group: dco-${{ github.event.pull_request.number }} + cancel-in-progress: true +jobs: + dco: + name: DCO + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + persist-credentials: false + - name: Verify contributor sign-offs using the base branch policy + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + shell: bash + run: | + set -euo pipefail + # Read policy from the trusted base; never execute contributor scripts. + if ! git cat-file -e "$BASE_SHA:.github/scripts/check-dco.py" 2>/dev/null; then + echo "DCO policy bootstrap: enforcement begins after this policy merges." + exit 0 + fi + test "$(git rev-parse HEAD)" = "$HEAD_SHA" + git show "$BASE_SHA:.github/scripts/check-dco.py" > "$RUNNER_TEMP/check-dco.py" + git show "$BASE_SHA:.github/scripts/test_dco.py" > "$RUNNER_TEMP/test_dco.py" + python3 "$RUNNER_TEMP/test_dco.py" + python3 "$RUNNER_TEMP/check-dco.py" "$BASE_SHA" "$HEAD_SHA" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 377aa50..18fe66f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,17 @@ jobs: shell: bash run: | set -euo pipefail - test "$GITHUB_REF_NAME" = v2026.1.0 + python3 - <<'PYTAG' + import os, re, pathlib + tag = os.environ['GITHUB_REF_NAME'] + if not re.fullmatch(r'v2026\.[1-9][0-9]*\.[0-9]+(?:-[0-9A-Za-z.-]+)?', tag): + raise SystemExit('Invalid release tag') + version = re.search(r'Version = "([^"]+)"', pathlib.Path('tendui.go').read_text())[1] + if tag != 'v' + version: + raise SystemExit('Tag must match the library version') + if not pathlib.Path('docs/releases/' + tag[1:] + '.md').is_file(): + raise SystemExit('Missing version-specific release notes') + PYTAG mkdir -p tests/results/release gh api "repos/$GITHUB_REPOSITORY/actions/runs?head_sha=$GITHUB_SHA&per_page=100" > tests/results/release/checks.json python3 - <<'PY' @@ -59,6 +69,8 @@ jobs: export GIT_CONFIG_KEY_0=http.https://github.com/.extraheader export GIT_CONFIG_VALUE_0="AUTHORIZATION: basic $auth" cp tests/release/consumer_test.go.txt "$release_consumer/consumer_test.go" + mkdir "$release_consumer/quickstart" + cp examples/quickstart/*.go "$release_consumer/quickstart/" cd "$release_consumer" go mod init example.com/tendui-release-consumer go get "github.com/Tend-Stack/TendUI/v2026@$GITHUB_REF_NAME" @@ -78,7 +90,9 @@ jobs: run: | set -euo pipefail if ! gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then - gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --title "TendUI $GITHUB_REF_NAME" --notes-file docs/releases/2026.1.0.md + flags=() + if [[ "$GITHUB_REF_NAME" == *-* ]]; then flags+=(--prerelease --latest=false); fi + gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --title "TendUI $GITHUB_REF_NAME" --notes-file "docs/releases/${GITHUB_REF_NAME#v}.md" "${flags[@]}" fi - name: Retain release installation evidence if: always() diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..aaa091e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,19 @@ +# Community code of conduct + +Treat participants with respect regardless of experience, identity or background. +Discuss ideas and code constructively, accept good-faith feedback, and give credit +for other people's work. Respect maintainers' and contributors' time and boundaries. + +Harassment, threats, discriminatory abuse, sexualized conduct, doxxing, and +publication of another person's private information are not acceptable. This +policy applies to repository issues, pull requests and other project-run spaces. + +Report concerns privately to **conduct@tendstack.com**. Include links and relevant +context, avoiding unnecessary personal information. Reports will be handled as +privately as practicable; information may be shared where needed to investigate +or protect participants. No response-time guarantee is promised. + +Maintainers may request changes, remove content, close a discussion, restrict +participation or ban an account depending on the severity and pattern of conduct. +A person involved in a report should not decide its outcome. The reporter or +subject may request reconsideration through the same private contact address. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..28ab089 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,78 @@ +# Contributing to TendUI + +Thank you for helping improve TendUI. Start with a bug, documentation fix, +accessibility improvement or an issue labeled `good first issue` or `help wanted`. +Discuss new components, public API changes, dependencies and large refactors in an +issue before implementation. A proposal should explain the use case, native HTML +semantics, keyboard behavior, narrow-screen behavior and alternatives considered. + +## Contribution terms: MIT + DCO + +Contributions are submitted under this repository's [MIT license](LICENSE). +You keep your copyright; no copyright assignment or separate CLA is required. +Every non-merge commit must include a sign-off certifying the [Developer +Certificate of Origin 1.1](DCO). Read it before signing. Obtain any employer or +third-party permission needed, retain attribution, and do not submit incompatible +licensed material. The sign-off is a certification, not a cryptographic signature. + +```sh +git commit -s -m "Describe the change" +``` + +Use your own name and the same email as the commit author. A GitHub-provided +noreply address is accepted. Names, commit emails and sign-offs become public +and remain in history. Never add another person's sign-off without authorization. +For your own last commit, use `git commit --amend --signoff`; coordinate with +reviewers before rewriting an already-pushed contribution branch. Maintainers do +not add missing contributor certifications on someone else's behalf. + +AI-assisted contributions follow exactly the same rules: a human contributor +must understand, review and test the result and certify the right to submit it. +Identify significant generated material or reused sources in the PR description. + +## Workflow + +1. Fork the repository and create a focused branch from current `main`. +2. Make the smallest complete change; keep unrelated cleanup separate. +3. Add proportionate tests and update documentation for changed behavior. +4. Regenerate templ output when templates change; commit both source and generated Go. +5. Open a draft PR early when feedback would help. Link the issue and describe validation. +6. Respond to review; maintainers merge after required checks and approval. + +Go 1.26 or newer is required. Template authors use templ v0.3.1100. Node/npm are +only used for optional contributor browser tooling, never the shipped UI. + +```sh +go run ./cmd/tendui-dev check +go run ./cmd/tendui-dev generated +go run ./cmd/tendui-dev recipes +# After committing, verify isolated consumption: +go run ./cmd/tendui-dev consumer +``` + +CI supplies native-platform and browser coverage. Do not claim a check ran when +it did not; explain unavailable checks in the PR. Keep generated test evidence +under ignored `tests/results/` and remove owned disposable artifacts after use. + +## Design and compatibility + +- Semantic HTML and native browser behavior first; no bundled client JavaScript, + remote fonts or runtime asset downloads. +- Keep Go configuration typed. Applications own routing, persistence, sessions, + request protection and any optional HTMX runtime. +- Preserve keyboard access, accessible names, theme behavior and reduced motion. +- Public API changes need an explicit compatibility review and migration notes, + even during preview. Never silently replace old tags. +- Include screenshots for visual changes and narrow-screen checks where relevant. +- Never commit credentials, private infrastructure details, personal datasets or logs. + +## Reviews and releases + +CODEOWNERS identifies the maintainer. External contributions require maintainer +approval, DCO and applicable CI. An administrator may make a documented exception +through a PR; never use an exception to accept an unsigned contributor submission. +Prefer merge commits to preserve contributor sign-offs. Release tags are created +by maintainers after exact-source checks; previews use `YEAR.RELEASE.FIX-preview.N`. + +Report security issues privately using [SECURITY.md](SECURITY.md). Community +participation follows [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). diff --git a/DCO b/DCO new file mode 100644 index 0000000..49b8cb0 --- /dev/null +++ b/DCO @@ -0,0 +1,34 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/HANDOFF.md b/HANDOFF.md index 0a2b259..01f495b 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -29,19 +29,16 @@ run `./tests/results/demos/tendui-demo -open` on a host with browser access. ## Release boundary -The historical pre-rename v2026.1.0 candidate at `2f622c95fbf7` passed the six native Go/OS jobs, -the vulnerability scan, and 53 browser checks in Chromium, Firefox and WebKit. -One WebKit forced-color emulation check is explicitly unsupported/skipped. -The documentation website passed all eight desktop/mobile browser checks and -its native/container workflow. See [release verification](docs/release-verification.md) -for exact runs, tag installation evidence and the scope of accessibility review. -Manual screen-reader and physical-device testing remain application-level work; -automated accessibility checks are not a conformance certification. - -Keep focused local test evidence under ignored `tests/results/`. Reuse one -review binary, remove completed disposable build environments, and preserve -active work. Fetch and integrate GitHub `main` before publishing changes. - -The TendUI rename and shared SiteHeader are development changes after that tag. -See [migration notes](docs/tendui-migration.md); historical release evidence is -not validation of these changes. +The current renamed preview is `v2026.2.0-preview.1`. Install that explicit tag; +see [release notes](docs/releases/2026.2.0-preview.1.md) and +[quickstarts](docs/quickstart.md). +Historical pre-rename tags and evidence remain immutable and are clearly labeled. + +Require passing native Go/OS, security and browser CI on the preview source. +The release workflow must also prove installation from the published Git tag, +separately from the local file-proxy packaging check. Automated accessibility +checks do not constitute a screen-reader or physical-device conformance review. + +Keep focused evidence under ignored `tests/results/`; fetch and integrate +GitHub `main` before publishing. Private infrastructure references remain in +older library history, so review publication separately before changing visibility. diff --git a/README.md b/README.md index aa747c3..7faab62 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,12 @@ runtime. The asset package imports only the standard library; the components have one direct Go dependency, templ. It is not a literally dependency-free module, and this version does not support Go 1.21. -The renamed TendUI module is currently available from the development branch: +Install the pinned TendUI preview (API changes remain possible before a stable release): ```sh -go get github.com/Tend-Stack/TendUI/v2026@main +go get github.com/Tend-Stack/TendUI/v2026@v2026.2.0-preview.1 ``` -The GitHub repository is currently private. Until that changes, Go downloads -require repository credentials and `GOPRIVATE=github.com/Tend-Stack/TendUI`. Generated `*_templ.go` files ship with the module, so consumers do not need the templ CLI to use these components from Go. @@ -70,6 +68,10 @@ func main() { } ``` +For a complete, tested Go/templ application, see [the quickstart](docs/quickstart.md) +and [`examples/quickstart`](examples/quickstart). To use CSS with any stack, see +[the plain HTML example](examples/html); Go and templ are optional for that path. + Run the local demos, including a component playground, form lab, dashboard, appearance editor, workspace, native interactions, inline editing, motion and surfaces, and theme endpoint: @@ -521,20 +523,20 @@ The checked-in declaration baseline catches changed props, constants, signatures and method sets. See [API review and migration](docs/api-compatibility.md) for intentional updates and the limits of this check. -The [CI matrix](docs/ci.md) passed native verification on Linux, macOS and -Windows with Go 1.26.0 and 1.27.3, together with the vulnerability scan, at the -v2026.1.0 release commit. Chromium, Firefox and WebKit passed 53 browser checks; -one unsupported WebKit forced-color emulation check was skipped. See -[release verification](docs/release-verification.md) for exact evidence and limits. +The [CI matrix](docs/ci.md) checks native Linux, macOS and Windows with Go 1.26.0 +and 1.27.3, plus a vulnerability scan. Browser checks cover Chromium, Firefox and +WebKit. These jobs must pass on the preview source; see +[preview release notes](docs/releases/2026.2.0-preview.1.md). The older +[release verification](docs/release-verification.md) documents the pre-rename +release only and is not evidence for the current preview. -Versions follow `YEAR.RELEASE.FIX` (initial line: `2026.1.0`). Development builds -embed the Git development identifier; uncommitted work is marked dirty. +Versions follow `YEAR.RELEASE.FIX`, with SemVer prerelease suffixes for previews: +`v2026.2.0-preview.1`. Install the explicit tag; a preview is not a stable API promise. +Development builds use `git describe --tags --long --dirty`. Go treats 2026 as the semantic major version, so the module path ends in -`/v2026`. This is required for the `v2026.1.0` tag to resolve correctly. -A new annual line such as 2027 will need `/v2027` and consumer import updates; -fixes on the 2026 line keep `/v2026`. See Go's -[major version rules](https://go.dev/doc/modules/major-version). +`/v2026`. A new annual line such as 2027 will need `/v2027` and consumer import +updates. Fixes and previews on the 2026 line retain `/v2026`. ## Project links @@ -547,3 +549,9 @@ current development entry points and remaining release checks. ## License MIT. See [LICENSE](LICENSE). + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, review and MIT + DCO sign-off. +Report vulnerabilities privately using [SECURITY.md](SECURITY.md); community +participation follows [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). diff --git a/ROADMAP.md b/ROADMAP.md index 268c79f..2d914e6 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -28,7 +28,7 @@ inline editing with native fallback; short CSS motion; card surfaces; loading, empty and metric states; reusable DataTable with native selection review; page tabs, step indicators and grouped disclosures; composable fields/input addons; a native three-step form with final revalidation; and a searchable catalog -covering all 36 public templ components with compiled/downloadable recipes. +covering all 37 public templ components with compiled/downloadable recipes. The Icon component includes 24 original inline SVG drawings and optional button/link adornments with explicit accessible naming for icon-only actions. A bounded CSV upload preview exercises native multipart forms and Go validation @@ -41,11 +41,11 @@ generated-source reproducibility and independent catalog recipe compilation. It records rendering/HTTP benchmarks and enforces CSS/demo size budgets, with Git version stamping and checked atomic replacement of the review executable. See docs/development.md and docs/performance.md for current evidence and limits. -A compiler-resolved public API baseline now guards 242 declarations/method-set +A compiler-resolved public API baseline now guards 246 declarations/method-set entries across the three public packages. It flags additions and changes for review without claiming semantic compatibility; docs/api-compatibility.md defines the update and migration process. -A six-job GitHub verification matrix is prepared for Go 1.26.0/1.27.3 on Linux, +A six-job GitHub verification matrix is configured for Go 1.26.0/1.27.3 on Linux, macOS and Windows. Local native Linux checks pass on both Go versions, including the minimum compiler's API, consumer installation and executable smoke checks. Foreign-target builds pass; GitHub runs the native matrix for pushed source. @@ -67,10 +67,11 @@ Expanded asset HTTP coverage verifies content-derived ETags, stale validators, HEAD, single/multipart ranges and concurrent readers. docs/assets.md records the stable-URL cache contract and distinguishes in-process checks from live delivery. -The first release baseline now has a complete documentation website, shared +The current preview has a complete documentation website, shared component catalog, examples and playground, plus passing native, security and browser verification. See [release verification](docs/release-verification.md) -for exact commits, runs, published-tag installation and remaining coverage limits. +for historical pre-rename evidence. Current preview details are in +[preview release notes](docs/releases/2026.2.0-preview.1.md). The development tracks below describe continuing product work beyond this baseline. ## Next development tracks @@ -97,8 +98,8 @@ The development tracks below describe continuing product work beyond this baseli also in place. Next: release-specific migration guidance and broader consumer compatibility evidence. Keep demos runnable from one binary. 5. **Evidence and release.** Local benchmarks, asset/binary size budgets and - generated-source consistency checks are implemented. Next: browser matrix - and visual regression baselines; keyboard/screen-reader/contrast checks; + generated-source consistency checks are implemented. The browser matrix is implemented. Next: stable visual regression baselines + and manual screen-reader/device checks; passing GitHub CI at the release SHA; versioned release documentation and installation proof. Table allocation profiling and the first optimization are complete; profile representative application work diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e394653 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security policy + +Email **security@tendstack.com** privately with suspected vulnerabilities. Include +version/commit, affected component, a minimal reproduction and the likely impact. +Do not open a public issue, attach production credentials or include real user data. +We will coordinate disclosure and a fix with the reporter; no response-time SLA +is promised during preview. Sanitized examples are preferable to sensitive logs. + +Security fixes currently target the latest TendUI preview. Historical pre-rename +versions are not an actively supported security line. Applications remain +responsible for authentication, request protection and their Go dependencies. + +If GitHub private vulnerability reporting is enabled for the repository, its +“Report a vulnerability” form is also an appropriate private channel. diff --git a/api/public.json b/api/public.json index da8eccc..229368c 100644 --- a/api/public.json +++ b/api/public.json @@ -5,7 +5,7 @@ "AssetHandler": "func github.com/Tend-Stack/TendUI/v2026.AssetHandler() net/http.Handler", "AssetPath": "const github.com/Tend-Stack/TendUI/v2026.AssetPath untyped string = \"/tendui/static/\"", "StylesheetURL": "const github.com/Tend-Stack/TendUI/v2026.StylesheetURL untyped string = \"/tendui/static/tendui.css\"", - "Version": "const github.com/Tend-Stack/TendUI/v2026.Version untyped string = \"2026.1.0\"" + "Version": "const github.com/Tend-Stack/TendUI/v2026.Version untyped string = \"2026.2.0-preview.1\"" }, "github.com/Tend-Stack/TendUI/v2026/components": { "(*Appearance).Attributes": "func() github.com/a-h/templ.Attributes", diff --git a/cmd/tendui-dev/consumer.go b/cmd/tendui-dev/consumer.go index 08a2a78..a9a19f1 100644 --- a/cmd/tendui-dev/consumer.go +++ b/cmd/tendui-dev/consumer.go @@ -142,6 +142,19 @@ func (r runner) consumerFixture() (proof map[string]any, resultErr error) { filepath.Join(consumer, "go.sum"): sums, filepath.Join(consumer, "consumer_test.go"): []byte(consumerTestSource), } + // Build the documented onboarding application outside the library module, + // using only the installed version and checked-in generated Go. + quickstart := filepath.Join(consumer, "quickstart") + if err := os.MkdirAll(quickstart, 0755); err != nil { + return nil, err + } + for _, name := range []string{"main.go", "page.templ", "page_templ.go", "main_test.go"} { + contents, err := os.ReadFile(filepath.Join(r.root, "examples/quickstart", name)) + if err != nil { + return nil, err + } + files[filepath.Join(quickstart, name)] = contents + } for path, contents := range files { if err := os.WriteFile(path, contents, 0644); err != nil { return nil, err @@ -211,7 +224,7 @@ func (r runner) consumerFixture() (proof map[string]any, resultErr error) { "module": installed.Path, "version": installed.Version, "module_sum": installed.Sum, "archive_sha256": fmt.Sprintf("%x", sha256.Sum256(zip)), "archive_bytes": len(zip), "source_revision": revision, "replace_used": false, "templ_generator_used": false, - "local_file_proxy": true, "published_install_test": false, "isolated_fixture_removed": true, + "quickstart_tested": true, "local_file_proxy": true, "published_install_test": false, "isolated_fixture_removed": true, }, nil } diff --git a/docs/accessibility.md b/docs/accessibility.md index f3eb900..32f528e 100644 --- a/docs/accessibility.md +++ b/docs/accessibility.md @@ -94,7 +94,7 @@ or render test proves neither keyboard behavior nor screen-reader output. The local sandbox cannot launch browsers or bind a TCP socket, so the release suite runs real Chromium, Firefox and WebKit engines in GitHub Actions. It passed 53 checks, including optional HTMX execution; one unsupported WebKit forced-color -emulation check is skipped. Automated axe rules cover all 36 component pages in +emulation check is skipped. Automated axe rules cover all 37 component pages in both themes. Keyboard, native overlays, narrow layouts, reduced motion and print have focused coverage. See [release verification](release-verification.md). The broader consumer matrix above, especially screen-reader output, zoom and diff --git a/docs/browser-checks.md b/docs/browser-checks.md index d83372e..2965aae 100644 --- a/docs/browser-checks.md +++ b/docs/browser-checks.md @@ -4,7 +4,7 @@ consumer fixture. It exercises native forms with JavaScript disabled, keyboard popover/dialog behavior, catalog search and downloads, profile validation, theme persistence, mobile layouts, reduced motion, print, and forced colors -where the browser supports emulation. Axe checks all 36 component detail pages +where the browser supports emulation. Axe checks all 37 component detail pages in light and dark modes. Test failures are not retried or silently excluded. A separate test-only consumer loads pinned HTMX 2.0.11 with default diff --git a/docs/development.md b/docs/development.md index 39481ee..9a78257 100644 --- a/docs/development.md +++ b/docs/development.md @@ -97,7 +97,7 @@ check executes the binary locally, so this command is not a cross-build helper. Versions use year-based tags, such as `v2026.1.0`. With an appropriate tag, the build embeds `git describe --tags --long --dirty`. Before the first release tag, -it uses `2026.1.0-dev-g`. Untracked files also add `-dirty`. Malformed +it uses `-dev-g` (for example, `2026.2.0-preview.1-dev-g`). Untracked files also add `-dirty`. Malformed release identifiers are rejected. The command creates no tags or commits and publishes nothing. diff --git a/docs/quickstart.md b/docs/quickstart.md new file mode 100644 index 0000000..08218ba --- /dev/null +++ b/docs/quickstart.md @@ -0,0 +1,103 @@ +# Start with TendUI + +Choose Go/templ for typed components and embedded assets, or plain HTML for a +stylesheet that works with any stack. Neither path requires Node.js or npm. + +## Go and templ + +Use Go 1.26 or newer. + +```sh +mkdir my-tendui-app +cd my-tendui-app +go mod init example.com/my-tendui-app +go get github.com/Tend-Stack/TendUI/v2026@v2026.2.0-preview.1 +go install github.com/a-h/templ/cmd/templ@v0.3.1100 +``` + +Save `page.templ`: + +```templ +package main + +import "github.com/Tend-Stack/TendUI/v2026/components" + +templ page() { + @components.Layout(components.LayoutProps{ + Title: "My TendUI app", + Language: "en", + Theme: components.ThemeSystem, + }, body()) +} + +templ body() { +
+

Hello, TendUI.

+ @components.Card(components.CardProps{}) { +

This page and its stylesheet ship in one Go binary.

+
+ What does the browser need? +

Just HTML and CSS. This disclosure works without JavaScript.

+
+ } +
+} +``` + +Save `main.go`: + +```go +// A complete TendUI application. The generated page and CSS ship in its binary. +package main + +import ( + "log" + "net/http" + "time" + + "github.com/Tend-Stack/TendUI/v2026" + "github.com/a-h/templ" +) + +func handler() http.Handler { + mux := http.NewServeMux() + mux.Handle(tendui.AssetPath, tendui.AssetHandler()) + mux.Handle("GET /{$}", templ.Handler(page())) + return mux +} + +func main() { + server := &http.Server{ + Addr: "127.0.0.1:8080", Handler: handler(), + ReadHeaderTimeout: 5 * time.Second, + } + log.Fatal(server.ListenAndServe()) +} +``` + +```sh +templ generate +go run . +``` + +Open . If `templ` is not on your PATH, run the executable +in `$(go env GOPATH)/bin/templ` instead. The generator is only needed when +writing or changing your own `.templ` files. The library ships its generated Go. + +Build with `go build -o my-tendui-app .`. The binary contains your rendered-page +code and TendUI's stylesheet through `//go:embed`. Deploy the executable; no +runtime asset directory is needed. Add application-specific routing, storage, +request protection and production server configuration as required. + +From this repository, `go run ./examples/quickstart` runs the same checked-in +example without installing a generator. Its HTTP test verifies the page and +embedded stylesheet; the consumer packaging check builds it in a separate module. + +## Plain HTML and CSS + +Use [examples/html](../examples/html). Copy its `index.html` and +`static/tendui.css` into one folder, then open `index.html`. This works without +Go, templ, JavaScript, or a build tool. It also works on any static web host. + +Change `data-theme="light"` to `dark`, or omit it to follow system preferences. +Keep any optional HTMX runtime and application behavior under your own control. diff --git a/docs/releases/2026.2.0-preview.1.md b/docs/releases/2026.2.0-preview.1.md new file mode 100644 index 0000000..2aceeb3 --- /dev/null +++ b/docs/releases/2026.2.0-preview.1.md @@ -0,0 +1,37 @@ +# TendUI 2026.2.0-preview.1 + +This is the first tagged preview under the TendUI module name, not a stable API +commitment. It introduces the renamed module and shared SiteHeader after the +historical pre-rename release. Old tags are not moved or rewritten. + +```sh +go get github.com/Tend-Stack/TendUI/v2026@v2026.2.0-preview.1 +``` + +## Included + +- 37 templ components, 24 inline SVG icons, semantic CSS and 13 demo areas. +- Styles embedded in Go binaries; standalone CSS works with any HTML stack. +- Shared responsive header, configurable appearance, native workflows and bounded CSS motion. +- Complete Go/templ and plain HTML quickstarts; see [onboarding](../quickstart.md). +- Go 1.26 minimum, templ v0.3.1100 runtime, no Node/npm or bundled browser JavaScript. + +## Verification and limits + +Before tagging, require the native Go/OS matrix, security scan, browser suite, +generated-source check, recipe compilation and isolated consumer packaging proof. +The consumer check also compiles and tests the onboarding example outside the +library module. After tagging, verify installation from GitHub at the exact tag. +Record the exact commits and CI links in the GitHub prerelease notes. + +Automated browser checks include keyboard, reduced motion and accessibility +rules; manual screen-reader and physical-device testing remain outstanding. +One WebKit forced-color emulation case is unsupported and skipped. + +The privacy review found no Gitleaks credential matches in reachable history. +Older library documentation still contains private infrastructure references. +Review or remediate that history before making the repository public. This +preview release does not change visibility or rewrite history. + +See [migration notes](../tendui-migration.md) for import, stylesheet, CSS token +and preference-cookie changes. Previous release reports are historical only. diff --git a/docs/tendui-migration.md b/docs/tendui-migration.md index cd8df2d..5daa882 100644 --- a/docs/tendui-migration.md +++ b/docs/tendui-migration.md @@ -1,8 +1,13 @@ # Moving to TendUI -TendUI is the new name of this library. The renamed module is available on -`main`; historical `v2026.1.0` tags retain their original module path and have -not been rewritten. Pin the resolved development version for reproducible builds. +TendUI is the new name of this library. Install the renamed preview explicitly: + +```sh +go get github.com/Tend-Stack/TendUI/v2026@v2026.2.0-preview.1 +``` + +The historical `v2026.1.0` tag retains its original module path and is not a +TendUI installation target. It has not been rewritten. Update Go imports to `github.com/Tend-Stack/TendUI/v2026` and the root package identifier to `tendui`. Regenerate your own templ files after changing imports. diff --git a/examples/html/README.md b/examples/html/README.md new file mode 100644 index 0000000..bb4241e --- /dev/null +++ b/examples/html/README.md @@ -0,0 +1,22 @@ +# Plain HTML quickstart + +The CSS works with static HTML and any server or template engine. No Go, templ, +Node.js, npm or JavaScript runtime is required. + +From a checkout of `v2026.2.0-preview.1`, copy these two files into a new folder: + +```sh +mkdir my-tendui-page +cp examples/html/index.html static/tendui.css my-tendui-page/ +``` + +Open `my-tendui-page/index.html` in your browser. No server or build step is needed. +Try the text field and disclosure. Change the root `data-theme="light"` to +`data-theme="dark"`; omit the attribute to follow the system preference. + +Deploy those two files together using any static web server. Keep the relative +stylesheet link, or change it to your application's asset path. Forms, storage, +authentication and any optional HTMX runtime belong to your application. + +The stylesheet is from the same immutable preview tag as the HTML. MIT license: +retain the copyright and permission notice when redistributing the library. diff --git a/examples/html/index.html b/examples/html/index.html new file mode 100644 index 0000000..1255c9b --- /dev/null +++ b/examples/html/index.html @@ -0,0 +1,27 @@ + + + + + + + TendUI with plain HTML + + + +
+

Hello, semantic HTML.

+

No Go runtime, templ generator, Node.js, or JavaScript is needed for this page.

+
+

A card is an article

+

The stylesheet gives ordinary HTML a consistent appearance.

+ + +
+ Does this work without JavaScript? +

Yes. The browser opens this disclosure using native HTML.

+
+ +
+
+ + diff --git a/examples/quickstart/main.go b/examples/quickstart/main.go new file mode 100644 index 0000000..07a0213 --- /dev/null +++ b/examples/quickstart/main.go @@ -0,0 +1,26 @@ +// A complete TendUI application. The generated page and CSS ship in its binary. +package main + +import ( + "log" + "net/http" + "time" + + "github.com/Tend-Stack/TendUI/v2026" + "github.com/a-h/templ" +) + +func handler() http.Handler { + mux := http.NewServeMux() + mux.Handle(tendui.AssetPath, tendui.AssetHandler()) + mux.Handle("GET /{$}", templ.Handler(page())) + return mux +} + +func main() { + server := &http.Server{ + Addr: "127.0.0.1:8080", Handler: handler(), + ReadHeaderTimeout: 5 * time.Second, + } + log.Fatal(server.ListenAndServe()) +} diff --git a/examples/quickstart/main_test.go b/examples/quickstart/main_test.go new file mode 100644 index 0000000..909448f --- /dev/null +++ b/examples/quickstart/main_test.go @@ -0,0 +1,34 @@ +package main + +import ( + "net/http/httptest" + "strings" + "testing" + + "github.com/Tend-Stack/TendUI/v2026" +) + +func TestQuickstartServesPageAndEmbeddedCSS(t *testing.T) { + h := handler() + for _, tc := range []struct{ path, contentType, text string }{ + {"/", "text/html", "Hello, TendUI."}, + {tendui.StylesheetURL, "text/css", "--tendui-primary"}, + } { + w := httptest.NewRecorder() + h.ServeHTTP(w, httptest.NewRequest("GET", tc.path, nil)) + if w.Code != 200 || !strings.HasPrefix(w.Header().Get("Content-Type"), tc.contentType) || !strings.Contains(w.Body.String(), tc.text) { + t.Fatalf("%s: unexpected quickstart response: %d", tc.path, w.Code) + } + if strings.Contains(w.Body.String(), " +

Hello, TendUI.

+ @components.Card(components.CardProps{}) { +

This page and its stylesheet ship in one Go binary.

+
+ What does the browser need? +

Just HTML and CSS. This disclosure works without JavaScript.

+
+ } + +} diff --git a/examples/quickstart/page_templ.go b/examples/quickstart/page_templ.go new file mode 100644 index 0000000..af7d003 --- /dev/null +++ b/examples/quickstart/page_templ.go @@ -0,0 +1,94 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.3.1100 + +package main + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import "github.com/Tend-Stack/TendUI/v2026/components" + +func page() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = components.Layout(components.LayoutProps{ + Title: "My TendUI app", + Language: "en", + Theme: components.ThemeSystem, + }, body()).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +func body() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "

Hello, TendUI.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

This page and its stylesheet ship in one Go binary.

What does the browser need?

Just HTML and CSS. This disclosure works without JavaScript.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) + templ_7745c5c3_Err = components.Card(components.CardProps{}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/tendui.go b/tendui.go index 7e4a2e4..4cf31e0 100644 --- a/tendui.go +++ b/tendui.go @@ -16,7 +16,7 @@ const ( // StylesheetURL is the stylesheet used by components.Layout. StylesheetURL = AssetPath + "tendui.css" // Version identifies the current release line; development binaries should use git describe. - Version = "2026.1.0" + Version = "2026.2.0-preview.1" ) //go:embed static diff --git a/tests/browser/fixture/main.go b/tests/browser/fixture/main.go index aa2cf84..6e351a8 100644 --- a/tests/browser/fixture/main.go +++ b/tests/browser/fixture/main.go @@ -18,6 +18,14 @@ func main() { flag.Parse() demo := site.Handler() h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/__test/html/index.html" || r.URL.Path == "/__test/html/" { + http.ServeFile(w, r, "../../examples/html/index.html") + return + } + if r.URL.Path == "/__test/html/tendui.css" { + http.ServeFile(w, r, "../../static/tendui.css") + return + } if r.URL.Path == "/__test/htmx.js" { w.Header().Set("Content-Type", "text/javascript") http.ServeFile(w, r, *runtime) diff --git a/tests/browser/native.spec.js b/tests/browser/native.spec.js index 40da5b6..d441822 100644 --- a/tests/browser/native.spec.js +++ b/tests/browser/native.spec.js @@ -106,3 +106,17 @@ test('grouped menu and playground scenarios work without scripts', async ({ page await page.getByRole('button', { name: 'Send sample', exact: true }).click(); await expect(page.getByRole('status')).toContainText('Button submitted successfully'); }); + + +test('plain HTML quickstart works without JavaScript', async ({ page }) => { + await page.goto('/__test/html/index.html'); + await expect(page.getByRole('heading', { name: 'Hello, semantic HTML.' })).toBeVisible(); + await expect(page.locator('script')).toHaveCount(0); + await page.getByLabel('Try a text field').fill('A CSS-only page'); + await page.getByText('Does this work without JavaScript?', { exact: true }).click(); + await expect(page.getByText('Yes. The browser opens this disclosure using native HTML.')).toBeVisible(); + // These evaluated assertions are test instrumentation, not application scripts. + expect(await page.locator('html').evaluate(e => getComputedStyle(e).getPropertyValue('--tendui-primary').trim())).not.toBe(''); + await page.setViewportSize({ width: 390, height: 844 }); + expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1)).toBe(true); +});