Skip to content

Commit c845a73

Browse files
feat(web): name the reversible sidebar project filter
2 parents 79876ee + bd7f7ea commit c845a73

498 files changed

Lines changed: 32237 additions & 8445 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Setup APT mirrors
2+
description: Configure Ubuntu package downloads with automatic mirror failover.
3+
runs:
4+
using: composite
5+
steps:
6+
- shell: bash
7+
run: |
8+
# Replace the existing Blacksmith mirror list as well as direct sources.
9+
printf '%s\tpriority:%s\n' \
10+
https://archive.ubuntu.com/ubuntu 1 \
11+
https://mirrors.edge.kernel.org/ubuntu 2 \
12+
https://mirror.math.princeton.edu/pub/ubuntu 3 \
13+
| sudo tee /etc/apt/blacksmith-ubuntu-mirrors.txt > /dev/null
14+
15+
# APT's mirror transport retries each file against the next server.
16+
sudo find /etc/apt -maxdepth 2 -type f \( -name '*.list' -o -name '*.sources' \) \
17+
-exec sed -i -E \
18+
's#https?://(([^/]+\.)?archive|security)\.ubuntu\.com/ubuntu/?#mirror+file:/etc/apt/blacksmith-ubuntu-mirrors.txt#g' {} +
19+
20+
# Move on to a fallback before an unreachable server exhausts the job.
21+
printf '%s\n' 'Acquire::http::Timeout "15";' 'Acquire::https::Timeout "15";' \
22+
| sudo tee /etc/apt/apt.conf.d/80-mirror-timeouts > /dev/null

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,22 @@ jobs:
4545
- name: Ensure Electron runtime is installed
4646
run: vp run --filter @t3tools/desktop ensure:electron
4747

48+
# Files/dependencies are repo-wide; export checks cover clean workspaces only.
49+
- name: Check unused code
50+
run: vp run knip:check
51+
4852
- name: Check
4953
run: vp check
5054

5155
- name: Typecheck
5256
run: vpr typecheck
5357

58+
- uses: ./.github/actions/setup-apt-mirrors
59+
5460
- name: Install browser secret helper build libraries
55-
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
61+
run: |
62+
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
63+
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
5664
5765
- name: Build desktop pipeline
5866
run: vp run build:desktop
@@ -88,8 +96,12 @@ jobs:
8896
- name: Ensure Electron runtime is installed
8997
run: vp run --filter @t3tools/desktop ensure:electron
9098

99+
- uses: ./.github/actions/setup-apt-mirrors
100+
91101
- name: Install browser secret helper build libraries
92-
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
102+
run: |
103+
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
104+
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
93105
94106
- name: Test
95107
run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ jobs:
216216
- name: Typecheck
217217
run: vp run typecheck
218218

219+
- uses: ./.github/actions/setup-apt-mirrors
220+
219221
- name: Install browser secret helper build libraries
220222
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
221223

@@ -519,14 +521,17 @@ jobs:
519521
$setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
520522
$proc = Start-Process -FilePath $setupExe `
521523
-ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
522-
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
524+
"Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre", "--quiet", "--norestart" `
523525
-Wait -PassThru -NoNewWindow
524526
if ($null -eq $proc -or $proc.ExitCode -ne 0) {
525527
$code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
526528
Write-Error "Visual Studio Installer failed with exit code $code"
527529
exit $code
528530
}
529531
532+
- uses: ./.github/actions/setup-apt-mirrors
533+
if: matrix.platform == 'linux'
534+
530535
- name: Install Linux desktop build libraries
531536
if: matrix.platform == 'linux'
532537
shell: bash

