Sailfish OS Silica WebView shell for T3 Code (harbour-t3code)
  • JavaScript 52.8%
  • QML 29.5%
  • Shell 16.7%
  • Python 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Grok 99ebda3548
All checks were successful
harbour-t3code-rpm / gate (push) Successful in 1s
harbour-t3code-rpm / build-blocked (push) Has been skipped
harbour-t3code-rpm / build (push) Successful in 15s
Merge pull request 'fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0)' (#2) from fix/gecko91-compat-layer into main
Reviewed-on: #2
2026-10-05 19:12:48 +02:00
.forgejo/workflows fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) 2026-10-05 18:19:36 +02:00
docs fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) 2026-10-05 18:19:36 +02:00
harbour-t3code fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) 2026-10-05 18:19:36 +02:00
scripts fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) 2026-10-05 18:19:36 +02:00
.gitignore Initial harbour-t3code Silica WebView scaffold 2026-09-25 13:07:56 +02:00
LICENSE Initial harbour-t3code Silica WebView scaffold 2026-09-25 13:07:56 +02:00
README.md fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) 2026-10-05 18:19:36 +02:00
sdk-version.json Initial harbour-t3code Silica WebView scaffold 2026-09-25 13:07:56 +02:00

t3code-sfos

Sailfish OS harbour app: T3 Code web client for Sailfish OS: T3 Code / https://t3.codes in Sailfish.WebView, with a compatibility layer for the SFOS browser engine.

Product

App harbour-t3code
Stack Silica launcher + Sailfish.WebView 1.0 + Gecko 91 compat layer (QML/JS-only, noarch)
Default URL https://app.t3.codes (Settings → LocalStorage override)
Primary UX Open T3 Code → in-app WebView
Target SFOS 5.2.x (Gecko ESR 91) · SDK pin coderus/sailfishos-platform-sdk:5.2.0.15
Current 0.2.0 — T3 runs in-app (compat layer)

Client-only. Agents run on the T3 Code server machine (hosted app or your t3 serve / desktop remote). This phone app does not embed Electron — SFOS cannot run Electron.

Why it used to fail (0.1.x)

Reproduced on Firefox 91.13 ESR (the same Gecko as SFOS 5.2):

  1. JS: boot crashes with TypeError: Object.hasOwn is not a function (Firefox 92+) → T3 shows "T3 Code could not load". The bundle also needs Array.prototype.toSorted/findLast, structuredClone, AbortSignal.any, … Its syntax is fine for Gecko 91. Only runtime APIs are missing.
  2. CSS: Tailwind v4 puts every rule inside @layer (Firefox 97+) and uses oklch() / color-mix() (Firefox 113+). Gecko 91 drops it all, so the page is unstyled.

Fix (0.2.0)

WebViewPage loads js/t3frame.js as a WebView frame script. On every new document, before page scripts run, it evaluates js/t3compat.js, which:

  • polyfills the missing ES2022+ / Web APIs (gap-filling only);
  • re-fetches each stylesheet and lowers it: unwraps @layer (keeping layer order), converts literal oklch/lab/color-mix to rgb, and maps dvh/svh to vh;
  • resolves theme custom properties built with color-mix(var(…)) at runtime from computed values, and re-runs on theme or DOM changes.

On engines that already support @layer + color-mix (e.g. the upcoming ESR 115 update), CSS lowering is skipped automatically.

Sailfish Browser gets no compat layer, so app.t3.codes still fails there. Use the app. Details: docs/webview.md.

See also harbour-t3code/.

CI

Workflow Purpose
harbour-t3code-rpm Platform SDK mb2/rpmbuild → noarch RPM; on main publish release harbour-t3code-v0.2.0

Publish helper: scripts/publish-rpm.sh (release-assets-first, Packages type=rpm best-effort).