From e5e30c977cc1be3b29853f9dd55b8c3bb1dc7da3 Mon Sep 17 00:00:00 2001 From: grabowski Date: Sat, 21 Nov 2026 19:28:34 +0700 Subject: [PATCH] Lanna Desk: the app's name, for its move to lannadesk.com The header (staff pages, messages and the client link), page titles, footer, messages, the pack's cover line and the PDFs' creator now say Lanna Desk (lannadesk.com) instead of visa.buildfor.life. The company named in the client's texts and agreements stays B4L. Nothing depends on the name the app is reached under: VISA_PUBLIC_URL comes from the fleet, which moves it to https://lannadesk.com and redirects visa.buildfor.life there with the path, so links already sent keep working. README, AGENTS, PLAN and the release notes name the new address. Checks: fmt, clippy, 108 unit and 57 integration tests; the header at 360 and 390 px and on a desktop. --- .gitea/scripts/release.py | 2 +- .gitea/scripts/test_release.py | 2 +- AGENTS.md | 2 +- Cargo.toml | 2 +- README.md | 13 +++++++------ docs/PLAN.md | 11 +++++++---- src/agreements/pdf.rs | 4 ++-- src/config.rs | 2 +- src/lib.rs | 2 +- src/main.rs | 2 +- src/pack/pdf.rs | 2 +- src/papers/mod.rs | 2 +- src/session.rs | 4 ++-- src/web/auth.rs | 4 ++-- src/web/mod.rs | 2 +- src/web/pack.rs | 2 +- static/app.css | 2 +- templates/base.html | 8 ++++---- templates/client_base.html | 4 ++-- templates/message.html | 6 +++--- 20 files changed, 41 insertions(+), 37 deletions(-) diff --git a/.gitea/scripts/release.py b/.gitea/scripts/release.py index 80bf703..03a7320 100644 --- a/.gitea/scripts/release.py +++ b/.gitea/scripts/release.py @@ -230,7 +230,7 @@ def notes(tag, sha, files): ) head = f"Changes since {prev}:" if prev else "Commits in this first release:" held = ( - f"`{WEB}` holds the server `bin/visa`; cnx01 installs it as visa.buildfor.life only with " + f"`{WEB}` holds the server `bin/visa`; cnx01 installs it as lannadesk.com only with " "its signature beside it (`release/allowed-signers`)." ) return ( diff --git a/.gitea/scripts/test_release.py b/.gitea/scripts/test_release.py index 4b91ff8..15eacf8 100644 --- a/.gitea/scripts/test_release.py +++ b/.gitea/scripts/test_release.py @@ -221,7 +221,7 @@ class ReleaseTest(unittest.TestCase): self.assertIn("Commits in this first release:", rel["body"]) self.assertIn("- first commit (", rel["body"]) self.assertIn(release.hashlib.sha256(b"web").hexdigest(), rel["body"]) - self.assertIn("cnx01 installs it as visa.buildfor.life only with its signature", rel["body"]) + self.assertIn("cnx01 installs it as lannadesk.com only with its signature", rel["body"]) self.assertIn("| `visa-linux-x86_64.tar.gz.sig` | the server's signature", rel["body"]) self.assertIn("November 16, 2026", rel["body"]) self.assertNotIn("ci-run", rel["body"]) diff --git a/AGENTS.md b/AGENTS.md index a270e81..305a104 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Working on this repository (for agents and people) -visa.buildfor.life holds passport data of real people. Read this file and +Lanna Desk (lannadesk.com, the app `visa`) holds passport data of real people. Read this file and [docs/PLAN.md](docs/PLAN.md) before changing anything. ## Rules diff --git a/Cargo.toml b/Cargo.toml index 4051be9..f136bca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "visa" version = "0.1.0" edition = "2024" rust-version = "1.95" -description = "visa.buildfor.life: immigration records, deadlines and extension packs for foreigners in Thailand" +description = "Lanna Desk (lannadesk.com): immigration records, deadlines and extension packs for foreigners in Thailand" publish = false # Integration tests are one binary: tests/main.rs declares every tests/*.rs # as a module, so the suite links once. diff --git a/README.md b/README.md index c7f252a..ead4a0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# visa.buildfor.life +# Lanna Desk (lannadesk.com) -visa.buildfor.life keeps the immigration records of the foreigners that B4L +Lanna Desk, the app `visa`, keeps the immigration records of the foreigners that B4L looks after in Thailand: their passports, addresses and TM.30 receipts, visas, arrivals with the TDAC, extensions of stay, re-entry permits, 90-day reports and work permits, and the companies that employ them. From those @@ -137,7 +137,7 @@ files or systemd credentials and never from a variable's value. | Variable | Meaning | | -------------------------------- | --------------------------------------------------------------- | | `VISA_LISTEN` | address to listen on, default `127.0.0.1:8040` | -| `VISA_PUBLIC_URL` | `https://visa.buildfor.life`, for the login's redirect | +| `VISA_PUBLIC_URL` | `https://lannadesk.com`, for the login's redirect | | `VISA_DATABASE_URL` | `postgres://visa@host/visa` | | `VISA_DATABASE_PASSWORD_FILE` | the role's password; else the credential `db-password` | | `VISA_OIDC_ISSUER` | `https://id.cnx.network/oauth2/openid/visa-web` | @@ -174,7 +174,8 @@ from that directory. Since November 17, 2026 the app runs on cnx01 in the office, like proplan and lampbench-web: the database `visa` on cnx01's PostgreSQL, the documents in the bucket `visa-documents` of cnx01's Garage, backups by borg, and bkk01 -publishing https://visa.buildfor.life. Passport data stays on B4L's own +publishing https://lannadesk.com (its first name, visa.buildfor.life, +redirects there with the path). Passport data stays on B4L's own servers. The fleet's module is `modules/visa` in cnx-network-clan, with its runbook in `docs/src/visa.md` there. Only members of the Kanidm group `visa` get in; members are set in the fleet's `identity/people.nix`. @@ -193,8 +194,8 @@ fake provider, adds a person and checks the audit log on the real PostgreSQL module. Which commit runs: every page's footer names it, with a link to it, and -https://visa.buildfor.life/version answers with the full hash, without a -login, so `curl https://visa.buildfor.life/version` tells whether a release +https://lannadesk.com/version answers with the full hash, without a +login, so `curl https://lannadesk.com/version` tells whether a release is live, and `visa --version` prints the release and the commit. A Nix build takes the commit from the flake's source, CI from `VISA_COMMIT`, a build in a checkout from git. diff --git a/docs/PLAN.md b/docs/PLAN.md index d6b5ff1..132a1d9 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -1,4 +1,4 @@ -# visa.buildfor.life: plan +# Lanna Desk (lannadesk.com, the app visa): plan > Phases 1 to 3 built on November 17, 2026, phases 4 and 5 on November 18, > 2026, all live at https://visa.buildfor.life. On November 19, 2026 the move @@ -9,9 +9,12 @@ > 2026, the same day every push to main became a signed release that cnx01 > installs by itself. Task 7.6, the agreements the client signs, followed the > same day; B4L's real text goes in under Agreements once the lawyers send -> it. **Resume here: phase 8, reminders.** +> it. On November 21, 2026 the app took the name Lanna Desk and moved to +> https://lannadesk.com, B4L's name for an agency that also takes on legal +> work and artists' contracts; visa.buildfor.life redirects there with the +> path. **Resume here: phase 8, reminders.** -visa.buildfor.life keeps the immigration records of the foreigners that B4L +Lanna Desk keeps the immigration records of the foreigners that B4L looks after: their passports, addresses in Thailand, arrivals with the Thailand Digital Arrival Card (TDAC), visas, extensions of stay, re-entry permits, 90-day reports and work permits. From those records it works out every @@ -33,7 +36,7 @@ The first round of questions was answered on November 17, 2026. | Where it runs | cnx01, installed on the host like proplan and lampbench: database `visa` on cnx01's PostgreSQL, documents in its Garage, encrypted by the app, borg backups to juliet | | Releases (Nov 20) | as thukthuk and lampbench-web: every push to main that passes CI becomes a signed release (CalVer), which cnx01 fetches and restarts on within 15 minutes; no fleet PR per release | | Documents in Garage | bucket `visa-documents` on cnx01's Garage, 10 GB (Nov 19, 2026); the app encrypts each file before it leaves the app, so Garage holds no key; Garage's SSE-C is off | -| How it is published | bkk01 publishes `visa.buildfor.life` through a `modules/web-sites` app entry | +| How it is published | bkk01 publishes `lannadesk.com` through a `modules/web-sites` app entry; `visa.buildfor.life` redirects there | | Login | Kanidm at id.cnx.network, OAuth2 client `visa-web`, group `visa` with grabowski and oltmanns | | Who sees what | every member of `visa` sees and edits every record, as agency staff would; a view for clients comes later | | First extension pack | Non-B with a work permit, employer B4L, at Chiang Mai Immigration | diff --git a/src/agreements/pdf.rs b/src/agreements/pdf.rs index cd34b1e..f9496cf 100644 --- a/src/agreements/pdf.rs +++ b/src/agreements/pdf.rs @@ -42,7 +42,7 @@ pub struct Signed<'a> { pub record: &'a str, /// "Nov 20, 2026, 14:05 (Chiang Mai time)" pub at: &'a str, - /// "client link 12 at https://visa.buildfor.life" + /// "client link 12 at https://lannadesk.com" pub through: &'a str, pub ip: &'a str, pub user_agent: &'a str, @@ -267,7 +267,7 @@ pub fn render(s: &Signed<'_>, blocks: &[Block]) -> Result> { doc.set_metadata( Metadata::new() .title(format!("{}, version {}", s.title, s.version)) - .creator("visa.buildfor.life".to_string()), + .creator("Lanna Desk (lannadesk.com)".to_string()), ); for (i, ops) in l.pages.iter().enumerate() { let mut page = doc.start_page_with(PageSettings::from_wh(W, H).expect("A4")); diff --git a/src/config.rs b/src/config.rs index c8d6b12..8818771 100644 --- a/src/config.rs +++ b/src/config.rs @@ -4,7 +4,7 @@ //! | Variable | Meaning | //! | -------------------------------- | ------------------------------------------------ | //! | `VISA_LISTEN` | address to listen on, default 127.0.0.1:8040 | -//! | `VISA_PUBLIC_URL` | https://visa.buildfor.life (login redirects) | +//! | `VISA_PUBLIC_URL` | https://lannadesk.com (login redirects) | //! | `VISA_DATABASE_URL` | postgres://user@host/db | //! | `VISA_DATABASE_PASSWORD_FILE` | the role's password (else credential `db-password`) | //! | `VISA_OIDC_ISSUER` | https://id.cnx.network/oauth2/openid/visa-web | diff --git a/src/lib.rs b/src/lib.rs index e392704..fe150dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -//! visa.buildfor.life: immigration records, deadlines and extension packs +//! Lanna Desk (lannadesk.com): immigration records, deadlines and extension packs //! for foreigners in Thailand (docs/PLAN.md). pub mod agreements; diff --git a/src/main.rs b/src/main.rs index 0d43537..6936a22 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use visa::files::{self, Store}; use visa::{dates, db, documents, seed, web}; const USAGE: &str = "\ -visa: immigration records, deadlines and extension packs (visa.buildfor.life) +visa: immigration records, deadlines and extension packs (Lanna Desk, lannadesk.com) Usage: visa [COMMAND] diff --git a/src/pack/pdf.rs b/src/pack/pdf.rs index 42e2dec..5d3948d 100644 --- a/src/pack/pdf.rs +++ b/src/pack/pdf.rs @@ -334,7 +334,7 @@ fn build( doc.set_metadata( Metadata::new() .title(cover.title.clone()) - .creator("visa.buildfor.life".to_string()), + .creator("Lanna Desk (lannadesk.com)".to_string()), ); let top = |page: usize| XyzDestination::new(page, Point::from_xy(0.0, 0.0)); let mut outline = Outline::new(); diff --git a/src/papers/mod.rs b/src/papers/mod.rs index 4f9def6..d78f60b 100644 --- a/src/papers/mod.rs +++ b/src/papers/mod.rs @@ -461,7 +461,7 @@ pub fn render(papers: &[Paper], v: &Values, title: &str) -> Result> { doc.set_metadata( Metadata::new() .title(title.to_string()) - .creator("visa.buildfor.life".to_string()), + .creator("Lanna Desk (lannadesk.com)".to_string()), ); for &paper in papers { add_form(&mut doc, &pen, paper, v)?; diff --git a/src/session.rs b/src/session.rs index 7760c82..2e625ff 100644 --- a/src/session.rs +++ b/src/session.rs @@ -15,8 +15,8 @@ use sqlx::PgPool; use crate::oidc::random_token; -/// `__Host-`: Secure, Path=/ and no Domain, so no other name under -/// buildfor.life can set or read it. +/// `__Host-`: Secure, Path=/ and no Domain, so no other name under the +/// app's domain can set or read it. pub const SESSION_COOKIE: &str = "__Host-visa"; /// Binds a login in progress to the browser that started it. pub const FLOW_COOKIE: &str = "__Host-visa-login"; diff --git a/src/web/auth.rs b/src/web/auth.rs index eafdaf4..47525e0 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -38,7 +38,7 @@ pub async fn login( &st, StatusCode::SERVICE_UNAVAILABLE, "The login service is not reachable yet", - "visa.buildfor.life fetches id.cnx.network's settings when it starts and keeps \ + "Lanna Desk fetches id.cnx.network's settings when it starts and keeps \ trying. Try again in a minute.", ("/", "Try again"), ); @@ -247,7 +247,7 @@ pub async fn signed_out(State(st): State>) -> Response { &st, StatusCode::OK, "Signed out", - "You are signed out of visa.buildfor.life. Your session at id.cnx.network stays open \ + "You are signed out of Lanna Desk. Your session at id.cnx.network stays open \ until you sign out there.", ("/", "Sign in again"), ) diff --git a/src/web/mod.rs b/src/web/mod.rs index 088e35f..989fdf4 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -454,7 +454,7 @@ async fn forms_guard(State(st): State>, req: Request, next: Next) &st, StatusCode::FORBIDDEN, "Refused", - "This form was sent from another site. Open visa.buildfor.life and try again there.", + "This form was sent from another site. Open lannadesk.com and try again there.", ("/", "Open the app"), ); } diff --git a/src/web/pack.rs b/src/web/pack.rs index 9c1a147..b1f923c 100644 --- a/src/web/pack.rs +++ b/src/web/pack.rs @@ -276,7 +276,7 @@ pub async fn pdf( person: whose.clone(), lines, made: format!( - "Put together by visa.buildfor.life for {} on {}.", + "Put together by Lanna Desk (lannadesk.com) for {} on {}.", user.login, dates::fmt_datetime(Utc::now()) ), diff --git a/static/app.css b/static/app.css index 8d435bd..69883a6 100644 --- a/static/app.css +++ b/static/app.css @@ -1,4 +1,4 @@ -/* visa.buildfor.life: the buildfor.life colors, navy #071323 and gold +/* Lanna Desk (lannadesk.com): the buildfor.life colors, navy #071323 and gold #f5c000, with tints of both. Status colors (--ok, --warn, --bad) appear only on chips and notes that carry a text label. No inline styles: the Content Security Policy allows none. */ diff --git a/templates/base.html b/templates/base.html index 206211e..2851c4a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ -{{ title }} · visa.buildfor.life +{{ title }} · Lanna Desk @@ -12,9 +12,9 @@
- + {% include "_mark.html" %} - Visabuildfor.life + Lanna DeskB4L
@@ -42,7 +42,7 @@
{% block main %}{% endblock %} -
visa.buildfor.life {{ version }}{% if commit %}, commit {% if commit_url %}{{ commit }}{% else %}{{ commit }}{% endif %}{% endif %}. Every view and change of a person's record is written to the Activity log. Dates are in Chiang Mai time.
+
Lanna Desk {{ version }}{% if commit %}, commit {% if commit_url %}{{ commit }}{% else %}{{ commit }}{% endif %}{% endif %}. Every view and change of a person's record is written to the Activity log. Dates are in Chiang Mai time.
diff --git a/templates/client_base.html b/templates/client_base.html index 1bde217..2c724a4 100644 --- a/templates/client_base.html +++ b/templates/client_base.html @@ -5,7 +5,7 @@ -{{ title }} · B4L +{{ title }} · Lanna Desk @@ -17,7 +17,7 @@
{% if base %}{% else %}{% endif %} {% include "_mark.html" %} - VisaB4L + Lanna DeskB4L {% if base %}{% else %}{% endif %}
diff --git a/templates/message.html b/templates/message.html index d2170de..fbe6690 100644 --- a/templates/message.html +++ b/templates/message.html @@ -4,7 +4,7 @@ -{{ title }} · visa.buildfor.life +{{ title }} · Lanna Desk @@ -12,12 +12,12 @@
- {% include "_mark.html" %}Visabuildfor.life + {% include "_mark.html" %}Lanna DeskB4L
-
visa.buildfor.life
+
Lanna Desk

{{ title }}

{{ text }}

{{ link }}