‎apps/desktop/src/backend/DesktopServerExposure.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ describe("DesktopServerExposure", () => {
272272
modeError,
273273
DesktopServerExposure.DesktopServerExposureModePersistenceError,
274274
);
275-
assert.isTrue(DesktopServerExposure.isDesktopServerExposureSetModeError(modeError));
276-
assert.isTrue(DesktopServerExposure.isDesktopServerExposureError(modeError));
277275
assert.equal(modeError.mode, "network-accessible");
278276
assert.strictEqual(modeError.cause, settingsFailure);
279277
assert.strictEqual(modeError.cause.cause, diskFailure);
@@ -290,7 +288,6 @@ describe("DesktopServerExposure", () => {
290288
tailscaleError,
291289
DesktopServerExposure.DesktopTailscaleServePersistenceError,
292290
);
293-
assert.isTrue(DesktopServerExposure.isDesktopServerExposureError(tailscaleError));
294291
assert.equal(tailscaleError.enabled, true);
295292
assert.equal(tailscaleError.port, 8443);
296293
assert.strictEqual(tailscaleError.cause, settingsFailure);

‎apps/desktop/src/backend/DesktopServerExposure.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,13 @@ export const DesktopServerExposureSetModeError = Schema.Union([
244244
DesktopServerExposureModePersistenceError,
245245
]);
246246
export type DesktopServerExposureSetModeError = typeof DesktopServerExposureSetModeError.Type;
247-
export const isDesktopServerExposureSetModeError = Schema.is(DesktopServerExposureSetModeError);
248247

249248
export const DesktopServerExposureError = Schema.Union([
250249
DesktopServerExposureNoNetworkAddressError,
251250
DesktopServerExposureModePersistenceError,
252251
DesktopTailscaleServePersistenceError,
253252
]);
254253
export type DesktopServerExposureError = typeof DesktopServerExposureError.Type;
255-
export const isDesktopServerExposureError = Schema.is(DesktopServerExposureError);
256254

257255
export interface DesktopServerExposureBackendConfig {
258256
readonly port: number;

‎apps/desktop/src/electron/ElectronDialog.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ describe("ElectronDialog", () => {
4343
);
4444

4545
assert.instanceOf(error, ElectronDialog.ElectronDialogPickFolderError);
46-
assert.isTrue(ElectronDialog.isElectronDialogError(error));
4746
assert.strictEqual(error.ownerWindowId, 7);
4847
assert.strictEqual(error.defaultPath, "/workspace");
4948
assert.strictEqual(error.cause, cause);

‎apps/desktop/src/electron/ElectronDialog.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export const ElectronDialogError = Schema.Union([
7373
ElectronDialogShowErrorBoxError,
7474
]);
7575
export type ElectronDialogError = typeof ElectronDialogError.Type;
76-
export const isElectronDialogError = Schema.is(ElectronDialogError);
7776

7877
export interface ElectronDialogPickFolderInput {
7978
readonly owner: Option.Option<Electron.BrowserWindow>;

‎apps/desktop/src/electron/ElectronTheme.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ describe("ElectronTheme", () => {
6464
const error = yield* Effect.flip(electronTheme.setSource("dark"));
6565

6666
assert.instanceOf(error, ElectronTheme.ElectronThemeSetSourceError);
67-
assert.isTrue(ElectronTheme.isElectronThemeSetSourceError(error));
6867
assert.strictEqual(error.source, "dark");
6968
assert.strictEqual(error.cause, cause);
7069
assert.include(error.message, "dark");

‎apps/desktop/src/electron/ElectronTheme.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export class ElectronThemeSetSourceError extends Schema.TaggedErrorClass<Electro
1919
}
2020
}
2121

22-
export const isElectronThemeSetSourceError = Schema.is(ElectronThemeSetSourceError);
23-
2422
export class ElectronTheme extends Context.Service<
2523
ElectronTheme,
2624
{

‎apps/desktop/src/electron/ElectronUpdater.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ describe("ElectronUpdater", () => {
7171
const error = yield* updater.checkForUpdates.pipe(Effect.flip);
7272

7373
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterCheckForUpdatesError);
74-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
7574
assert.equal(error.channel, "beta");
7675
assert.strictEqual(error.cause, cause);
7776
assert.equal(error.message, "Electron updater failed to check for updates on channel beta.");
@@ -89,7 +88,6 @@ describe("ElectronUpdater", () => {
8988
const error = yield* updater.downloadUpdate.pipe(Effect.flip);
9089

9190
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);
92-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
9391
assert.equal(error.channel, "nightly");
9492
assert.strictEqual(error.cause, cause);
9593
assert.equal(
@@ -126,7 +124,6 @@ describe("ElectronUpdater", () => {
126124
.pipe(Effect.flip);
127125

128126
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterQuitAndInstallError);
129-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
130127
assert.equal(error.channel, "alpha");
131128
assert.equal(error.isSilent, true);
132129
assert.equal(error.isForceRunAfter, false);

0 commit comments

Comments
 (0)