## Problem and outcome / 问题与结果 Inviting another device, changing sources and adjusting playback should preserve the selected access and accepted settings. This update adds local QR invitations, optional translations and a video buffer setting, and repairs App discovery, source retirement, shared controls, remote-input geometry and audio reporting within the existing 2.x contracts. ## Release notes ### English This update makes invitations easier to share and playback easier to adjust, while improving App connection, source switching and everyday controls. It also adds optional interface translations and more useful audio diagnostics. - Show the current invitation as a locally generated QR code for another device to scan, preserving the selected access information. - Add optional Traditional Chinese, Japanese and Korean translations. Chinese and English remain direct choices; the third menu includes extra languages and visual mode. Missing translations use English. - Add an **Increase playback buffering** switch with an adjustable target. More buffering may reduce stalls from uneven packet arrival, at the cost of added viewing delay. Automatic remains the default. - Ignore remote-control clicks on blank space outside a zoomed or rotated video. - Check for a local Piik App once when a site opens. Automatic discovery respects local-network permission; explicit connection keeps approval under your control, and passive failures stay quiet. - Keep a pending Browser screen or camera selection when the previous Native source ends or the App disconnects. Release the old source while allowing the new selection to finish; cancellation and Stop still end the operation correctly. - Improve App-to-App connections when port mappings shift during setup. - Keep playback hints clear of sharing controls, selection indicators inside their tracks, disabled action icons visible, and numeric settings aligned with accepted values. - Use receiver audio reports for outgoing shared-sound loss statistics, and add opt-in Windows capture-progress diagnostics to help locate missing audio. Existing 2.x App/site compatibility, saved room data and invitation privacy are preserved. Update the App for Native changes. After updating a hosted Server, refresh open site pages; App-local pages use the Web UI included in the updated App package. ### 中文 本次更新让邀请分享和播放调整更方便,并改善 App 连接、切换来源及日常控件。同时增加可选界面译文和更有帮助的音频诊断。 - 将当前邀请在本地生成二维码,保留所选访问凭证,方便另一台设备扫码加入。 - 增加繁体中文、日语和韩语可选译文。中英文保留快捷入口,第三个菜单提供附加语言与纯视觉模式;缺少的译文回退英文。 - 增加 **增加播放缓冲** 开关,并可调整目标值。更多缓冲可减少数据到达不均造成的停顿,但会增加观看延迟;默认仍由系统自动决定。 - 缩放或旋转画面后,不再把画面外空白区域的点击误传给远端。 - 打开站点时检查一次本地 Piik App。自动发现遵循本地网络权限,主动连接时才由你批准访问;被动发现失败保持安静。 - 旧 Native 来源结束或 App 断开时,保留正在进行的浏览器屏幕或摄像头选择。释放旧来源后仍可完成新选择;取消或主动停止时正确收尾。 - 改善建立连接时端口映射变化情况下的 App 间连接。 - 避免播放提示遮挡分享控件,让选中指示保持在轨道内,保留禁用按钮图标,并让数值设置显示实际接受的值。 - 共享声音的发送端丢包统计改用接收方音频报告,并增加可选的 Windows 采集进度诊断,帮助定位无声发生在哪一段。 保留现有 2.x App/站点兼容性、已保存的房间数据和邀请隐私。Native 改动需要更新 App。托管 Server 更新后请刷新已打开的页面;App 本地页面使用新版 App 包内的网页。 ## Verification / 验证 - Complete frontend check: TypeScript, 110 test files / 2001 tests, Web build. Go core check: format, tests, vet and supported cross-target builds; macOS App builds require their native SDK. - QR invitations passed independent local decoding, credential/rotation checks and short-window layout. Language/visual menus and guidance passed native and forced-polyfill Browser checks. - Native preparation passed actual Pion socket adoption, VP8 SRTP and reverse SRTCP controls. Remote-input geometry and accepted numeric settings have focused regressions. - Optional buffer transitions passed real P2P and actual SFU subscriber receiver-API controls for automatic to 300 ms to automatic. The SFU control used a Browser mock upstream rather than the embedded backend; Native preview delegation has unit coverage only. - Windows diagnostics passed strict translation compilation, counter tests and stderr-to-diagnostic-ZIP verification. Physical capture, optical QR scanning and a public-network success-rate improvement are not claimed. ## Impact / 影响 Compatible 2.x update: Browser/server v24, Native control v10, capture v7 and SQLite schema 2 remain unchanged. Optional translations preserve English fallback and the independent visual preference. Playback buffer is a local viewing preference and leaves the default automatic. Existing room authority and invitation handling are preserved. The HTTP compression dependency receives a compatible patch update. Mirror preparation detects a rejected missing tag before original-artifact downloads; the platform restriction remains open, with original-package validation and continuation rules intact. This does not establish fixes for #499, #502, #529 or #534.
188 lines
12 KiB
Markdown
188 lines
12 KiB
Markdown
# GitHub Repository And Releases
|
|
|
|
[Versioning](../standards/versioning.md) owns release meaning and compatibility;
|
|
[CONTRIBUTING](../../CONTRIBUTING.md) owns review and local validation. This file
|
|
owns the one-time GitHub settings. The source repository is public; automatic
|
|
package publication has its own activation gate below.
|
|
|
|
## Main And Pull Requests
|
|
|
|
Use squash merging only, with the PR title and body as the squash commit. These
|
|
repository settings are applied. Keep automatic branch deletion off: the normal
|
|
cleanup step checks local worktrees and remaining references first.
|
|
|
|
Protect `main` with PRs required, zero mandatory peer approvals for the solo
|
|
maintainer, administrator enforcement, linear history, and no force pushes or
|
|
deletions. PRs run the read-only release-note check; ordinary branch pushes stay
|
|
quiet. Local validation and acceptance precede the squash merge, and required
|
|
check settings remain a repository-owner decision. PR/issue
|
|
templates live in `.github/`; [naming](../../CONTRIBUTING.md#commit-pr-and-branch-names)
|
|
is shared with automatic version selection.
|
|
|
|
These protections are active, including conversation resolution. GitHub Pages
|
|
uses the **GitHub Actions** publishing source and the `piik.tv` custom domain;
|
|
the repository homepage points to `https://piik.tv`. The dedicated Website
|
|
workflow publishes the static site under [website operations](./website.md).
|
|
|
|
## Enable Automatic Publication Once
|
|
|
|
Before enabling, accept the release packages, compatibility baseline, public
|
|
copy and repository visibility; finish main protection. Then set repository
|
|
Actions variable `PIIK_RELEASES_ENABLED` to `true`. This is a repository setting,
|
|
not an environment variable for Piik App or Server.
|
|
|
|
Subsequent accepted PRs merged to main use the existing CI workflow. Product
|
|
changes calculate one version, validate, package Server and all App targets,
|
|
and publish the same artifacts. Standalone website/docs changes validate without
|
|
packaging or releasing; [versioning](../standards/versioning.md#automatic-publication)
|
|
owns that boundary. Runs queue rather than overlap or cancel one another. PRs
|
|
validate release notes without packaging or publication; manual `app_checks`
|
|
dispatch remains available for candidates.
|
|
Writing a new version back to main is unnecessary and prohibited.
|
|
|
|
For a complete package rehearsal, dispatch with `app_checks: true` and an
|
|
explicit `candidate_version` such as `v1.0.0`. This builds genuine Server and
|
|
native App artifacts under one revision and version without tagging or
|
|
publishing. Prepare its [release-note section](../standards/versioning.md#release-notes)
|
|
in the candidate PR and review that rendered body; branch checkpoints need no
|
|
release copy. The publishing run generates the final notes from accepted squash
|
|
commits. To preview that aggregate locally after integration, run
|
|
`node scripts/release-notes.mjs VERSION FULL_SOURCE_SHA` from the checkout with
|
|
full history and tags. Download the candidate run's artifacts and pass their
|
|
directory, version and full revision to `scripts/publish-release.mjs --dry-run`
|
|
(put the flag after the three positional arguments). This validates package
|
|
identity and checksums without publishing or aggregating branch commit messages.
|
|
An omitted candidate version keeps the usual development/exact-tag identity.
|
|
|
|
Enable GitHub's built-in release immutability for formal publication where
|
|
available. Upload all assets to the draft before publishing. A failed upload can
|
|
resume its same-source draft; a published version is never clobbered. If its
|
|
files are wrong or incomplete, publish a corrected new version. An older retry
|
|
must not replace a newer release's `latest` designation.
|
|
|
|
To stop future automatic publication, remove/set false the activation variable;
|
|
this does not alter existing releases or a currently running workflow. Inspect
|
|
the active run separately. No pipeline step changes visibility or installs an
|
|
update into a running Piik deployment.
|
|
|
|
For accepted contribution PRs that should merge without a release, set
|
|
`PIIK_RELEASES_ENABLED=false` before merging and confirm no active publishing
|
|
run will release the changes. Keep it false through subsequent merges until
|
|
the next release is authorized. Then restore `true` before that release's
|
|
integration merge. The existing release planner and notes collector include
|
|
all eligible changes since the last stable tag; no separate contribution
|
|
release or version-record commit is needed.
|
|
|
|
## Container Registry
|
|
|
|
The Server image uses `ghcr.io/tntcrafthim/piik`. The publishing job authenticates
|
|
with `GITHUB_TOKEN` and `packages: write`; no additional registry secret is needed.
|
|
The image's source label links it to this repository. GitHub's
|
|
[Container registry guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)
|
|
owns the registry permission and visibility behavior.
|
|
|
|
At first publication, set the Piik container package's visibility to **public**
|
|
in its GitHub package settings; repository visibility alone does not do this.
|
|
Verify both its version tag and `latest` with an anonymous pull before announcing
|
|
the Docker download. Keep repository Actions access enabled for later releases.
|
|
Image checks, version identity and retries follow
|
|
[container distribution](../standards/versioning.md#container-distribution).
|
|
|
|
## AtomGit Download Mirror
|
|
|
|
[AtomGit TNTcraftHIM/Piik](https://atomgit.com/TNTcraftHIM/Piik) is the public
|
|
download mirror. GitHub owns development, issues, source identity and original packages.
|
|
The **AtomGit mirror** GitHub workflow copies published binary assets. Repository
|
|
synchronization is intended to remain independent of package distribution; the
|
|
Pull-mirror tag restriction below remains an unresolved platform dependency. A mirror's
|
|
local Release tag only locates attachments; the GitHub source marker and verified
|
|
original package digests establish their identity. Before downloading original
|
|
artifacts, publication prepares the prerelease using the mirror's initialized
|
|
default branch when the local tag does not exist. A rejected missing tag fails
|
|
this step. Pure readiness checks remain read-only.
|
|
Its repository Actions secret is `ATOMGIT_TOKEN`. Never put this token in source,
|
|
a remote URL or a distributed package. GitHub publication keeps its scoped token.
|
|
|
|
AtomGit's current Pull-mirror repository rejects new-tag creation with an
|
|
`image repository` error. The platform's immediate-sync action can supply that
|
|
tag, after which package publication resumes. The overwrite/force setting did
|
|
not remove this restriction; disabling synchronization or removing its association
|
|
has not been verified as a conversion to a writable repository. Keep the existing
|
|
configuration until a supported replacement is verified. A blocked publication
|
|
remains unfinished release work, not a successful deferred mirror. Provider-generated
|
|
source archives are not the canonical source linked in the mirrored release body.
|
|
|
|
After a completed main-push CI run, the workflow checks the current stable GitHub
|
|
release and finds its original publishing CI run, even when the triggering run
|
|
only updated tooling. A later failed container step does not prevent
|
|
mirroring already-published packages. It downloads the source run's complete
|
|
original Server and App artifacts and invokes `scripts/mirror-release.mjs`.
|
|
An authorized release is not complete until its mirror and managed deployments
|
|
pass their postflight checks. GitHub publication and **Website** can proceed independently,
|
|
but a failed mirror remains unfinished release work. An unfinished mirror remains a
|
|
prerelease until every package passes anonymous full-download SHA-256 validation.
|
|
This includes the original signed APK and its already-built ZIP wrapper.
|
|
|
|
Every three hours the same workflow also checks the latest GitHub release's mirror
|
|
metadata. A stable mirror with the matching source marker and complete package
|
|
inventory of uploaded attachments needs no further work; provider-generated source
|
|
archives do not count as packages. A missing or incomplete prerelease resumes
|
|
publication from original artifacts without reading mirrored commits or tags.
|
|
Completed mirrors use a sparse tools-only checkout and skip dependency installation
|
|
and artifact downloads. API failures or conflicting source identities remain failures.
|
|
|
|
When ready, recovery locates the completed main-push CI run for that exact source,
|
|
downloads its original artifacts and resumes the existing publisher. It never
|
|
builds software. The publisher verifies every package anonymously before marking
|
|
the mirror stable; the periodic metadata check reuses that completion boundary.
|
|
Expired original artifacts require retained original build output, not rebuilding
|
|
the same published version. A stable release missing packages is an explicit
|
|
integrity failure and is never silently replaced.
|
|
|
|
For recovery, rerun **AtomGit mirror** with the original publishing CI run ID:
|
|
|
|
```sh
|
|
gh workflow run atomgit-mirror.yml --repo TNTcraftHIM/Piik --ref main -f run_id=RUN_ID
|
|
```
|
|
|
|
The run ID is optional; without it, the workflow resolves the latest GitHub release.
|
|
The scheduled check is recovery support, not the release-completion gate. If a
|
|
scheduled run is delayed or an upload fails, run this recovery during the authorized
|
|
release instead of assuming a later schedule will finish it.
|
|
|
|
The source must be a completed main-push CI run matching the latest published
|
|
GitHub release. The workflow runs trusted main tooling and treats artifacts only
|
|
as data. A superseded release cannot complete a new mirror. Both publishers reject
|
|
changing published bytes; a corrected package needs a corrected new version.
|
|
|
|
For a local retry, let any active workflow finish and recover the complete original
|
|
build output, including descriptors, manifests and checksum sidecars, in one fresh
|
|
directory. Use `gh run download` for each `piik-server*` and `piik-app-*` artifact
|
|
from that publishing run, or use the retained operator output after CI expiry.
|
|
Public Release archives alone do not include all validation sidecars. Never rebuild
|
|
a published version to recover metadata. See [artifact retention](../deployment.md#build-host).
|
|
|
|
```sh
|
|
node scripts/mirror-release.mjs /path/to/original-artifacts VERSION FULL_SOURCE_SHA --dry-run
|
|
node scripts/mirror-release.mjs /path/to/original-artifacts VERSION FULL_SOURCE_SHA
|
|
```
|
|
|
|
Supply `ATOMGIT_TOKEN` only through the publisher environment. Reads retry within
|
|
a bounded deadline, including complete response bodies. Mutations are not blindly
|
|
retried: rerunning inventories existing files before uploading missing ones. Signed
|
|
upload URLs and callback headers are credentials and are never logged. A failed
|
|
upload leaves a visible failed workflow and pending prerelease.
|
|
|
|
No automatic attachment cleanup runs. Do not apply Gitee's former size/quota or
|
|
retention rules to AtomGit. This migration does not delete the old Gitee repository
|
|
or its packages. Already published software keeps its embedded old fallback until
|
|
a later software release replaces it.
|
|
|
|
## Platform References
|
|
|
|
- [Protected branch availability](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)
|
|
- [Workflow concurrency and queued runs](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-queueing-multiple-pending-runs)
|
|
- [Workflow completion triggers and trust boundaries](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run)
|
|
- [Downloading original artifacts from another run](https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories)
|
|
- [Immutable release workflow](https://docs.github.com/en/code-security/concepts/supply-chain-security/immutable-releases)
|