Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6b9d00f
chore(fork): servers and the installer update from pnupu/t3code releases
pnupu Oct 29, 2026
6f36b48
ci(fork): publish self-updating releases and sync with upstream stable
pnupu Oct 29, 2026
d9d9dbd
fix(server): worktree tasks can run in another project or linked envi…
pnupu Nov 18, 2026
01fa891
feat(web): fork servers show Fork environment identification (#25)
pnupu Nov 18, 2026
cc92857
fix(ci): fork releases build on Ubuntu 24.04 to keep glibc at 2.39 (#26)
pnupu Nov 18, 2026
daaf022
fix(web): Enter on a reasoning level closes the model picker
pnupu Nov 18, 2026
efd9603
Merge pull request #27 from pnupu/t3/model-picker-enter-closes
pnupu Nov 18, 2026
61932b5
feat(web): thread details show weekly usage as activity rings
pnupu Nov 18, 2026
fcf070e
fix(web): usage rings clamp percent, trim trailing Weekly, show parti…
pnupu Nov 18, 2026
ddb0319
fix(web): usage rings use their own palette, not Apple's activity colors
pnupu Nov 18, 2026
6dd654a
fix(web): usage rings use the Usage page provider colors
pnupu Nov 18, 2026
587fd70
fix(web): Fable and Claude weekly rings get different colors
pnupu Nov 18, 2026
c876a5b
fix(web): usage ring arcs match their percent and pooled tooltips ski…
pnupu Nov 18, 2026
e910180
fix(web): small usage percents still draw a ring dot, full pools keep…
pnupu Nov 18, 2026
8f218fb
Merge pull request #28 from pnupu/ilkka/usage-rings
pnupu Nov 18, 2026
69befe5
feat(pull-requests): per-project feed rules and hidden pull requests
pnupu Nov 18, 2026
f9f78cb
fix(pull-requests): feed rules hold across environments and older ser…
pnupu Nov 18, 2026
ba998d2
fix(pull-requests): feed rules keep later pages and hide every reposi…
pnupu Nov 18, 2026
ddcb8a9
fix(mobile): hide every copy of a hidden repository by its project key
pnupu Nov 18, 2026
99cfdee
fix(pull-requests): feed rules reach every repository copy and keep u…
pnupu Nov 18, 2026
8f31832
fix(pull-requests): feed rule writes and pending hides survive failures
pnupu Nov 18, 2026
fcc380b
fix(pull-requests): one hidden-repository rule for queries and rows
pnupu Nov 18, 2026
39b523c
fix(mobile): chained hidden-list saves survive the earlier save's echo
pnupu Nov 18, 2026
50cf3dd
fix(pull-requests): hide and unhide pull requests one key at a time
pnupu Nov 18, 2026
77a0492
fix(pull-requests): hidden links keep their spelling and show at once…
pnupu Nov 18, 2026
2346908
fix(pull-requests): hidden toggle resets, mobile hides wait for setti…
pnupu Nov 18, 2026
9e8d07b
fix(pull-requests): hidden toggle and mobile hides hold through parti…
pnupu Nov 18, 2026
72cda3e
fix(mobile): feed rules judge every copy, and hides settle on the ser…
pnupu Nov 18, 2026
663b0fa
fix(mobile): answered hide targets stay answered
pnupu Nov 18, 2026
78446d4
fix(pull-requests): any copy's rule admits a pull request, and errors…
pnupu Nov 18, 2026
4064874
fix(pull-requests): only copies the user can change admit a pull request
pnupu Nov 18, 2026
b9803ad
fix(client-runtime): a copy outside the feed no longer widens a narro…
pnupu Nov 19, 2026
6af11b4
fix(web): the row menu shows and edits the feed rule that decides the…
pnupu Nov 19, 2026
d15bdd3
fix(web): the row menu reads the page's rules and writes only counted…
pnupu Nov 19, 2026
bf39a25
fix(web): the row menu writes every writable copy again
pnupu Nov 19, 2026
bcc77b3
docs(web): say that the row menu skips offline copies
pnupu Nov 19, 2026
f5ac339
fix(client): every connected copy's rule counts, and the row menu wri…
pnupu Nov 19, 2026
ab4a4a0
fix(web): a carried row outside the list's scope writes no feed rule
pnupu Nov 19, 2026
8b25a50
Merge pull request #31 from pnupu/t3/project-pr-feed-rules
pnupu Nov 19, 2026
858519c
feat(pull-requests): an Involving me feed rule shows PRs you are part of
pnupu Nov 19, 2026
8bac659
fix(pull-requests): Involving me keeps rows its listing cannot rule on
pnupu Nov 19, 2026
203d722
fix(pull-requests): Involving me rules per project and adds its rows …
pnupu Nov 19, 2026
9d05164
fix(pull-requests): Involving me rules only where the host lists invo…
pnupu Nov 19, 2026
1893f33
fix(pull-requests): Involving me keeps rows it cannot rule on per hos…
pnupu Nov 19, 2026
3e22823
refactor(pull-requests): Involving me takes a project's rows only fro…
pnupu Nov 19, 2026
720b0cf
fix(pull-requests): Involving me pages with every Load more and retri…
pnupu Nov 19, 2026
81d357e
fix(pull-requests): Involving me drops its cutoff floor and pages onl…
pnupu Nov 19, 2026
fdda035
fix(pull-requests): Involving me grows its read unless the last answe…
pnupu Nov 19, 2026
afa8c65
fix(pull-requests): Involving me pages its listings on their own cursors
pnupu Nov 19, 2026
a09e79c
fix(pull-requests): Involving me pages and retries each environment o…
pnupu Nov 19, 2026
8578a7a
refactor(pull-requests): Involving me reads one page of its listings
pnupu Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
341 changes: 341 additions & 0 deletions .github/workflows/fork-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
# Publishes pnupu/t3code releases that the desktop app, `t3 update`, and the
# background service install from (see FORK.md). Upstream's release.yml needs
# pingdotgg infrastructure, so this file stays fork-only and never conflicts.
name: Fork release

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: fork-release
cancel-in-progress: false

permissions:
contents: read

env:
UPSTREAM_URL: https://github.com/pingdotgg/t3code.git

jobs:
preflight:
name: Resolve version
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: write
outputs:
skip: ${{ steps.meta.outputs.skip }}
version: ${{ steps.meta.outputs.version }}
tag: ${{ steps.meta.outputs.tag }}
base: ${{ steps.meta.outputs.base }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false

- id: meta
name: Resolve the upstream base and the next fork version
run: |
set -euo pipefail
# Fork patch = upstream patch * 1000 + fork build, so every fork release sorts
# above the previous one and stays on the stable channel.
base=""
for tag in $(git ls-remote --tags --refs "$UPSTREAM_URL" | awk '{sub("refs/tags/","",$2); print $2}' \
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V -r | head -20); do
git fetch --no-tags -q "$UPSTREAM_URL" "refs/tags/$tag:refs/upstream/$tag"
if git merge-base --is-ancestor "refs/upstream/$tag" HEAD; then base="$tag"; break; fi
done
test -n "$base" || { echo "main is not based on an upstream stable tag." >&2; exit 1; }
IFS=. read -r major minor patch <<< "${base#v}"
start=$((patch * 1000))
last=$(git tag -l "v$major.$minor.*" | sed "s/^v$major\.$minor\.//" \
| awk -v s="$start" '/^[0-9]+$/ && $1 > s && $1 < s + 1000' | sort -n | tail -1)
if [[ -n "$last" && "$(git rev-parse "v$major.$minor.$last^{commit}")" == "$(git rev-parse HEAD)" ]]; then
echo "HEAD is already released as v$major.$minor.$last."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
version="$major.$minor.$(( ${last:-$start} + 1 ))"
{
echo "skip=false"
echo "base=$base"
echo "version=$version"
echo "tag=v$version"
} >> "$GITHUB_OUTPUT"
echo "Releasing $version on upstream $base."

check:
name: Typecheck and fork tests
needs: [preflight]
if: needs.preflight.outputs.skip == 'false'
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false

- uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Typecheck
run: vp run typecheck

- name: Test what the fork changed
run: |
set -euo pipefail
base="${{ needs.preflight.outputs.base }}"
git fetch --no-tags -q "$UPSTREAM_URL" "refs/tags/$base:refs/upstream/$base"
tests=()
while IFS= read -r file; do
case "$file" in
*.browser.test.ts | *.browser.test.tsx) ;;
*.test.ts | *.test.tsx) [[ -f "$file" ]] && tests+=("$file") ;;
*.ts | *.tsx)
for candidate in "${file%.*}.test.ts" "${file%.*}.test.tsx"; do
[[ -f "$candidate" ]] && tests+=("$candidate")
done
;;
esac
done < <(git diff --name-only "refs/upstream/$base" HEAD)
if [[ ${#tests[@]} -eq 0 ]]; then
echo "No fork tests to run."
exit 0
fi
printf '%s\n' "${tests[@]}" | sort -u | xargs vp test run

build_cli:
name: Build CLI archive (linux-x64)
needs: [preflight]
if: needs.preflight.outputs.skip == 'false'
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false

# T3 Connect public identifiers, not secrets (see .env.example).
- name: Load T3 Connect public config
run: grep -E '^T3CODE_' .env.example >> "$GITHUB_ENV"

- uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: |
args:
- --filter=t3...
- --filter=@t3tools/web...
- --filter=@t3tools/scripts...

- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu

- name: Align package versions
run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"

- name: Install native build libraries
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config

- name: Build web client
run: vp run --filter @t3tools/web build

- name: Bundle server with web client
run: node apps/server/scripts/cli.ts build --verbose

- name: Build resource monitor
run: |
cargo build --locked --release \
--manifest-path native/resource-monitor/Cargo.toml \
--target x86_64-unknown-linux-gnu
mkdir -p "$RUNNER_TEMP/cli-resource-monitor/linux-x64"
cp native/resource-monitor/target/x86_64-unknown-linux-gnu/release/t3-resource-monitor \
"$RUNNER_TEMP/cli-resource-monitor/linux-x64/t3-resource-monitor"

- name: Build CLI single-executable
run: node apps/server/scripts/cli.ts build-exe --verbose

- name: Build CLI archive
run: |
node scripts/build-cli-archive.ts \
--platform linux \
--arch x64 \
--version "${{ needs.preflight.outputs.version }}" \
--resource-monitor-dir "$RUNNER_TEMP/cli-resource-monitor" \
--output-dir release-cli

- uses: actions/upload-artifact@v7
with:
name: cli-linux-x64
path: release-cli/*
if-no-files-found: error

build_desktop:
name: Build ${{ matrix.label }}
needs: [preflight]
if: needs.preflight.outputs.skip == 'false'
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- label: Linux x64
# Ubuntu 24.04 keeps glibc at GLIBC_BUILD_CEILING (scripts/linux-glibc.ts); do not use ubuntu-latest.
runner: ubuntu-24.04
platform: linux
target: AppImage
arch: x64
rust_target: x86_64-unknown-linux-gnu
- label: macOS arm64
runner: macos-latest
platform: mac
target: dmg
arch: arm64
rust_target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false

- name: Load T3 Connect public config
run: grep -E '^T3CODE_' .env.example >> "$GITHUB_ENV"

- uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: |
args:
- --filter=@t3tools/desktop...
- --filter=t3...
- --filter=@t3tools/scripts...

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust_target }}

- name: Align package versions
run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"

- name: Install Linux build libraries
if: matrix.platform == 'linux'
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config imagemagick

- name: Build desktop artifact
run: |
vp run dist:desktop:artifact \
--platform "${{ matrix.platform }}" \
--target "${{ matrix.target }}" \
--arch "${{ matrix.arch }}" \
--build-version "${{ needs.preflight.outputs.version }}" \
--verbose

- name: Collect release assets
run: |
set -euo pipefail
mkdir -p release-publish
shopt -s nullglob
for file in release/*.{dmg,zip,AppImage,deb,blockmap,yml}; do
[[ "$(basename "$file")" == builder-debug* ]] || cp "$file" release-publish/
done
if [[ "${{ matrix.platform }}" == "linux" ]] && ! compgen -G "release-publish/*.deb" >/dev/null; then
echo "Linux build did not produce a .deb." >&2
exit 1
fi

- name: Sign macOS app with the fork identity
if: matrix.platform == 'mac'
env:
MACOS_SIGNING_P12: ${{ secrets.MACOS_SIGNING_P12 }}
MACOS_SIGNING_PASSWORD: ${{ secrets.MACOS_SIGNING_PASSWORD }}
run: bash scripts/fork/resign-macos.sh release-publish

- uses: actions/upload-artifact@v7
with:
name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
path: release-publish/*
if-no-files-found: error

release:
name: Publish GitHub Release
needs: [preflight, check, build_cli, build_desktop]
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false

- uses: actions/download-artifact@v8
with:
path: release-assets
merge-multiple: true

- name: Write checksums and notes
run: |
set -euo pipefail
(cd release-assets && sha256sum t3-* > SHA256SUMS)
base="${{ needs.preflight.outputs.base }}"
git fetch --no-tags -q "$UPSTREAM_URL" "refs/tags/$base:refs/upstream/$base"
{
echo "T3 Code $base from [upstream](https://github.com/pingdotgg/t3code/releases/tag/$base) with these fork changes:"
echo
git log --no-merges --format='- %s' "refs/upstream/$base..HEAD"
} > "$RUNNER_TEMP/notes.md"

# The tag keeps this commit reachable after the next sync rebases main.
- name: Publish release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ needs.preflight.outputs.tag }}
target_commitish: ${{ github.sha }}
name: T3 Code ${{ needs.preflight.outputs.version }}
body_path: ${{ runner.temp }}/notes.md
prerelease: false
make_latest: true
files: release-assets/*
fail_on_unmatched_files: true

report:
name: Report a failed release
needs: [preflight, check, build_cli, build_desktop, release]
if: failure()
runs-on: ubuntu-24.04
permissions:
issues: write
steps:
- env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh issue create --label fork-sync \
--title "Fork release failed on $(echo "$GITHUB_SHA" | cut -c1-10)" \
--body "Machines stay on the last release. Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
40 changes: 40 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# pnupu/t3code

Upstream T3 Code stable releases plus a few fork commits. `main` is always an upstream
stable tag with the fork commits rebased on top, so it is force-pushed on every sync.

## How a release reaches the machines

1. `scripts/fork/sync.sh` rebases `main` onto the newest upstream stable tag and pushes.
A T3 Code scheduled task on serveri runs it and resolves conflicts.
2. Every push to `main` runs `.github/workflows/fork-release.yml`: typecheck, the tests
beside fork changes, a Linux x64 desktop build and CLI archive, and a macOS arm64 build
re-signed with the fork's self-signed identity. It publishes `vX.Y.(Z*1000+n)`, so
upstream `v0.1.4` becomes `0.1.4001`, `0.1.4002`, and so on.
3. The desktop app offers the release; its update button moves every connected server.

A conflict or a failed release opens a `fork-sync` issue and publishes nothing, so
machines stay on the last release.

## Installing on a new machine

Linux server (runs the background service):

```sh
curl -fsSL https://raw.githubusercontent.com/pnupu/t3code/main/scripts/install.sh | sh
```

Mac: download `T3-Code-<version>-arm64.zip` from the latest release with `curl` and unzip
it into `/Applications`. A browser download is quarantined and needs Open Anyway in
System Settings → Privacy & Security once. Later updates come through the app.

Update from the fork's desktop app or the web UI a fork server serves. app.t3.codes and
the iPhone app look for upstream versions, which fork servers cannot install.

## Adding a fork feature

- One commit per feature, with its tests beside the code, so the release checks catch a
sync that broke it.
- Put the code in new files and keep edits to busy upstream files to a line or two.
- No database migrations: upstream numbers them sequentially.
- Offer the feature upstream too; once it lands there, drop the commit.
Loading