From 6044c3d886f6aa8019f717671ff2a1a7db879fab Mon Sep 17 00:00:00 2001 From: MotherSphere Date: Thu, 8 Oct 2026 00:53:37 +0200 Subject: [PATCH 1/2] docs: bring the docs in line with the code and ship the font licences --- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 2 +- README.md | 8 +- docs/architecture.md | 5 +- docs/colony-spec.md | 16 ++-- src/github/http.rs | 6 +- src/ui/assets/fonts/FontAwesome/OFL.txt | 96 ++++++++++++++++++++++++ src/ui/assets/fonts/OpenDyslexic/OFL.txt | 94 +++++++++++++++++++++++ src/ui/settings.rs | 2 +- 9 files changed, 214 insertions(+), 17 deletions(-) create mode 100644 src/ui/assets/fonts/FontAwesome/OFL.txt create mode 100644 src/ui/assets/fonts/OpenDyslexic/OFL.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c3b6dd..6a642ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Format run: cargo fmt --all -- --check - # --all-targets, or clippy never sees the 140 tests - the code most + # --all-targets, or clippy never sees the tests - the code most # likely to accumulate lint debt, since nobody reads it in review. - name: Clippy run: cargo clippy --all-targets -- -D warnings diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7c37a1..877222f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ git clone https://github.com/Project-Colony/Colony.git cd Colony cargo build # debug build cargo run # launch the launcher in debug mode -cargo test # run unit tests (88 tests across manifest parsing, scanning, i18n, signing, etc.) +cargo test # run the unit tests (manifest parsing, scanning, i18n, signing, etc.) cargo build --release # optimized build ``` diff --git a/README.md b/README.md index 7c50ceb..75a5a71 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Two variants maintained on the AUR. Pick **one**: | Package | Install | Notes | |---------------|------------------------------|------------------------------------------------| -| `colony-bin` | `paru -S colony-bin` | Prebuilt binary, instant install (~40 MB DL). Auto-updates at every upstream release. | +| `colony-bin` | `paru -S colony-bin` | Prebuilt binary, instant install (~30 MB DL). Auto-updates at every upstream release. | | `colony-git` | `paru -S colony-git` | Builds from HEAD, ~5 min compile, always at latest commit. Recompiles on each `paru -Syu` if upstream advanced. | Both provide a `/usr/bin/colony` binary and a `colony.desktop` entry so GNOME/KDE/rofi/wofi launchers pick it up automatically. @@ -90,13 +90,13 @@ Project Colony program, so a theme looks the same wherever you meet it: | Everforest | Material (Oceanic, Palenight, Deep Ocean) | Flexoki | Nightfox | | Sonokai | Oxocarbon | Night Owl | Iceberg | | Horizon | Mélange | Synthwave '84 | Modus (Operandi, Vivendi) | -| Stellar Blade (Eve, Tachy, Lily, Enya, Kaya) | Parchment | | | +| Stellar Blade (Eve, Tachy, Lily, Enya, Kaya; fan-made, unofficial) | Parchment | | | Each palette includes full semantic tokens: backgrounds, text layers, accents, success/warning/error states, button states, and more. ## For app developers -Want your Rust (or any) desktop app to appear in Colony's catalog? It takes a single JSON file plus a GitHub release with properly named assets. +Want your Rust (or any) desktop app to appear in Colony's catalog? It takes a single JSON file plus a GitHub release with properly named assets. Colony only scans repositories of the [Project-Colony](https://github.com/Project-Colony) GitHub organization, so the repo has to live there to be listed. **Quick version** — add `colony.json` at the root of your repo: @@ -147,3 +147,5 @@ how these move up. [GPL-3.0-or-later](LICENSE) © 2026 Project Colony contributors Colony is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +The bundled fonts keep their own license, the SIL Open Font License 1.1, with the full text next to each font in `src/ui/assets/fonts/`: [JetBrains Mono Nerd Font](src/ui/assets/fonts/JetBrainsMonoNerdFont/OFL.txt), [Font Awesome Free](src/ui/assets/fonts/FontAwesome/OFL.txt) and [OpenDyslexic](src/ui/assets/fonts/OpenDyslexic/OFL.txt). diff --git a/docs/architecture.md b/docs/architecture.md index 40c16e9..a0bffd6 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -101,7 +101,8 @@ All async operations (API calls, downloads, scanning) return a `Task` t ## GitHub API -- Per-URL ETag cache (304 Not Modified — avoids consuming rate limit) +- Per-URL ETag cache, persisted across launches (a 304 Not Modified is free + for authenticated requests; anonymous 304s still count against the quota) - Per-URL locks to prevent race conditions - Automatic pagination (`per_page=100`, loops until empty page) - Rate-limit aware (warning at <10 remaining, error at 0) @@ -118,7 +119,7 @@ All async operations (API calls, downloads, scanning) return a `Task` t ## Tests -131 unit tests covering: +Unit tests (`cargo test`) cover: - `colony.json` manifest parsing (full, minimal, with pattern, with archives) - Platform auto-detection from release assets - `release_files` construction from assets diff --git a/docs/colony-spec.md b/docs/colony-spec.md index 223dca1..6ec29c9 100644 --- a/docs/colony-spec.md +++ b/docs/colony-spec.md @@ -165,7 +165,7 @@ Colony shows a per-app icon in the grid. It is resolved, in order: 2. If `icon` is absent, a conventional **`icon.png`** at the repo root. 3. If neither exists, Colony draws a generated category tile (a tinted hexagon with the category glyph). -The icon is fetched once and cached on disk (`/repo-icons//icon.png`), decoded to an image, and rendered at a fixed ~54 px tile. +The icon is fetched once and cached on disk (`/repo-icons//icon.png`), decoded to an image, and rendered at a fixed ~54 px tile. **Format**: a square **PNG** (transparent or opaque). PNG is the only format Colony decodes — not `.ico` / `.svg` / `.icns` (those are for a platform's *own* application icon, which is separate from the Colony grid icon). A 48–128 px source works well; pixel-art icons should be authored at their native size. @@ -222,8 +222,9 @@ signing is adopted per-app, no flag day - **unless** the manifest declares: ``` With `"signed": true`, a missing signature ABORTS the install. Declare it once -every release of the app ships `.sig` assets (all Project-Colony apps have signed -releases as of 2026-07-20). Sign with: +every release of the app ships `.sig` assets. Not every Project-Colony app +signs its releases yet, so check an app's release assets rather than assuming. +Sign with: ```sh COLONY_SIGNING_KEY=/path/to/colony-release.pem \ @@ -231,9 +232,9 @@ COLONY_RELEASE_VERSION= ./scripts/sign-release.sh ``` `COLONY_RELEASE_VERSION` is required because the script also emits a signed -`.meta` sidecar binding the bytes to a version and a filename. Only the -launcher's own self-update consumes that sidecar today; for app assets the -`.sig` is what matters, and the extra files are harmless if published. +`.meta` sidecar binding the bytes to a version and a filename. The +launcher's self-update requires it, and app installs check it whenever it is +published (see below). Note the trust boundary. Signatures protect against tampered release assets (e.g. an asset swapped after publication), because forging one requires the @@ -241,7 +242,8 @@ org's private signing key, which never lives in any repository. Enforcement is implemented: `"signed": true` refuses an install with no signature, and the launcher **pins** the requirement client-side once an app has been installed with a verified signature, so flipping `signed` back to false in a compromised -repository no longer downgrades that app to unsigned. Since Colony 0.9.3 the binding gap is closed on the CLIENT side: an app asset +repository no longer downgrades that app to unsigned. Since Colony 0.10.0 the +binding gap is closed on the CLIENT side: an app asset that publishes a signed `.meta` sidecar (plus `.meta.sig`) has its bytes bound to an asset name, a digest and the resolved tag, and Colony refuses anything older than what is installed. That stops the replay of a *different* diff --git a/src/github/http.rs b/src/github/http.rs index 250387b..de074b2 100644 --- a/src/github/http.rs +++ b/src/github/http.rs @@ -77,8 +77,10 @@ fn now_secs() -> u64 { /// This used to start empty on every launch, which made a cold boot and a warm /// boot cost exactly the same: ~55 full 200s for the org catalog, against an /// anonymous budget of 60/h. Opening Colony twice within the hour rate-limited -/// the second launch. GitHub does not bill a 304, so replaying the ETags turns -/// almost the whole refresh free - it only ever needed to survive the process. +/// the second launch. GitHub does not bill a 304 on an authenticated request, so +/// replaying the ETags makes almost the whole signed-in refresh free; anonymous +/// 304s still count against the quota. The cache only ever needed to survive +/// the process. static HTTP_CACHE: std::sync::LazyLock> = std::sync::LazyLock::new(|| { Mutex::new(crate::persistence::load_http_cache_json().unwrap_or_default()) }); diff --git a/src/ui/assets/fonts/FontAwesome/OFL.txt b/src/ui/assets/fonts/FontAwesome/OFL.txt new file mode 100644 index 0000000..0167d1e --- /dev/null +++ b/src/ui/assets/fonts/FontAwesome/OFL.txt @@ -0,0 +1,96 @@ +Font Awesome Free 6.7.2 (fa-regular-400.ttf, fa-solid-900.ttf) + +Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com) +with Reserved Font Name: "Font Awesome". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/ui/assets/fonts/OpenDyslexic/OFL.txt b/src/ui/assets/fonts/OpenDyslexic/OFL.txt new file mode 100644 index 0000000..0a1d034 --- /dev/null +++ b/src/ui/assets/fonts/OpenDyslexic/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2019-07-29, Abbie Gonzalez (https://abbiecod.es|support@abbiecod.es), +with Reserved Font Name OpenDyslexic. +Copyright (c) 12/2012 - 2019 +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/ui/settings.rs b/src/ui/settings.rs index 3fda55c..ef0fb95 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -743,7 +743,7 @@ impl App { .size(self.sz(15)) .font(self.app_font()) .color(Palette::TEXT_DIM()), - text("MotherSphere/Colony") + text("Project-Colony/Colony") .size(self.sz(14)) .font(self.app_font()) .color(Palette::TEXT_MUTED()), From 9dac6662148e523afc78c48c9c0d0ca781c65408 Mon Sep 17 00:00:00 2001 From: MotherSphere Date: Thu, 8 Oct 2026 01:32:45 +0200 Subject: [PATCH 2/2] docs: say anonymous 304s still count in the catalog cache comment --- src/update/github_auth.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/update/github_auth.rs b/src/update/github_auth.rs index 66d9830..d2624c8 100644 --- a/src/update/github_auth.rs +++ b/src/update/github_auth.rs @@ -133,7 +133,8 @@ impl App { let repos = repos; // The catalog refresh is where the conditional-request cache is at its // most complete: persisting it here means the next launch replays those - // ETags as 304s, which GitHub does not bill. + // ETags as 304s, which GitHub does not bill on authenticated requests + // (anonymous 304s still count against the quota). crate::github::save_http_cache(); let count = repos.len(); if let Err(e) = crate::persistence::save_repos_cache(&repos) {