From 538eee583429f96a4d90083061a214d2f8d5d8cd Mon Sep 17 00:00:00 2001 From: ZLouisMiguel Date: Wed, 18 Nov 2026 15:48:01 +0200 Subject: [PATCH] Prepare repository for stable release --- .github/ISSUE_TEMPLATE/config.yml | 3 ++ .github/workflows/ci.yml | 10 ++++- .github/workflows/release.yml | 10 ++--- CHANGELOG.md | 33 +++++++++++++++ CONTRIBUTING.md | 1 + PRIVACY.md | 24 +++++++++++ README.md | 12 ++++++ SUPPORT.md | 15 +++++++ docs/ISSUE_TRIAGE.md | 25 +++++++++++ docs/KNOWN_LIMITATIONS.md | 13 ++++++ docs/PERFORMANCE.md | 14 +++++++ docs/PRODUCT_SCOPE.md | 41 ++++++++++++++++++ docs/RELEASE_CHECKLIST.md | 70 +++++++++++++++++++++++++++++++ package.json | 3 +- scripts/performance-baseline.mjs | 62 +++++++++++++++++++++++++++ 15 files changed, 328 insertions(+), 8 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 PRIVACY.md create mode 100644 SUPPORT.md create mode 100644 docs/ISSUE_TRIAGE.md create mode 100644 docs/KNOWN_LIMITATIONS.md create mode 100644 docs/PERFORMANCE.md create mode 100644 docs/PRODUCT_SCOPE.md create mode 100644 docs/RELEASE_CHECKLIST.md create mode 100644 scripts/performance-baseline.mjs diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 59bf7f8..fffd689 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -6,3 +6,6 @@ contact_links: - name: Documentation url: https://github.com/Louis2324/WebCode#readme about: Read the project documentation before opening a support issue. + - name: Support policy + url: https://github.com/Louis2324/WebCode/blob/main/SUPPORT.md + about: Check supported versions and supported workflows. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e8e295..52c1442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: 22 cache: npm @@ -27,6 +27,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Audit production dependencies + run: npm audit --omit=dev --audit-level=high + - name: Validate package metadata shell: bash run: | @@ -42,6 +45,9 @@ jobs: - name: Run tests when available run: npm run test --if-present + - name: Check performance baseline + run: npm run perf:baseline -- --check + - name: Build an unpacked Electron bundle run: npx electron-builder --linux dir --publish never diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6201203..2d5fd08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Verify version tag shell: bash @@ -65,10 +65,10 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: 22 cache: npm @@ -99,7 +99,7 @@ jobs: done - name: Upload platform artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: webcode-${{ matrix.slug }} path: release/* @@ -115,7 +115,7 @@ jobs: steps: - name: Download platform artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: pattern: webcode-* path: release diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c6b6013 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable WebCode changes are documented here. Release candidates are marked explicitly until the stable release criteria are met. + +## [Unreleased] + +### Planned + +- Complete the stable-release QA cycle. +- Discuss the workspace architecture and feedback process before documenting them as policy. + +## [1.0.2-rc.3] - 2026-11-18 + +### Added + +- Automated CI validation and cross-platform release packaging. +- Windows x64 and ARM64, macOS x64 and ARM64, and Linux x64 and ARM64 release targets. +- Project save/load validation, recovery drafts, preview diagnostics, and basic editor tests. +- Repository contribution, security, support, privacy, scope, and release documentation. + +### Changed + +- Release artifacts are limited to packaged installers, archives, manifests, and checksums. +- Electron windows use isolated, sandboxed renderer contexts with a restricted preload bridge. + +### Known limitations + +- Release installers are unsigned. +- WebCode is currently a focused single-project web editor, not a full IDE. + +## [1.0.1] - 2025-10-23 + +- Existing baseline release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12cced6..d21e575 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,6 +62,7 @@ node --check preload.js node --check menu.js node --check dist/script.js npm test +npm run perf:baseline -- --check ``` To build a local installer, use `npm run package`. Builds are written to `release/`, which is ignored by Git. diff --git a/PRIVACY.md b/PRIVACY.md new file mode 100644 index 0000000..73c5a60 --- /dev/null +++ b/PRIVACY.md @@ -0,0 +1,24 @@ +# WebCode privacy and diagnostics + +## Current behavior + +WebCode is offline-first. The application does not currently collect analytics, telemetry, crash reports, account data, or project contents automatically. + +Project files, recovery drafts, and editor contents remain on the user's device unless the user chooses to share them. The application may open an external GitHub link when the user selects a help or project link. User-authored preview code may also make network requests because it runs as web content; those requests are controlled by the user's code, not by WebCode telemetry. + +## Local diagnostics + +Runtime messages and preview errors are displayed locally in the WebCode output panel and the normal Electron console. They are not uploaded automatically. Users should remove paths, tokens, personal data, and project contents before sharing logs in an issue. + +## Future diagnostics policy + +Any future crash reporting or analytics must be: + +- Opt-in by default for new installations. +- Documented before release. +- Minimised to the data needed for the stated purpose. +- Redacted for project contents, credentials, and personal information. +- Disabled through a clear user-facing setting. +- Covered by an updated privacy notice and retention policy. + +Until those requirements are implemented, WebCode will continue using local diagnostics only. diff --git a/README.md b/README.md index b1cb351..f8da1e1 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,18 @@ Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. Use `feat Please follow the [Code of Conduct](CODE_OF_CONDUCT.md). Security vulnerabilities should be reported privately according to [SECURITY.md](SECURITY.md). +## Project documentation + +- [Product scope and stable-release contract](docs/PRODUCT_SCOPE.md) +- [Release and manual QA checklist](docs/RELEASE_CHECKLIST.md) +- [Known limitations](docs/KNOWN_LIMITATIONS.md) +- [Performance baseline](docs/PERFORMANCE.md) +- [Privacy and diagnostics](PRIVACY.md) +- [Support policy](SUPPORT.md) +- [Issue triage](docs/ISSUE_TRIAGE.md) + +The architecture roadmap and user-feedback process are intentionally being discussed separately before they are documented as project policy. + ## License WebCode is released under the [ISC License](LICENSE). diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..cce17a9 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,15 @@ +# WebCode support policy + +## Getting help + +For usage questions, open a [Question or support issue](https://github.com/Louis2324/WebCode/issues/new?template=question.yml). For reproducible defects, use the bug report form. Search existing issues first and include the WebCode version, operating system, architecture, steps to reproduce, and relevant logs with secrets removed. + +## Supported versions + +The latest published release and the active `main` branch receive normal maintenance. Release candidates are test builds and may contain known limitations. Older releases are supported on a best-effort basis only. + +## What support cannot promise + +WebCode is an early-stage project. We cannot currently promise support for every Linux distribution, very large projects, third-party extensions, or workflows that depend on a backend server. + +Security vulnerabilities must be reported privately using [SECURITY.md](SECURITY.md), not through a public issue. diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md new file mode 100644 index 0000000..145fc86 --- /dev/null +++ b/docs/ISSUE_TRIAGE.md @@ -0,0 +1,25 @@ +# Issue triage + +Issues are triaged as time allows. The labels below keep the project queue understandable without promising a response time that the project cannot yet guarantee. + +## Labels + +- `bug`: reproducible behavior that does not match the product contract. +- `enhancement`: a proposed capability or improvement. +- `question`: usage or development support. +- `documentation`: documentation or repository-process work. +- `security`: security-sensitive work; do not include vulnerability details publicly. +- `performance`: measurable startup, preview, memory, or packaging performance work. +- `release-blocker`: prevents a release or damages a core user journey. +- `priority: high`: should be addressed before normal queue work. +- `platform: windows`, `platform: macos`, `platform: linux`: identifies affected targets. +- `triage`: needs reproduction, scope, or maintainer decision. + +## Triage rules + +1. Remove secrets and private project data from public issues. +2. Reproduce bugs on `main` or the latest release before assigning priority. +3. A release blocker must affect installation, launch, editing, preview, testing, save/load, recovery, or uninstall. +4. Security reports follow `SECURITY.md` and are not discussed in public issue comments. +5. Close duplicates, invalid reports, and issues outside the current product scope with a short explanation and a relevant link. +6. Move feature ideas into the roadmap discussion before implementation work begins. diff --git a/docs/KNOWN_LIMITATIONS.md b/docs/KNOWN_LIMITATIONS.md new file mode 100644 index 0000000..c59c4a4 --- /dev/null +++ b/docs/KNOWN_LIMITATIONS.md @@ -0,0 +1,13 @@ +# Known limitations + +These limitations are intentional or not yet addressed in the current release line. They should be reviewed before each stable release. + +- WebCode currently models one web project as three editor contents. It does not yet provide a multi-file workspace or project explorer. +- There is no integrated terminal, Git workflow, debugger, language server, package manager, or extension API. +- Projects are saved locally as `.webcode.json` files. There is no cloud backup, synchronization, or collaboration service. +- Recovery drafts are local to the application profile and are not a substitute for saving a project file. +- Preview execution is sandboxed and intentionally smaller than a full browser or development server. Features that require a server, filesystem access, or backend APIs may not behave as they do in production. +- User-authored preview code may make network requests. WebCode itself does not upload projects or send telemetry in the current release line. +- Release installers are currently unsigned. Windows SmartScreen and macOS Gatekeeper may display warnings until signing and notarization are funded and configured. +- Cross-platform artifacts are built automatically, but platform smoke testing still depends on access to representative machines. +- Large-file performance has only a baseline measurement. WebCode is aimed at small web applications, not large repositories. diff --git a/docs/PERFORMANCE.md b/docs/PERFORMANCE.md new file mode 100644 index 0000000..e3b1fc8 --- /dev/null +++ b/docs/PERFORMANCE.md @@ -0,0 +1,14 @@ +# Performance baseline + +The current baseline measures the parts that can run consistently in CI: shipped source size and the cost of normalizing a project model. It is a guardrail, not a substitute for profiling the packaged application on real devices. + +Run: + +```bash +npm run perf:baseline +npm run perf:baseline -- --check +``` + +The check fails if the project model normalization benchmark exceeds 250 ms for 10,000 operations or if the core renderer sources exceed 1 MiB combined. These limits are deliberately broad so they catch accidental regressions without pretending to be user-device measurements. + +The next performance review should add representative measurements for cold startup, time to first preview, preview reload, memory with a typical project, and large-file editing. Those measurements require a defined device matrix and will be discussed with the architecture roadmap. diff --git a/docs/PRODUCT_SCOPE.md b/docs/PRODUCT_SCOPE.md new file mode 100644 index 0000000..002a173 --- /dev/null +++ b/docs/PRODUCT_SCOPE.md @@ -0,0 +1,41 @@ +# WebCode product scope + +This document defines the first stable product contract for WebCode. It is intentionally narrower than a full IDE so reliability can be measured before new subsystems are added. + +## Product promise + +WebCode is an offline-first Electron desktop editor for learning and building small web applications with HTML, CSS, and JavaScript. A user should be able to write code, preview it, run simple checks, save a project, and reopen it later without needing a hosted service. + +## In scope for WebCode 1.0 + +- A focused HTML, CSS, and JavaScript editing workspace. +- Ace-powered editing with keyboard shortcuts. +- Sandboxed live preview in the application. +- Simple JavaScript assertions and visible test output. +- Native project save and load using `.webcode.json` files. +- Local recovery drafts and dirty-state feedback. +- Offline use after installation, except for user-requested external links and network requests made by user-authored preview code. +- Automated installers for Windows, macOS, and Linux on x64 and ARM64 where the release matrix provides an artifact. + +## Explicitly out of scope for 1.0 + +- Multi-file workspaces and a project explorer. +- Integrated terminal, Git client, debugger, language servers, or package manager. +- Extensions or third-party plugins. +- Cloud sync, accounts, collaboration, or remote storage. +- A production web hosting or deployment service. +- Automatic telemetry or crash-report uploads. + +## Release targets + +| Platform | Release target | Support policy | +| --- | --- | --- | +| Windows | x64 and ARM64; Windows 10 22H2+ and Windows 11 | Primary test platform; both architectures require smoke testing before a stable release | +| macOS | x64 and Apple Silicon; macOS 12 Monterey+ | Release target; smoke-test one Intel and one Apple Silicon environment when available | +| Linux | x64 and ARM64 AppImage/deb | Ubuntu 22.04 LTS+ is the reference environment; other distributions are best effort | + +The minimum macOS version follows the current Electron 38 dependency. If the Electron major version changes, this support statement must be reviewed before the next stable release. + +## Stable-release definition + +WebCode 1.0 is ready only when the release checklist is complete, the core user journey passes on Windows, no known release-blocking issue remains, and the published artifacts match the version and checksum manifest. Code signing is a deferred funding item and is not part of this preparation pass. diff --git a/docs/RELEASE_CHECKLIST.md b/docs/RELEASE_CHECKLIST.md new file mode 100644 index 0000000..b4aafa1 --- /dev/null +++ b/docs/RELEASE_CHECKLIST.md @@ -0,0 +1,70 @@ +# Release and manual QA checklist + +Use this checklist for every release candidate and stable release. Check items on a clean machine where possible and record failures as issues before publishing. + +## Before tagging + +- [ ] `package.json` and `package-lock.json` contain the intended version. +- [ ] `CHANGELOG.md` has an entry for the version. +- [ ] `docs/KNOWN_LIMITATIONS.md` reflects the current product. +- [ ] `npm ci` completes successfully. +- [ ] `npm audit --omit=dev --audit-level=high` passes. +- [ ] `npm test` passes. +- [ ] `npm run perf:baseline -- --check` passes. +- [ ] JavaScript syntax checks pass. +- [ ] The working tree is clean. +- [ ] The release decision and known limitations are documented in the release notes. + +## Windows acceptance test + +Record the operating system, architecture, installer filename, and result for each run. + +- [ ] Fresh install completes without a setup error. +- [ ] WebCode launches from the Start menu and its shortcut, if created. +- [ ] The application closes and relaunches cleanly. +- [ ] HTML, CSS, and JavaScript can be edited. +- [ ] Preview renders the current project. +- [ ] Preview console messages and runtime errors appear in output. +- [ ] Passing and failing test assertions are reported correctly. +- [ ] Save creates a `.webcode.json` file. +- [ ] Open restores a saved project exactly. +- [ ] Dirty state changes after editing and clears after saving. +- [ ] An interrupted session can recover its local draft. +- [ ] Invalid or corrupted project files produce a useful error. +- [ ] The installer can upgrade an existing WebCode installation. +- [ ] Uninstall removes the application and its Start menu entry. +- [ ] The unsigned build warning is documented and expected for prereleases. + +## macOS and Linux smoke test + +- [ ] The application launches from the packaged artifact. +- [ ] Editors, preview, tests, save, and load work. +- [ ] The application closes without a visible crash. +- [ ] The expected installer or package opens on the target architecture. +- [ ] The release notes identify any platform-specific limitation. + +## Publish and verify + +- [ ] Create an annotated tag matching the package version, for example `v1.0.2-rc.3`. +- [ ] Push the tag to GitHub. +- [ ] Confirm the tag/version check passes. +- [ ] Confirm Windows x64 and ARM64 builds pass. +- [ ] Confirm macOS x64 and ARM64 builds pass. +- [ ] Confirm Linux x64 and ARM64 builds pass. +- [ ] Confirm the publish job passes. +- [ ] Confirm the release is marked prerelease or latest intentionally. +- [ ] Confirm only expected installers, archives, manifests, and `SHA256SUMS.txt` are attached. +- [ ] Download at least one artifact and verify its checksum. +- [ ] Update the release notes with known limitations and test coverage. + +## Commands + +```bash +npm ci +npm test +npm run perf:baseline -- --check +node --check main.js +node --check preload.js +node --check menu.js +node --check dist/script.js +``` diff --git a/package.json b/package.json index 83a3fdc..c9c4cd0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "dev":"nodemon --exec \"npx electron . \" --ext js,html,css", "start": "electron .", "package": "electron-builder", - "test": "node --test" + "test": "node --test", + "perf:baseline": "node scripts/performance-baseline.mjs" }, "repository": { "type": "git", diff --git a/scripts/performance-baseline.mjs b/scripts/performance-baseline.mjs new file mode 100644 index 0000000..66feb2e --- /dev/null +++ b/scripts/performance-baseline.mjs @@ -0,0 +1,62 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import { performance } from "node:perf_hooks"; +import { fileURLToPath } from "node:url"; +import { createDefaultProject, normalizeProject } from "../dist/project.js"; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const measuredFiles = [ + "dist/index.html", + "dist/styles.css", + "dist/script.js", + "dist/project.js", + "main.js", + "preload.js", + "menu.js", +]; +const rendererFiles = ["dist/index.html", "dist/styles.css", "dist/script.js", "dist/project.js"]; +const operationCount = 10_000; +const limits = { + normalizeMs: 250, + rendererBytes: 1_000_000, +}; + +async function totalBytes(files) { + const entries = await Promise.all( + files.map(async (relativePath) => ({ + path: relativePath, + bytes: (await fs.stat(path.join(root, relativePath))).size, + })), + ); + return { + total: entries.reduce((sum, entry) => sum + entry.bytes, 0), + files: entries, + }; +} + +const project = createDefaultProject(); +const startedAt = performance.now(); +for (let index = 0; index < operationCount; index += 1) { + normalizeProject(project); +} +const normalizeMs = performance.now() - startedAt; +const sourceSize = await totalBytes(measuredFiles); +const rendererSize = await totalBytes(rendererFiles); +const result = { + node: process.version, + operationCount, + normalizeMs: Number(normalizeMs.toFixed(2)), + sourceBytes: sourceSize, + rendererBytes: rendererSize, + limits, + checks: { + normalize: normalizeMs <= limits.normalizeMs, + rendererSize: rendererSize.total <= limits.rendererBytes, + }, +}; + +console.log(JSON.stringify(result, null, 2)); + +if (process.argv.includes("--check") && Object.values(result.checks).some((passed) => !passed)) { + process.exitCode = 1; +}