forge
Explore
Log in

Don't you dare go Hollow

Rename izlek to iz

Browse files at this commit

7326831af012ac936bdee3b19e4fe7172d24c3e3Ahmet Kaan GümüşParent: bcf7ceb
Crate, binary, config, database and key files, JS globals, env vars,
workflow deploy paths, and all user-facing strings follow the repo's new
name. The token-hash known-answer test carries the digest of the new
input. Clock tests move off a date that rotted into the past.

55 changed files +1288 -1284

.github/workflows/main.ymlmodified+14 -14
@@ -16,8 +16,8 @@ env:
16 # broken deploy. In exchange: no cross-toolchain, and the linker is16 # broken deploy. In exchange: no cross-toolchain, and the linker is
17 # rustc's default bundled lld.17 # rustc's default bundled lld.
18 TARGET: x86_64-unknown-linux-gnu18 TARGET: x86_64-unknown-linux-gnu
19- # The systemd user unit that owns the process. See izlek.service.19+ # The systemd user unit that owns the process. See iz.service.
20- SERVICE: izlek20+ SERVICE: iz
21 # `release` keeps fat LTO in one codegen unit for when the last few percent21 # `release` keeps fat LTO in one codegen unit for when the last few percent
22 # are worth five minutes. `dist` is that profile with thin LTO and the cores22 # are worth five minutes. `dist` is that profile with thin LTO and the cores
23 # actually used: measured on a 12-core machine, the relink every deploy pays23 # actually used: measured on a 12-core machine, the relink every deploy pays
@@ -29,7 +29,7 @@ env:
29 # itself is resolved on the server ($HOME), so switching the deploy user29 # itself is resolved on the server ($HOME), so switching the deploy user
30 # moves the path with it — a baked-in absolute path once kept pointing at30 # moves the path with it — a baked-in absolute path once kept pointing at
31 # the previous user's home and failed the deploy on permissions.31 # the previous user's home and failed the deploy on permissions.
32- DEPLOY_SUBDIR: izlek32+ DEPLOY_SUBDIR: iz
33 33
34 jobs:34 jobs:
35 deploy:35 deploy:
@@ -90,11 +90,11 @@ jobs:
90 - name: Build the binary and bundle its assets90 - name: Build the binary and bundle its assets
91 run: |91 run: |
92 set -euo pipefail92 set -euo pipefail
93- # One compile: this builds izlek-web and writes out the asset bundle93+ # One compile: this builds iz-web and writes out the asset bundle
94 # embedded in the binary it produced.94 # embedded in the binary it produced.
95- topcoat asset bundle --package izlek-web --profile "$PROFILE" --out stage/assets95+ topcoat asset bundle --package iz-web --profile "$PROFILE" --out stage/assets
96- cp "target/$TARGET/$PROFILE/izlek-web" stage/izlek-web96+ cp "target/$TARGET/$PROFILE/iz-web" stage/iz-web
97- strip stage/izlek-web97+ strip stage/iz-web
98 ls -l stage stage/assets98 ls -l stage stage/assets
99 99
100 - name: Install SSH keys100 - name: Install SSH keys
@@ -125,7 +125,7 @@ jobs:
125 esac125 esac
126 deploy_path=$HOME/$1126 deploy_path=$HOME/$1
127 # The deploy path is the service's working directory: config/,127 # The deploy path is the service's working directory: config/,
128- # izlek.db and izlek.key live there and are never touched from here.128+ # iz.db and iz.key live there and are never touched from here.
129 # Only 'current' is replaced.129 # Only 'current' is replaced.
130 mkdir -p -- "$deploy_path"130 mkdir -p -- "$deploy_path"
131 rm -rf -- "$deploy_path/current.new"131 rm -rf -- "$deploy_path/current.new"
@@ -150,12 +150,12 @@ jobs:
150 export XDG_RUNTIME_DIR=/run/user/$(id -u)150 export XDG_RUNTIME_DIR=/run/user/$(id -u)
151 # Read before anything moves: a config the health check cannot151 # Read before anything moves: a config the health check cannot
152 # read is a failure to stop on, not one to roll back from.152 # read is a failure to stop on, not one to roll back from.
153- listen=$(sed -n 's/^listen[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' "$deploy_path/config/izlek.toml")153+ listen=$(sed -n 's/^listen[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' "$deploy_path/config/iz.toml")
154 if [ -z "$listen" ]; then154 if [ -z "$listen" ]; then
155- echo "no listen address in $deploy_path/config/izlek.toml" >&2155+ echo "no listen address in $deploy_path/config/iz.toml" >&2
156 exit 1156 exit 1
157 fi157 fi
158- chmod +x -- "$deploy_path/current.new/izlek-web"158+ chmod +x -- "$deploy_path/current.new/iz-web"
159 rm -rf -- "$deploy_path/current.previous"159 rm -rf -- "$deploy_path/current.previous"
160 if [ -e "$deploy_path/current" ]; then160 if [ -e "$deploy_path/current" ]; then
161 mv -- "$deploy_path/current" "$deploy_path/current.previous"161 mv -- "$deploy_path/current" "$deploy_path/current.previous"
@@ -166,13 +166,13 @@ jobs:
166 # has bound its port. Wait for the health route rather than a clock.166 # has bound its port. Wait for the health route rather than a clock.
167 for _ in $(seq 1 30); do167 for _ in $(seq 1 30); do
168 if curl -fsS "http://$listen/healthz" >/dev/null 2>&1; then168 if curl -fsS "http://$listen/healthz" >/dev/null 2>&1; then
169- echo 'izlek is up'169+ echo 'iz is up'
170 rm -rf -- "$deploy_path/current.previous"170 rm -rf -- "$deploy_path/current.previous"
171 exit 0171 exit 0
172 fi172 fi
173 sleep 1173 sleep 1
174 done174 done
175- echo 'izlek did not answer /healthz; rolling back' >&2175+ echo 'iz did not answer /healthz; rolling back' >&2
176 rm -rf -- "$deploy_path/current"176 rm -rf -- "$deploy_path/current"
177 mv -- "$deploy_path/current.previous" "$deploy_path/current"177 mv -- "$deploy_path/current.previous" "$deploy_path/current"
178 systemctl --user restart "$service"178 systemctl --user restart "$service"
@@ -194,7 +194,7 @@ jobs:
194 ssh "$ssh_target" "bash -se -- '$DEPLOY_SUBDIR'" > served-stylesheet.css <<'REMOTE'194 ssh "$ssh_target" "bash -se -- '$DEPLOY_SUBDIR'" > served-stylesheet.css <<'REMOTE'
195 set -euo pipefail195 set -euo pipefail
196 deploy_path=$HOME/$1196 deploy_path=$HOME/$1
197- listen=$(sed -n 's/^listen[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' "$deploy_path/config/izlek.toml")197+ listen=$(sed -n 's/^listen[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' "$deploy_path/config/iz.toml")
198 url=$(curl -fsS "http://${listen}/" | grep -oE '/_topcoat/assets/main-[a-f0-9]+\.css' | head -n1)198 url=$(curl -fsS "http://${listen}/" | grep -oE '/_topcoat/assets/main-[a-f0-9]+\.css' | head -n1)
199 if [ -z "$url" ]; then199 if [ -z "$url" ]; then
200 echo 'the served page references no stylesheet' >&2200 echo 'the served page references no stylesheet' >&2
.gitignoremodified+3 -3
@@ -5,8 +5,8 @@
5 *.db-*5 *.db-*
6 /storage6 /storage
7 .env7 .env
8-izlek.key8+iz.key
9-/config/izlek.toml9+/config/iz.toml
10 CLAUDE.md10 CLAUDE.md
11-/crates/izlek-web/assets11+/crates/iz-web/assets
12 *.db.backup-*12 *.db.backup-*
Cargo.lockmodified+3 -3
@@ -1777,7 +1777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1777 checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"1777 checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
1778 1778
1779 [[package]]1779 [[package]]
1780-name = "izlek-core"1780+name = "iz-core"
1781 version = "0.1.0"1781 version = "0.1.0"
1782 dependencies = [1782 dependencies = [
1783 "argon2",1783 "argon2",
@@ -1800,7 +1800,7 @@ dependencies = [
1800 ]1800 ]
1801 1801
1802 [[package]]1802 [[package]]
1803-name = "izlek-web"1803+name = "iz-web"
1804 version = "0.1.0"1804 version = "0.1.0"
1805 dependencies = [1805 dependencies = [
1806 "async-trait",1806 "async-trait",
@@ -1809,7 +1809,7 @@ dependencies = [
1809 "grass",1809 "grass",
1810 "http",1810 "http",
1811 "http-body-util",1811 "http-body-util",
1812- "izlek-core",1812+ "iz-core",
1813 "lettre",1813 "lettre",
1814 "quick-xml",1814 "quick-xml",
1815 "serde",1815 "serde",
Cargo.tomlmodified+3 -3
@@ -1,15 +1,15 @@
1 [workspace]1 [workspace]
2 resolver = "3"2 resolver = "3"
3-members = ["crates/izlek-core", "crates/izlek-web"]3+members = ["crates/iz-core", "crates/iz-web"]
4 4
5 [workspace.package]5 [workspace.package]
6 version = "0.1.0"6 version = "0.1.0"
7 edition = "2024"7 edition = "2024"
8 license = "AGPL-3.0-or-later"8 license = "AGPL-3.0-or-later"
9-repository = "https://github.com/IzlekLab/izlek"9+repository = "https://github.com/DizeyLab/iz"
10 10
11 [workspace.dependencies]11 [workspace.dependencies]
12-izlek-core = { path = "crates/izlek-core", default-features = false }12+iz-core = { path = "crates/iz-core", default-features = false }
13 serde = { version = "1.0.229", features = ["derive"] }13 serde = { version = "1.0.229", features = ["derive"] }
14 serde_json = "1.0.145"14 serde_json = "1.0.145"
15 thiserror = "2.0.20"15 thiserror = "2.0.20"
config/izlek.toml → config/iz.tomlrenamed+0 -0
crates/izlek-core/Cargo.toml → crates/iz-core/Cargo.tomlrenamed+2 -2
@@ -1,10 +1,10 @@
1 [package]1 [package]
2-name = "izlek-core"2+name = "iz-core"
3 version.workspace = true3 version.workspace = true
4 edition.workspace = true4 edition.workspace = true
5 license.workspace = true5 license.workspace = true
6 repository.workspace = true6 repository.workspace = true
7-description = "Domain model and storage for İzlek"7+description = "Domain model and storage for İz"
8 8
9 [features]9 [features]
10 # The domain vocabulary (roles, record shapes) compiles anywhere, including the10 # The domain vocabulary (roles, record shapes) compiles anywhere, including the
crates/izlek-core/migrations/0001_init.sql → crates/iz-core/migrations/0001_init.sqlrenamed+4 -4
@@ -1,4 +1,4 @@
1--- Izlek's schema, whole, in one file.1+-- Iz's schema, whole, in one file.
2 --2 --
3 -- One plain SQL file, applied at boot to an empty database: Turso has no3 -- One plain SQL file, applied at boot to an empty database: Turso has no
4 -- migration runner of its own, and keeping the schema as SQL is what makes4 -- migration runner of its own, and keeping the schema as SQL is what makes
@@ -9,7 +9,7 @@
9 --9 --
10 -- This file is the whole schema, and it is edited in place: a change to a10 -- This file is the whole schema, and it is edited in place: a change to a
11 -- table is made here, in the table, never appended as an ALTER. An existing11 -- table is made here, in the table, never appended as an ALTER. An existing
12--- database is brought up to it by `izlek reconcile`, not by the store, so a12+-- database is brought up to it by `iz reconcile`, not by the store, so a
13 -- change to a table lands in two places — here, and in that tool's copy map.13 -- change to a table lands in two places — here, and in that tool's copy map.
14 14
15 CREATE TABLE workspace (15 CREATE TABLE workspace (
@@ -40,7 +40,7 @@ CREATE TABLE workspace (
40 -- `smtp_password` holds ciphertext, never the typed string. The server40 -- `smtp_password` holds ciphertext, never the typed string. The server
41 -- has to present the password to the mail host on every send, so a41 -- has to present the password to the mail host on every send, so a
42 -- one-way hash is impossible; instead `store::secret` seals it under a42 -- one-way hash is impossible; instead `store::secret` seals it under a
43- -- key kept in `izlek.key` beside this file, so a database copied for a43+ -- key kept in `iz.key` beside this file, so a database copied for a
44 -- backup does not carry a working credential with it. No field on44 -- backup does not carry a working credential with it. No field on
45 -- `Workspace` exposes it — it is written by `Store::set_sender` and read45 -- `Workspace` exposes it — it is written by `Store::set_sender` and read
46 -- by `Store::smtp_password`, which only the mailer calls.46 -- by `Store::smtp_password`, which only the mailer calls.
@@ -74,7 +74,7 @@ CREATE TABLE workspace (
74 -- The address mail links point at, when the one the process was74 -- The address mail links point at, when the one the process was
75 -- configured with is not the one people reach. A box behind a proxy75 -- configured with is not the one people reach. A box behind a proxy
76 -- answers on localhost and is known by a public name, and only an admin76 -- answers on localhost and is known by a public name, and only an admin
77- -- knows which — so it is workspace content, and `config/izlek.toml`'s77+ -- knows which — so it is workspace content, and `config/iz.toml`'s
78 -- `base_url` is what an empty one falls back to.78 -- `base_url` is what an empty one falls back to.
79 public_url TEXT79 public_url TEXT
80 );80 );
crates/izlek-core/src/accounts.rs → crates/iz-core/src/accounts.rsrenamed+7 -7
@@ -89,7 +89,7 @@ pub struct Accounts {
89 /// The origin the sign-in link in an invite mail points at, with no89 /// The origin the sign-in link in an invite mail points at, with no
90 /// trailing slash.90 /// trailing slash.
91 /// The address a mailed link carries when no admin has set one: the91 /// The address a mailed link carries when no admin has set one: the
92- /// address the process binds, from `config/izlek.toml`.92+ /// address the process binds, from `config/iz.toml`.
93 fallback_url: String,93 fallback_url: String,
94 }94 }
95 95
@@ -234,9 +234,9 @@ impl Accounts {
234 self.store234 self.store
235 .create_signin_link(&user.id, &token.hash(), expires_at, LinkKind::Join)235 .create_signin_link(&user.id, &token.hash(), expires_at, LinkKind::Join)
236 .await?;236 .await?;
237- let subject = "Your İzlek sign-in link";237+ let subject = "Your İz sign-in link";
238 let body = format!(238 let body = format!(
239- "{actor} added you to İzlek.\n\n{base}/join/{token}\n\nThe link works once and expires in 7 days.\n",239+ "{actor} added you to İz.\n\n{base}/join/{token}\n\nThe link works once and expires in 7 days.\n",
240 actor = actor.display_name,240 actor = actor.display_name,
241 base = self.base().await?,241 base = self.base().await?,
242 token = token.expose(),242 token = token.expose(),
@@ -635,18 +635,18 @@ impl Accounts {
635 fn reset_mail(user: &User, base: String, token: &str) -> (String, String) {635 fn reset_mail(user: &User, base: String, token: &str) -> (String, String) {
636 if user.language == "tr" {636 if user.language == "tr" {
637 (637 (
638- "İzlek parolanı sıfırla".to_string(),638+ "İz parolanı sıfırla".to_string(),
639 format!(639 format!(
640- "Bu adres için bir İzlek parola sıfırlaması istendi.\n\n\640+ "Bu adres için bir İz parola sıfırlaması istendi.\n\n\
641 {base}/reset/{token}\n\n\641 {base}/reset/{token}\n\n\
642 Bağlantı bir kez çalışır ve 7 gün içinde geçersiz olur.\n"642 Bağlantı bir kez çalışır ve 7 gün içinde geçersiz olur.\n"
643 ),643 ),
644 )644 )
645 } else {645 } else {
646 (646 (
647- "Reset your İzlek password".to_string(),647+ "Reset your İz password".to_string(),
648 format!(648 format!(
649- "A reset was asked for the İzlek password on this address.\n\n\649+ "A reset was asked for the İz password on this address.\n\n\
650 {base}/reset/{token}\n\n\650 {base}/reset/{token}\n\n\
651 The link works once and expires in 7 days.\n"651 The link works once and expires in 7 days.\n"
652 ),652 ),
crates/izlek-core/src/auth.rs → crates/iz-core/src/auth.rsrenamed+11 -7
@@ -198,7 +198,11 @@ mod tests {
198 #[test]198 #[test]
199 fn a_password_sharing_nothing_with_the_person_is_accepted() {199 fn a_password_sharing_nothing_with_the_person_is_accepted() {
200 assert_eq!(200 assert_eq!(
201- check_password("abcde*abcde", "burakboduroglu0@gmail.com", "Burak Boduroğlu"),201+ check_password(
202+ "abcde*abcde",
203+ "burakboduroglu0@gmail.com",
204+ "Burak Boduroğlu"
205+ ),
202 Ok(())206 Ok(())
203 );207 );
204 }208 }
@@ -254,11 +258,11 @@ mod tests {
254 258
255 #[test]259 #[test]
256 fn known_answer_for_the_token_digest() {260 fn known_answer_for_the_token_digest() {
257- // SHA-256("izlek"), so a refactor cannot quietly change the algorithm261+ // SHA-256("iz"), so a refactor cannot quietly change the algorithm
258 // under stored hashes.262 // under stored hashes.
259 assert_eq!(263 assert_eq!(
260- hash_token("izlek"),264+ hash_token("iz"),
261- "d81eac046551d3591888f0c7012b8faece2cc3501f63398bc040118bfd835d8e"265+ "a93c5a18c1c1da1c799d05b4be13c8de48b5fb5db7d686c3356614cf21ae7855"
262 );266 );
263 }267 }
264 268
@@ -272,7 +276,7 @@ mod tests {
272 276
273 #[test]277 #[test]
274 fn password_rules_are_the_ones_on_the_screen() {278 fn password_rules_are_the_ones_on_the_screen() {
275- let email = "grace@izlek.sh";279+ let email = "grace@iz.sh";
276 let name = "Grace Hopper";280 let name = "Grace Hopper";
277 assert_eq!(281 assert_eq!(
278 check_password("short", email, name),282 check_password("short", email, name),
@@ -288,7 +292,7 @@ mod tests {
288 "case must not be an escape hatch"292 "case must not be an escape hatch"
289 );293 );
290 assert_eq!(294 assert_eq!(
291- check_password("grace@izlek.sh!!", email, name),295+ check_password("grace@iz.sh!!", email, name),
292 Err(PasswordProblem::LooksLikeYou)296 Err(PasswordProblem::LooksLikeYou)
293 );297 );
294 assert!(check_password("tide-tables-1892", email, name).is_ok());298 assert!(check_password("tide-tables-1892", email, name).is_ok());
@@ -303,7 +307,7 @@ mod tests {
303 307
304 #[cfg(test)]308 #[cfg(test)]
305 mod dummy_hash_generator {309 mod dummy_hash_generator {
306- //! Run with `cargo test -p izlek-core --lib print_a_dummy_hash -- --ignored310+ //! Run with `cargo test -p iz-core --lib print_a_dummy_hash -- --ignored
307 //! --nocapture` to mint a replacement for [`super::dummy_password_hash`].311 //! --nocapture` to mint a replacement for [`super::dummy_password_hash`].
308 #[test]312 #[test]
309 #[ignore = "generator, not a check"]313 #[ignore = "generator, not a check"]
crates/izlek-core/src/board.rs → crates/iz-core/src/board.rsrenamed+0 -0
crates/izlek-core/src/config.rs → crates/iz-core/src/config.rsrenamed+37 -37
@@ -1,15 +1,15 @@
1-//! Everything İzlek reads from `config/izlek.toml`, in one place.1+//! Everything İz reads from `config/iz.toml`, in one place.
2 //!2 //!
3 //! Nothing here has a silent default once the file exists. A key that is3 //! Nothing here has a silent default once the file exists. A key that is
4 //! missing, empty or unusable stops the boot and says which key and which4 //! missing, empty or unusable stops the boot and says which key and which
5 //! file, because the alternative is worse than not starting: a wrong5 //! file, because the alternative is worse than not starting: a wrong
6-//! `database` does not mean "no data", it means a second İzlek quietly6+//! `database` does not mean "no data", it means a second İz quietly
7 //! writing a different file while everyone believes they are looking at the7 //! writing a different file while everyone believes they are looking at the
8 //! same board — and Turso is single-writer, so the two are not even8 //! same board — and Turso is single-writer, so the two are not even
9 //! reconcilable afterwards.9 //! reconcilable afterwards.
10 //!10 //!
11 //! Development still needs to be one command, so the *absence* of11 //! Development still needs to be one command, so the *absence* of
12-//! `config/izlek.toml` is the opt-in that takes the development defaults: the12+//! `config/iz.toml` is the opt-in that takes the development defaults: the
13 //! app writes the file itself, with those defaults in it and comments saying13 //! app writes the file itself, with those defaults in it and comments saying
14 //! what each key does, and starts. That is opt-in on purpose too — it only14 //! what each key does, and starts. That is opt-in on purpose too — it only
15 //! ever happens once, because the second boot finds the file it wrote the15 //! ever happens once, because the second boot finds the file it wrote the
@@ -41,16 +41,16 @@ use std::path::{Path, PathBuf};
41 41
42 /// The path, relative to the working directory, of the file `Config::load`42 /// The path, relative to the working directory, of the file `Config::load`
43 /// reads and, failing that, writes.43 /// reads and, failing that, writes.
44-const FILE_NAME: &str = "config/izlek.toml";44+const FILE_NAME: &str = "config/iz.toml";
45 45
46-/// What a freshly written `config/izlek.toml` says, comments included. Development46+/// What a freshly written `config/iz.toml` says, comments included. Development
47-/// defaults, so that a plain `izlek` in an empty directory is one command.47+/// defaults, so that a plain `iz` in an empty directory is one command.
48 const DEVELOPMENT_DEFAULTS: &str = r#"# Where the one database file lives. One process holds it.48 const DEVELOPMENT_DEFAULTS: &str = r#"# Where the one database file lives. One process holds it.
49-database = "izlek.db"49+database = "iz.db"
50 # Where attachments and profile photos live as files, created on boot.50 # Where attachments and profile photos live as files, created on boot.
51 storage = "storage"51 storage = "storage"
52 # The address the server listens on. Environment variables are ignored —52 # The address the server listens on. Environment variables are ignored —
53-# this is the only thing that decides where İzlek binds. It is also the53+# this is the only thing that decides where İz binds. It is also the
54 # address mail links fall back to, until an admin sets one in Settings.54 # address mail links fall back to, until an admin sets one in Settings.
55 listen = "127.0.0.1:7654"55 listen = "127.0.0.1:7654"
56 # How long a live-update connection is held before the browser is asked to56 # How long a live-update connection is held before the browser is asked to
@@ -86,7 +86,7 @@ const OPTIONAL_KEYS: &[(&str, &str)] = &[
86 "listen",86 "listen",
87 concat!(87 concat!(
88 "# The address the server listens on. Environment variables are ignored —\n",88 "# The address the server listens on. Environment variables are ignored —\n",
89- "# this is the only thing that decides where İzlek binds. It is also the\n",89+ "# this is the only thing that decides where İz binds. It is also the\n",
90 "# address mail links fall back to, until an admin sets one in Settings.\n",90 "# address mail links fall back to, until an admin sets one in Settings.\n",
91 "listen = \"127.0.0.1:7654\"\n"91 "listen = \"127.0.0.1:7654\"\n"
92 ),92 ),
@@ -102,7 +102,7 @@ const OPTIONAL_KEYS: &[(&str, &str)] = &[
102 ),102 ),
103 ];103 ];
104 104
105-/// The shape of `config/izlek.toml`, before the values are checked. Anything105+/// The shape of `config/iz.toml`, before the values are checked. Anything
106 /// else the file says lands in `other`, which is read for its key names only106 /// else the file says lands in `other`, which is read for its key names only
107 /// — enough for the report to say a key was seen and not obeyed.107 /// — enough for the report to say a key was seen and not obeyed.
108 #[derive(Deserialize)]108 #[derive(Deserialize)]
@@ -134,7 +134,7 @@ pub struct Config {
134 /// asked to reconnect. The reconnect re-authenticates, which is how a134 /// asked to reconnect. The reconnect re-authenticates, which is how a
135 /// session revoked mid-stream stops being fed.135 /// session revoked mid-stream stops being fed.
136 pub live_seconds: u64,136 pub live_seconds: u64,
137- /// Whether `config/izlek.toml` did not exist and was just written with the137+ /// Whether `config/iz.toml` did not exist and was just written with the
138 /// development defaults this boot.138 /// development defaults this boot.
139 pub defaulted: bool,139 pub defaulted: bool,
140 }140 }
@@ -179,7 +179,7 @@ impl fmt::Display for ConfigError {
179 impl std::error::Error for ConfigError {}179 impl std::error::Error for ConfigError {}
180 180
181 impl Config {181 impl Config {
182- /// Reads `config/izlek.toml` from the current directory, writing it with182+ /// Reads `config/iz.toml` from the current directory, writing it with
183 /// the development defaults first if it is not there.183 /// the development defaults first if it is not there.
184 pub fn load() -> Result<Config, ConfigError> {184 pub fn load() -> Result<Config, ConfigError> {
185 Config::load_from(Path::new("."))185 Config::load_from(Path::new("."))
@@ -187,7 +187,7 @@ impl Config {
187 187
188 /// The same reading, against any directory — which is how it is tested188 /// The same reading, against any directory — which is how it is tested
189 /// without a test being able to disturb another test's working189 /// without a test being able to disturb another test's working
190- /// directory, or another test's `config/izlek.toml`.190+ /// directory, or another test's `config/iz.toml`.
191 pub fn load_from(dir: &Path) -> Result<Config, ConfigError> {191 pub fn load_from(dir: &Path) -> Result<Config, ConfigError> {
192 let path = dir.join(FILE_NAME);192 let path = dir.join(FILE_NAME);
193 match std::fs::read_to_string(&path) {193 match std::fs::read_to_string(&path) {
@@ -206,7 +206,7 @@ impl Config {
206 ConfigError::Io(format!("could not write {}: {err}", path.display()))206 ConfigError::Io(format!("could not write {}: {err}", path.display()))
207 })?;207 })?;
208 println!(208 println!(
209- "izlek wrote {FILE_NAME} with development defaults — edit it for a real deployment"209+ "iz wrote {FILE_NAME} with development defaults — edit it for a real deployment"
210 );210 );
211 Config::parse(DEVELOPMENT_DEFAULTS, dir, true)211 Config::parse(DEVELOPMENT_DEFAULTS, dir, true)
212 }212 }
@@ -268,7 +268,7 @@ impl Config {
268 /// A bind that names no interface — `0.0.0.0`, `::` — answers everywhere268 /// A bind that names no interface — `0.0.0.0`, `::` — answers everywhere
269 /// and is reachable at none of it by name, so the loopback stands in: a269 /// and is reachable at none of it by name, so the loopback stands in: a
270 /// link somebody on the box can click beats a link nobody can. Whoever270 /// link somebody on the box can click beats a link nobody can. Whoever
271- /// puts İzlek behind a proxy sets the real address in Settings, which is271+ /// puts İz behind a proxy sets the real address in Settings, which is
272 /// the only thing this defers to.272 /// the only thing this defers to.
273 pub fn listen_url(&self) -> String {273 pub fn listen_url(&self) -> String {
274 let ip = self.listen.ip();274 let ip = self.listen.ip();
@@ -364,14 +364,14 @@ fn complete(path: &Path, text: &str, base: &Path) {
364 );364 );
365 match std::fs::write(path, completed) {365 match std::fs::write(path, completed) {
366 Ok(()) => println!(366 Ok(()) => println!(
367- "izlek added {} to {FILE_NAME}, at the default already in use",367+ "iz added {} to {FILE_NAME}, at the default already in use",
368 missing368 missing
369 .iter()369 .iter()
370 .map(|(key, _)| *key)370 .map(|(key, _)| *key)
371 .collect::<Vec<_>>()371 .collect::<Vec<_>>()
372 .join(", ")372 .join(", ")
373 ),373 ),
374- Err(err) => println!("izlek could not complete {FILE_NAME}: {err}"),374+ Err(err) => println!("iz could not complete {FILE_NAME}: {err}"),
375 }375 }
376 }376 }
377 377
@@ -397,7 +397,7 @@ fn default_storage(database: &Path) -> PathBuf {
397 }397 }
398 398
399 /// An absolute path for a file that may not exist yet: the directory is399 /// An absolute path for a file that may not exist yet: the directory is
400-/// resolved against `base` (the directory `config/izlek.toml` was read400+/// resolved against `base` (the directory `config/iz.toml` was read
401 /// from), the file name is kept as written.401 /// from), the file name is kept as written.
402 fn absolute(base: &Path, path: &Path) -> PathBuf {402 fn absolute(base: &Path, path: &Path) -> PathBuf {
403 if path.is_absolute() {403 if path.is_absolute() {
@@ -423,7 +423,7 @@ mod tests {
423 /// A scratch directory, cleaned up when the test ends, so `load_from` can423 /// A scratch directory, cleaned up when the test ends, so `load_from` can
424 /// be exercised without touching the process's own working directory.424 /// be exercised without touching the process's own working directory.
425 fn scratch() -> PathBuf {425 fn scratch() -> PathBuf {
426- let dir = std::env::temp_dir().join(format!("izlek-config-test-{}", unique_suffix()));426+ let dir = std::env::temp_dir().join(format!("iz-config-test-{}", unique_suffix()));
427 std::fs::create_dir_all(&dir).unwrap();427 std::fs::create_dir_all(&dir).unwrap();
428 dir428 dir
429 }429 }
@@ -444,7 +444,7 @@ mod tests {
444 let config = Config::load_from(&dir).unwrap();444 let config = Config::load_from(&dir).unwrap();
445 assert!(config.defaulted);445 assert!(config.defaulted);
446 assert!(config.database.is_absolute(), "{:?}", config.database);446 assert!(config.database.is_absolute(), "{:?}", config.database);
447- assert!(config.database.ends_with("izlek.db"));447+ assert!(config.database.ends_with("iz.db"));
448 assert_eq!(config.listen, "127.0.0.1:7654".parse().unwrap());448 assert_eq!(config.listen, "127.0.0.1:7654".parse().unwrap());
449 assert_eq!(config.listen_url(), "http://127.0.0.1:7654");449 assert_eq!(config.listen_url(), "http://127.0.0.1:7654");
450 450
@@ -473,7 +473,7 @@ mod tests {
473 std::fs::create_dir_all(dir.join("config")).unwrap();473 std::fs::create_dir_all(dir.join("config")).unwrap();
474 std::fs::write(474 std::fs::write(
475 dir.join(FILE_NAME),475 dir.join(FILE_NAME),
476- "# mine\ndatabase = \"state/izlek.db\"\n",476+ "# mine\ndatabase = \"state/iz.db\"\n",
477 )477 )
478 .unwrap();478 .unwrap();
479 479
@@ -483,11 +483,11 @@ mod tests {
483 let written = std::fs::read_to_string(dir.join(FILE_NAME)).unwrap();483 let written = std::fs::read_to_string(dir.join(FILE_NAME)).unwrap();
484 assert!(written.contains("listen = \"127.0.0.1:7654\""), "{written}");484 assert!(written.contains("listen = \"127.0.0.1:7654\""), "{written}");
485 // `storage` has no literal default: the completed line is where the485 // `storage` has no literal default: the completed line is where the
486- // file's own `database` put it — beside `state/izlek.db` here.486+ // file's own `database` put it — beside `state/iz.db` here.
487 assert!(written.contains("storage = "), "{written}");487 assert!(written.contains("storage = "), "{written}");
488 // What was there is untouched, comment and all.488 // What was there is untouched, comment and all.
489 assert!(489 assert!(
490- written.starts_with("# mine\ndatabase = \"state/izlek.db\"\n"),490+ written.starts_with("# mine\ndatabase = \"state/iz.db\"\n"),
491 "{written}"491 "{written}"
492 );492 );
493 493
@@ -507,7 +507,7 @@ mod tests {
507 fn completion_leaves_a_key_that_is_already_there() {507 fn completion_leaves_a_key_that_is_already_there() {
508 let dir = scratch();508 let dir = scratch();
509 std::fs::create_dir_all(dir.join("config")).unwrap();509 std::fs::create_dir_all(dir.join("config")).unwrap();
510- let mine = "database = \"izlek.db\"\nstorage = \"files\"\n\510+ let mine = "database = \"iz.db\"\nstorage = \"files\"\n\
511 listen = \"0.0.0.0:8080\"\nlive_seconds = 30\n";511 listen = \"0.0.0.0:8080\"\nlive_seconds = 30\n";
512 std::fs::write(dir.join(FILE_NAME), mine).unwrap();512 std::fs::write(dir.join(FILE_NAME), mine).unwrap();
513 let config = Config::load_from(&dir).unwrap();513 let config = Config::load_from(&dir).unwrap();
@@ -523,12 +523,12 @@ mod tests {
523 #[test]523 #[test]
524 fn a_file_without_storage_puts_it_beside_the_database() {524 fn a_file_without_storage_puts_it_beside_the_database() {
525 let config = Config::parse(525 let config = Config::parse(
526- "database = \"/srv/izlek/izlek.db\"\n",526+ "database = \"/srv/iz/iz.db\"\n",
527 Path::new("."),527 Path::new("."),
528 false,528 false,
529 )529 )
530 .unwrap();530 .unwrap();
531- assert_eq!(config.storage, PathBuf::from("/srv/izlek/storage"));531+ assert_eq!(config.storage, PathBuf::from("/srv/iz/storage"));
532 }532 }
533 533
534 /// An explicit storage is taken absolute, the way the database is.534 /// An explicit storage is taken absolute, the way the database is.
@@ -536,7 +536,7 @@ mod tests {
536 fn a_relative_storage_is_reported_absolute() {536 fn a_relative_storage_is_reported_absolute() {
537 let dir = scratch();537 let dir = scratch();
538 let config = Config::parse(538 let config = Config::parse(
539- "database = \"izlek.db\"\nstorage = \"state/files\"\n",539+ "database = \"iz.db\"\nstorage = \"state/files\"\n",
540 &dir,540 &dir,
541 false,541 false,
542 )542 )
@@ -555,7 +555,7 @@ mod tests {
555 #[test]555 #[test]
556 fn a_zero_live_window_stops_the_boot_naming_the_key() {556 fn a_zero_live_window_stops_the_boot_naming_the_key() {
557 let problem = Config::parse(557 let problem = Config::parse(
558- "database = \"izlek.db\"\nlive_seconds = 0\n",558+ "database = \"iz.db\"\nlive_seconds = 0\n",
559 Path::new("."),559 Path::new("."),
560 false,560 false,
561 )561 )
@@ -575,7 +575,7 @@ mod tests {
575 /// A file that never mentions the key still boots, on the default.575 /// A file that never mentions the key still boots, on the default.
576 #[test]576 #[test]
577 fn a_file_without_a_live_window_takes_the_default() {577 fn a_file_without_a_live_window_takes_the_default() {
578- let config = Config::parse("database = \"izlek.db\"\n", Path::new("."), false).unwrap();578+ let config = Config::parse("database = \"iz.db\"\n", Path::new("."), false).unwrap();
579 assert_eq!(config.live_seconds, 300);579 assert_eq!(config.live_seconds, 300);
580 }580 }
581 581
@@ -592,7 +592,7 @@ mod tests {
592 assert_eq!(problem, ConfigError::Missing("database"));592 assert_eq!(problem, ConfigError::Missing("database"));
593 let said = problem.to_string();593 let said = problem.to_string();
594 assert!(said.contains("database"), "{said}");594 assert!(said.contains("database"), "{said}");
595- assert!(said.contains("izlek.toml"), "{said}");595+ assert!(said.contains("iz.toml"), "{said}");
596 }596 }
597 597
598 #[test]598 #[test]
@@ -603,15 +603,15 @@ mod tests {
603 matches!(problem, ConfigError::Unparseable { .. }),603 matches!(problem, ConfigError::Unparseable { .. }),
604 "{problem:?}"604 "{problem:?}"
605 );605 );
606- assert!(problem.to_string().contains("izlek.toml"));606+ assert!(problem.to_string().contains("iz.toml"));
607 }607 }
608 608
609 #[test]609 #[test]
610 fn a_relative_database_is_reported_absolute() {610 fn a_relative_database_is_reported_absolute() {
611 let dir = scratch();611 let dir = scratch();
612- let config = Config::parse("database = \"state/izlek.db\"\n", &dir, false).unwrap();612+ let config = Config::parse("database = \"state/iz.db\"\n", &dir, false).unwrap();
613 assert!(config.database.is_absolute(), "{:?}", config.database);613 assert!(config.database.is_absolute(), "{:?}", config.database);
614- assert!(config.database.ends_with("izlek.db"));614+ assert!(config.database.ends_with("iz.db"));
615 let report = config.report().join("\n");615 let report = config.report().join("\n");
616 assert!(616 assert!(
617 report.contains(&config.database.display().to_string()),617 report.contains(&config.database.display().to_string()),
@@ -625,14 +625,14 @@ mod tests {
625 #[test]625 #[test]
626 fn a_file_without_listen_takes_the_default() {626 fn a_file_without_listen_takes_the_default() {
627 let config =627 let config =
628- Config::parse("database = \"/srv/izlek.db\"\n", Path::new("."), false).unwrap();628+ Config::parse("database = \"/srv/iz.db\"\n", Path::new("."), false).unwrap();
629 assert_eq!(config.listen, "127.0.0.1:7654".parse().unwrap());629 assert_eq!(config.listen, "127.0.0.1:7654".parse().unwrap());
630 }630 }
631 631
632 #[test]632 #[test]
633 fn an_unparseable_listen_stops_the_boot_naming_the_key() {633 fn an_unparseable_listen_stops_the_boot_naming_the_key() {
634 let problem = Config::parse(634 let problem = Config::parse(
635- "database = \"/srv/izlek.db\"\nlisten = \"not an address\"\n",635+ "database = \"/srv/iz.db\"\nlisten = \"not an address\"\n",
636 Path::new("."),636 Path::new("."),
637 false,637 false,
638 )638 )
@@ -649,7 +649,7 @@ mod tests {
649 fn the_mail_fallback_is_the_address_the_server_binds() {649 fn the_mail_fallback_is_the_address_the_server_binds() {
650 let url = |listen: &str| {650 let url = |listen: &str| {
651 Config::parse(651 Config::parse(
652- &format!("database = \"/srv/izlek.db\"\nlisten = \"{listen}\"\n"),652+ &format!("database = \"/srv/iz.db\"\nlisten = \"{listen}\"\n"),
653 Path::new("."),653 Path::new("."),
654 false,654 false,
655 )655 )
@@ -677,7 +677,7 @@ mod tests {
677 #[test]677 #[test]
678 fn keys_nothing_reads_are_named_rather_than_obeyed() {678 fn keys_nothing_reads_are_named_rather_than_obeyed() {
679 let config = Config::parse(679 let config = Config::parse(
680- "database = \"/srv/izlek.db\"\nbase_url = \"https://izlek.sh\"\n\680+ "database = \"/srv/iz.db\"\nbase_url = \"https://iz.sh\"\n\
681 smtp_password = \"hunter2-and-then-some\"\n",681 smtp_password = \"hunter2-and-then-some\"\n",
682 Path::new("."),682 Path::new("."),
683 false,683 false,
crates/izlek-core/src/detail.rs → crates/iz-core/src/detail.rsrenamed+0 -0
crates/izlek-core/src/lib.rs → crates/iz-core/src/lib.rsrenamed+1 -1
@@ -1,4 +1,4 @@
1-//! Domain model and storage for İzlek.1+//! Domain model and storage for İz.
2 //!2 //!
3 //! The vocabulary — roles and record shapes — compiles everywhere, so the UI3 //! The vocabulary — roles and record shapes — compiles everywhere, so the UI
4 //! and the server speak the same types. The `server` feature adds the halves4 //! and the server speak the same types. The `server` feature adds the halves
crates/izlek-core/src/live.rs → crates/iz-core/src/live.rsrenamed+0 -0
crates/izlek-core/src/mail.rs → crates/iz-core/src/mail.rsrenamed+4 -4
@@ -9,7 +9,7 @@
9 //!9 //!
10 //! Nobody is ever mailed about their own action. A rule's audience is resolved10 //! Nobody is ever mailed about their own action. A rule's audience is resolved
11 //! and the person who did the thing is taken off it, on every audience, always:11 //! and the person who did the thing is taken off it, on every audience, always:
12-//! three people on one board do not need İzlek telling each of them what they12+//! three people on one board do not need İz telling each of them what they
13 //! themselves just did. A rule whose audience is only the actor sends nothing13 //! themselves just did. A rule whose audience is only the actor sends nothing
14 //! and owes nothing — that is not a failure and does not appear as one.14 //! and owes nothing — that is not a failure and does not appear as one.
15 //!15 //!
@@ -186,8 +186,8 @@ impl Engine {
186 pub async fn send_test(&self, to: &str) -> std::result::Result<Duration, MailError> {186 pub async fn send_test(&self, to: &str) -> std::result::Result<Duration, MailError> {
187 let mail = Outgoing {187 let mail = Outgoing {
188 to: to.to_string(),188 to: to.to_string(),
189- subject: "İzlek test mail".to_string(),189+ subject: "İz test mail".to_string(),
190- body: "Somebody pressed the test button in İzlek's settings, and this \190+ body: "Somebody pressed the test button in İz's settings, and this \
191 is what came out. Nothing else was sent, and nobody else was \191 is what came out. Nothing else was sent, and nobody else was \
192 written to.\n"192 written to.\n"
193 .to_string(),193 .to_string(),
@@ -557,7 +557,7 @@ impl Engine {
557 .await?;557 .await?;
558 return Ok(());558 return Ok(());
559 }559 }
560- // The workspace's quiet window. Zero is what İzlek did before it had560+ // The workspace's quiet window. Zero is what İz did before it had
561 // one: every trigger its own mail, sent as soon as it is owed.561 // one: every trigger its own mail, sent as soon as it is owed.
562 let window = self562 let window = self
563 .store563 .store
crates/izlek-core/src/role.rs → crates/iz-core/src/role.rsrenamed+0 -0
crates/izlek-core/src/store/mod.rs → crates/iz-core/src/store/mod.rsrenamed+0 -0
crates/izlek-core/src/store/reconcile.rs → crates/iz-core/src/store/reconcile.rsrenamed+12 -12
@@ -1077,26 +1077,26 @@ mod tests {
1077 1077
1078 #[test]1078 #[test]
1079 fn backup_name_has_no_colons_or_spaces() {1079 fn backup_name_has_no_colons_or_spaces() {
1080- let name = backup_name("/tmp/izlek.db").unwrap();1080+ let name = backup_name("/tmp/iz.db").unwrap();
1081- assert!(name.starts_with("/tmp/izlek.db.backup-"));1081+ assert!(name.starts_with("/tmp/iz.db.backup-"));
1082 assert!(!name.contains(':'));1082 assert!(!name.contains(':'));
1083 assert!(!name.contains(' '));1083 assert!(!name.contains(' '));
1084 }1084 }
1085 1085
1086 #[test]1086 #[test]
1087 fn backup_name_avoids_collision() {1087 fn backup_name_avoids_collision() {
1088- let first = backup_name("/tmp/izlek.db").unwrap();1088+ let first = backup_name("/tmp/iz.db").unwrap();
1089 std::fs::File::create(&first).unwrap();1089 std::fs::File::create(&first).unwrap();
1090- let second = backup_name("/tmp/izlek.db").unwrap();1090+ let second = backup_name("/tmp/iz.db").unwrap();
1091 assert_ne!(first, second);1091 assert_ne!(first, second);
1092 std::fs::remove_file(&first).unwrap();1092 std::fs::remove_file(&first).unwrap();
1093 }1093 }
1094 1094
1095 #[tokio::test]1095 #[tokio::test]
1096 async fn validate_maps_refuses_a_declared_table_without_a_map() {1096 async fn validate_maps_refuses_a_declared_table_without_a_map() {
1097- let dir = std::env::temp_dir().join(format!("izlek-validate-{}", Ulid::new()));1097+ let dir = std::env::temp_dir().join(format!("iz-validate-{}", Ulid::new()));
1098 std::fs::create_dir_all(&dir).unwrap();1098 std::fs::create_dir_all(&dir).unwrap();
1099- let path = dir.join("izlek.db").to_str().unwrap().to_string();1099+ let path = dir.join("iz.db").to_str().unwrap().to_string();
1100 let db = Builder::new_local(&path).build().await.unwrap();1100 let db = Builder::new_local(&path).build().await.unwrap();
1101 let conn = db.connect().unwrap();1101 let conn = db.connect().unwrap();
1102 conn.execute_batch(SCHEMA).await.unwrap();1102 conn.execute_batch(SCHEMA).await.unwrap();
@@ -1147,14 +1147,14 @@ mod tests {
1147 conn.execute(1147 conn.execute(
1148 "INSERT INTO user (id, workspace_id, email, display_name, role, photo_mime, photo, \1148 "INSERT INTO user (id, workspace_id, email, display_name, role, photo_mime, photo, \
1149 created_at) \1149 created_at) \
1150- VALUES ('U1', 'W1', 'one@izlek.sh', 'One', 'admin', 'image/png', ?1, ?2)",1150+ VALUES ('U1', 'W1', 'one@iz.sh', 'One', 'admin', 'image/png', ?1, ?2)",
1151 params![&photo_bytes[..], now],1151 params![&photo_bytes[..], now],
1152 )1152 )
1153 .await1153 .await
1154 .unwrap();1154 .unwrap();
1155 conn.execute(1155 conn.execute(
1156 "INSERT INTO user (id, workspace_id, email, display_name, role, created_at) \1156 "INSERT INTO user (id, workspace_id, email, display_name, role, created_at) \
1157- VALUES ('U2', 'W1', 'two@izlek.sh', 'Two', 'member', ?1)",1157+ VALUES ('U2', 'W1', 'two@iz.sh', 'Two', 'member', ?1)",
1158 params![now],1158 params![now],
1159 )1159 )
1160 .await1160 .await
@@ -1211,9 +1211,9 @@ mod tests {
1211 /// column any more.1211 /// column any more.
1212 #[tokio::test]1212 #[tokio::test]
1213 async fn an_old_shaped_database_extracts_its_blobs_to_the_storage_dir() {1213 async fn an_old_shaped_database_extracts_its_blobs_to_the_storage_dir() {
1214- let dir = std::env::temp_dir().join(format!("izlek-reconcile-{}", Ulid::new()));1214+ let dir = std::env::temp_dir().join(format!("iz-reconcile-{}", Ulid::new()));
1215 std::fs::create_dir_all(&dir).unwrap();1215 std::fs::create_dir_all(&dir).unwrap();
1216- let path = dir.join("izlek.db").to_str().unwrap().to_string();1216+ let path = dir.join("iz.db").to_str().unwrap().to_string();
1217 let (attachment_bytes, photo_bytes) = old_shape_database(&path).await;1217 let (attachment_bytes, photo_bytes) = old_shape_database(&path).await;
1218 1218
1219 let storage = dir.join("storage");1219 let storage = dir.join("storage");
@@ -1260,9 +1260,9 @@ mod tests {
1260 /// leaves the original file in place with nothing staged beside it.1260 /// leaves the original file in place with nothing staged beside it.
1261 #[tokio::test]1261 #[tokio::test]
1262 async fn a_rebuild_without_storage_refuses_to_drop_blobs() {1262 async fn a_rebuild_without_storage_refuses_to_drop_blobs() {
1263- let dir = std::env::temp_dir().join(format!("izlek-reconcile-{}", Ulid::new()));1263+ let dir = std::env::temp_dir().join(format!("iz-reconcile-{}", Ulid::new()));
1264 std::fs::create_dir_all(&dir).unwrap();1264 std::fs::create_dir_all(&dir).unwrap();
1265- let path = dir.join("izlek.db").to_str().unwrap().to_string();1265+ let path = dir.join("iz.db").to_str().unwrap().to_string();
1266 old_shape_database(&path).await;1266 old_shape_database(&path).await;
1267 1267
1268 let err = reconcile(1268 let err = reconcile(
crates/izlek-core/src/store/schema.rs → crates/iz-core/src/store/schema.rsrenamed+0 -0
crates/izlek-core/src/store/secret.rs → crates/iz-core/src/store/secret.rsrenamed+3 -3
@@ -5,7 +5,7 @@
5 //! file — a backup, a snapshot, an `scp` by someone who should not have had5 //! file — a backup, a snapshot, an `scp` by someone who should not have had
6 //! it — carries the plaintext right along with it. This module is the fix:6 //! it — carries the plaintext right along with it. This module is the fix:
7 //! the column holds ciphertext, and the key that opens it lives in a second7 //! the column holds ciphertext, and the key that opens it lives in a second
8-//! file (`izlek.key`, beside the database) that a database backup does not8+//! file (`iz.key`, beside the database) that a database backup does not
9 //! automatically include.9 //! automatically include.
10 //!10 //!
11 //! The envelope is `v1:` followed by base64 of a 24-byte XChaCha20-Poly130511 //! The envelope is `v1:` followed by base64 of a 24-byte XChaCha20-Poly1305
@@ -172,9 +172,9 @@ mod tests {
172 172
173 #[test]173 #[test]
174 fn load_or_create_key_persists_and_restricts() {174 fn load_or_create_key_persists_and_restricts() {
175- let dir = std::env::temp_dir().join(format!("izlek-key-test-{}", unique_suffix()));175+ let dir = std::env::temp_dir().join(format!("iz-key-test-{}", unique_suffix()));
176 std::fs::create_dir_all(&dir).unwrap();176 std::fs::create_dir_all(&dir).unwrap();
177- let path = dir.join("izlek.key");177+ let path = dir.join("iz.key");
178 let first = load_or_create_key(&path).unwrap();178 let first = load_or_create_key(&path).unwrap();
179 let second = load_or_create_key(&path).unwrap();179 let second = load_or_create_key(&path).unwrap();
180 assert_eq!(first, second, "a second open reuses the same key");180 assert_eq!(first, second, "a second open reuses the same key");
crates/izlek-core/src/store/sniff.rs → crates/iz-core/src/store/sniff.rsrenamed+0 -0
crates/izlek-core/src/store/turso_store.rs → crates/iz-core/src/store/turso_store.rsrenamed+18 -18
@@ -3,7 +3,7 @@
3 //! Turso is in-process and SQLite-compatible, so the schema is plain SQL and3 //! Turso is in-process and SQLite-compatible, so the schema is plain SQL and
4 //! there is no server to run alongside the binary. It ships no migration runner4 //! there is no server to run alongside the binary. It ships no migration runner
5 //! of its own; [`TursoStore::open`] applies the numbered files in5 //! of its own; [`TursoStore::open`] applies the numbered files in
6-//! `crates/izlek-core/migrations` at boot and records the version.6+//! `crates/iz-core/migrations` at boot and records the version.
7 7
8 use async_trait::async_trait;8 use async_trait::async_trait;
9 use rand::Rng;9 use rand::Rng;
@@ -799,7 +799,7 @@ async fn recipients_from(rows: &mut turso::Rows) -> Result<Vec<Recipient>> {
799 }799 }
800 800
801 /// `path` with its file name suffixed, for the WAL/SHM files Turso may leave801 /// `path` with its file name suffixed, for the WAL/SHM files Turso may leave
802-/// beside the main one (`izlek.db-wal`, `izlek.db-shm`).802+/// beside the main one (`iz.db-wal`, `iz.db-shm`).
803 fn sibling(path: &str, suffix: &str) -> std::path::PathBuf {803 fn sibling(path: &str, suffix: &str) -> std::path::PathBuf {
804 let mut name = std::path::Path::new(path)804 let mut name = std::path::Path::new(path)
805 .file_name()805 .file_name()
@@ -948,7 +948,7 @@ fn load_key(path: &str) -> Result<secret::Key> {
948 .parent()948 .parent()
949 .filter(|d| !d.as_os_str().is_empty())949 .filter(|d| !d.as_os_str().is_empty())
950 .unwrap_or_else(|| std::path::Path::new("."));950 .unwrap_or_else(|| std::path::Path::new("."));
951- secret::load_or_create_key(&dir.join("izlek.key")).map_err(backend)951+ secret::load_or_create_key(&dir.join("iz.key")).map_err(backend)
952 }952 }
953 953
954 fn backend<E: std::fmt::Display>(e: E) -> StoreError {954 fn backend<E: std::fmt::Display>(e: E) -> StoreError {
@@ -1404,7 +1404,7 @@ impl Store for TursoStore {
1404 None => return Err(StoreError::NotFound),1404 None => return Err(StoreError::NotFound),
1405 };1405 };
1406 // A decrypt failure — wrong key, damaged ciphertext, a restored1406 // A decrypt failure — wrong key, damaged ciphertext, a restored
1407- // backup missing its `izlek.key` — comes back as `None` rather than1407+ // backup missing its `iz.key` — comes back as `None` rather than
1408 // an error. To every caller that is indistinguishable from a1408 // an error. To every caller that is indistinguishable from a
1409 // workspace that never had a sender, which is the intended1409 // workspace that never had a sender, which is the intended
1410 // degradation: mail send falls back to the no-sender path instead of1410 // degradation: mail send falls back to the no-sender path instead of
@@ -5179,7 +5179,7 @@ mod probe {
5179 5179
5180 #[tokio::test]5180 #[tokio::test]
5181 async fn durability_defaults_are_recorded() {5181 async fn durability_defaults_are_recorded() {
5182- let dir = std::env::temp_dir().join(format!("izlek-probe-{}", Ulid::new()));5182+ let dir = std::env::temp_dir().join(format!("iz-probe-{}", Ulid::new()));
5183 std::fs::create_dir_all(&dir).unwrap();5183 std::fs::create_dir_all(&dir).unwrap();
5184 let path = dir.join("probe.db");5184 let path = dir.join("probe.db");
5185 let db = Builder::new_local(path.to_str().unwrap())5185 let db = Builder::new_local(path.to_str().unwrap())
@@ -5197,7 +5197,7 @@ mod probe {
5197 5197
5198 #[tokio::test]5198 #[tokio::test]
5199 async fn concurrent_writers_on_one_database() {5199 async fn concurrent_writers_on_one_database() {
5200- let dir = std::env::temp_dir().join(format!("izlek-probe-{}", Ulid::new()));5200+ let dir = std::env::temp_dir().join(format!("iz-probe-{}", Ulid::new()));
5201 std::fs::create_dir_all(&dir).unwrap();5201 std::fs::create_dir_all(&dir).unwrap();
5202 let path = dir.join("probe.db");5202 let path = dir.join("probe.db");
5203 let db = Builder::new_local(path.to_str().unwrap())5203 let db = Builder::new_local(path.to_str().unwrap())
@@ -5240,7 +5240,7 @@ mod probe {
5240 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]5240 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
5241 async fn two_database_handles_on_one_file() {5241 async fn two_database_handles_on_one_file() {
5242 // Two handles on the same file is the shape a second process takes.5242 // Two handles on the same file is the shape a second process takes.
5243- let dir = std::env::temp_dir().join(format!("izlek-probe-{}", Ulid::new()));5243+ let dir = std::env::temp_dir().join(format!("iz-probe-{}", Ulid::new()));
5244 std::fs::create_dir_all(&dir).unwrap();5244 std::fs::create_dir_all(&dir).unwrap();
5245 let path = dir.join("probe.db");5245 let path = dir.join("probe.db");
5246 let p = path.to_str().unwrap().to_string();5246 let p = path.to_str().unwrap().to_string();
@@ -5313,15 +5313,15 @@ mod probe {
5313 /// is asserted against the real query rather than against a comment.5313 /// is asserted against the real query rather than against a comment.
5314 #[tokio::test]5314 #[tokio::test]
5315 async fn the_workspace_read_path_cannot_carry_the_password() {5315 async fn the_workspace_read_path_cannot_carry_the_password() {
5316- let dir = std::env::temp_dir().join(format!("izlek-sender-{}", Ulid::new()));5316+ let dir = std::env::temp_dir().join(format!("iz-sender-{}", Ulid::new()));
5317 std::fs::create_dir_all(&dir).unwrap();5317 std::fs::create_dir_all(&dir).unwrap();
5318- let store = TursoStore::open(dir.join("izlek.db").to_str().unwrap(), &dir.join("storage"))5318+ let store = TursoStore::open(dir.join("iz.db").to_str().unwrap(), &dir.join("storage"))
5319 .await5319 .await
5320 .unwrap();5320 .unwrap();
5321 use crate::store::Store as _;5321 use crate::store::Store as _;
5322 5322
5323 let (ws, _admin) = store5323 let (ws, _admin) = store
5324- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "hash")5324+ .claim_workspace("İz", "ada@iz.sh", "Ada", "hash")
5325 .await5325 .await
5326 .unwrap();5326 .unwrap();
5327 store5327 store
@@ -5330,10 +5330,10 @@ mod probe {
5330 NewSender {5330 NewSender {
5331 host: "smtp.fastmail.com".into(),5331 host: "smtp.fastmail.com".into(),
5332 port: 587,5332 port: 587,
5333- username: "izlek".into(),5333+ username: "iz".into(),
5334 password: Some("hunter2-and-then-some".into()),5334 password: Some("hunter2-and-then-some".into()),
5335- from_name: "İzlek".into(),5335+ from_name: "İz".into(),
5336- from_address: "izlek@izlek.sh".into(),5336+ from_address: "iz@iz.sh".into(),
5337 },5337 },
5338 )5338 )
5339 .await5339 .await
@@ -5382,7 +5382,7 @@ mod storage_fs {
5382 async fn open() -> Self {5382 async fn open() -> Self {
5383 let dir = tempfile::tempdir().unwrap();5383 let dir = tempfile::tempdir().unwrap();
5384 let store = TursoStore::open(5384 let store = TursoStore::open(
5385- dir.path().join("izlek.db").to_str().unwrap(),5385+ dir.path().join("iz.db").to_str().unwrap(),
5386 &dir.path().join("storage"),5386 &dir.path().join("storage"),
5387 )5387 )
5388 .await5388 .await
@@ -5398,7 +5398,7 @@ mod storage_fs {
5398 async fn with_task(&self) -> (String, String, String) {5398 async fn with_task(&self) -> (String, String, String) {
5399 let (ws, admin) = self5399 let (ws, admin) = self
5400 .store5400 .store
5401- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "hash")5401+ .claim_workspace("İz", "ada@iz.sh", "Ada", "hash")
5402 .await5402 .await
5403 .unwrap();5403 .unwrap();
5404 let admin = admin.id;5404 let admin = admin.id;
@@ -5539,7 +5539,7 @@ mod storage_fs {
5539 // A reopen is a boot; the sweep runs inside it.5539 // A reopen is a boot; the sweep runs inside it.
5540 let Fixture { store, dir } = fx;5540 let Fixture { store, dir } = fx;
5541 drop(store);5541 drop(store);
5542- let db_path = dir.path().join("izlek.db").to_str().unwrap().to_string();5542+ let db_path = dir.path().join("iz.db").to_str().unwrap().to_string();
5543 let storage = dir.path().join("storage");5543 let storage = dir.path().join("storage");
5544 let store = TursoStore::open(&db_path, &storage).await.unwrap();5544 let store = TursoStore::open(&db_path, &storage).await.unwrap();
5545 assert_eq!(std::fs::read_dir(&attachments).unwrap().count(), 0);5545 assert_eq!(std::fs::read_dir(&attachments).unwrap().count(), 0);
@@ -5575,7 +5575,7 @@ mod storage_fs {
5575 5575
5576 let Fixture { store, dir } = fx;5576 let Fixture { store, dir } = fx;
5577 drop(store);5577 drop(store);
5578- let db_path = dir.path().join("izlek.db").to_str().unwrap().to_string();5578+ let db_path = dir.path().join("iz.db").to_str().unwrap().to_string();
5579 let storage = dir.path().join("storage");5579 let storage = dir.path().join("storage");
5580 let store = TursoStore::open(&db_path, &storage).await.unwrap();5580 let store = TursoStore::open(&db_path, &storage).await.unwrap();
5581 // Both rows survive the sweep; the reads answer "nothing to serve".5581 // Both rows survive the sweep; the reads answer "nothing to serve".
@@ -5609,7 +5609,7 @@ mod storage_fs {
5609 .unwrap();5609 .unwrap();
5610 let Fixture { store, dir } = fx;5610 let Fixture { store, dir } = fx;
5611 drop(store);5611 drop(store);
5612- let db_path = dir.path().join("izlek.db").to_str().unwrap().to_string();5612+ let db_path = dir.path().join("iz.db").to_str().unwrap().to_string();
5613 let storage = dir.path().join("storage");5613 let storage = dir.path().join("storage");
5614 let store = TursoStore::open(&db_path, &storage).await.unwrap();5614 let store = TursoStore::open(&db_path, &storage).await.unwrap();
5615 assert_eq!(5615 assert_eq!(
crates/izlek-core/tests/fixtures/pre-collapse/0001_init.sql → crates/iz-core/tests/fixtures/pre-collapse/0001_init.sqlrenamed+5 -5
@@ -1,4 +1,4 @@
1--- Izlek's schema, whole, in one file.1+-- Iz's schema, whole, in one file.
2 --2 --
3 -- Plain versioned SQL applied at boot: Turso has no migration runner of its3 -- Plain versioned SQL applied at boot: Turso has no migration runner of its
4 -- own, and keeping the schema as SQL is what makes the store trait swappable.4 -- own, and keeping the schema as SQL is what makes the store trait swappable.
@@ -11,7 +11,7 @@
11 -- database it describes is recreated — twenty migrations were collapsed into11 -- database it describes is recreated — twenty migrations were collapsed into
12 -- this file once for that reason, and a twenty-first would start the same rot12 -- this file once for that reason, and a twenty-first would start the same rot
13 -- over. The reasoning the old migrations carried is kept, on the tables it13 -- over. The reasoning the old migrations carried is kept, on the tables it
14--- explains. The day Izlek runs somewhere with data worth keeping, the next14+-- explains. The day Iz runs somewhere with data worth keeping, the next
15 -- change becomes 0002 and this note goes away.15 -- change becomes 0002 and this note goes away.
16 16
17 CREATE TABLE workspace (17 CREATE TABLE workspace (
@@ -33,7 +33,7 @@ CREATE TABLE workspace (
33 -- `smtp_password` holds ciphertext, never the typed string. The server33 -- `smtp_password` holds ciphertext, never the typed string. The server
34 -- has to present the password to the mail host on every send, so a34 -- has to present the password to the mail host on every send, so a
35 -- one-way hash is impossible; instead `store::secret` seals it under a35 -- one-way hash is impossible; instead `store::secret` seals it under a
36- -- key kept in `izlek.key` beside this file, so a database copied for a36+ -- key kept in `iz.key` beside this file, so a database copied for a
37 -- backup does not carry a working credential with it. No field on37 -- backup does not carry a working credential with it. No field on
38 -- `Workspace` exposes it — it is written by `Store::set_sender` and read38 -- `Workspace` exposes it — it is written by `Store::set_sender` and read
39 -- by `Store::smtp_password`, which only the mailer calls.39 -- by `Store::smtp_password`, which only the mailer calls.
@@ -54,7 +54,7 @@ CREATE TABLE workspace (
54 -- The address mail links point at, when the one the process was54 -- The address mail links point at, when the one the process was
55 -- configured with is not the one people reach. A box behind a proxy55 -- configured with is not the one people reach. A box behind a proxy
56 -- answers on localhost and is known by a public name, and only an admin56 -- answers on localhost and is known by a public name, and only an admin
57- -- knows which — so it is workspace content, and `config/izlek.toml`'s57+ -- knows which — so it is workspace content, and `config/iz.toml`'s
58 -- `base_url` is what an empty one falls back to.58 -- `base_url` is what an empty one falls back to.
59 public_url TEXT59 public_url TEXT
60 );60 );
@@ -226,7 +226,7 @@ CREATE INDEX comment_by_task ON comment(task_id);
226 226
227 -- Attachments live in the database file, not on disk beside it.227 -- Attachments live in the database file, not on disk beside it.
228 --228 --
229--- Izlek is one process over one file, and a second place to keep state is a229+-- Iz is one process over one file, and a second place to keep state is a
230 -- second thing to back up, to lock, and to get out of step with the rows that230 -- second thing to back up, to lock, and to get out of step with the rows that
231 -- name it. And a path is exactly where an uploaded file name must never end231 -- name it. And a path is exactly where an uploaded file name must never end
232 -- up: `../../etc` is a valid file name and a terrible path. Keeping the bytes232 -- up: `../../etc` is a valid file name and a terrible path. Keeping the bytes
crates/izlek-core/tests/fixtures/pre-collapse/0002_sender_check.sql → crates/iz-core/tests/fixtures/pre-collapse/0002_sender_check.sqlrenamed+0 -0
crates/izlek-core/tests/store.rs → crates/iz-core/tests/store.rsrenamed+464 -464

Diff too large; view file

@@ -1,4 +1,4 @@
1-//! Integration tests for izlek-core: the storage boundary driven through the1+//! Integration tests for iz-core: the storage boundary driven through the
2 //! Turso implementation, and the account flows on top of it.2 //! Turso implementation, and the account flows on top of it.
3 //!3 //!
4 //! New integration tests belong in this file rather than a new `tests/*.rs`:4 //! New integration tests belong in this file rather than a new `tests/*.rs`:
@@ -6,9 +6,9 @@
6 6
7 use std::path::PathBuf;7 use std::path::PathBuf;
8 8
9-use izlek_core::Role;9+use iz_core::Role;
10-use izlek_core::auth::{Token, hash_password};10+use iz_core::auth::{Token, hash_password};
11-use izlek_core::store::{11+use iz_core::store::{
12 Audience, Event, MailOutcome, MailRule, NewAttachment, NewSender, NewUser, SendKind, SendState,12 Audience, Event, MailOutcome, MailRule, NewAttachment, NewSender, NewUser, SendKind, SendState,
13 Store, StoreError, Trigger, TursoStore, User,13 Store, StoreError, Trigger, TursoStore, User,
14 };14 };
@@ -25,10 +25,10 @@ struct Scratch {
25 25
26 impl Scratch {26 impl Scratch {
27 async fn open() -> Self {27 async fn open() -> Self {
28- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));28+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
29 std::fs::create_dir_all(&dir).unwrap();29 std::fs::create_dir_all(&dir).unwrap();
30 let storage = dir.join("storage");30 let storage = dir.join("storage");
31- let store = TursoStore::open(dir.join("izlek.db").to_str().unwrap(), &storage)31+ let store = TursoStore::open(dir.join("iz.db").to_str().unwrap(), &storage)
32 .await32 .await
33 .unwrap();33 .unwrap();
34 Self { dir, storage, store }34 Self { dir, storage, store }
@@ -39,7 +39,7 @@ impl Scratch {
39 /// need to see a column the way it actually sits on disk rather than through39 /// need to see a column the way it actually sits on disk rather than through
40 /// [`Store`]'s API.40 /// [`Store`]'s API.
41 async fn raw_conn(scratch: &Scratch) -> turso::Connection {41 async fn raw_conn(scratch: &Scratch) -> turso::Connection {
42- let db = turso::Builder::new_local(scratch.dir.join("izlek.db").to_str().unwrap())42+ let db = turso::Builder::new_local(scratch.dir.join("iz.db").to_str().unwrap())
43 .build()43 .build()
44 .await44 .await
45 .unwrap();45 .unwrap();
@@ -57,8 +57,8 @@ async fn workspace_with_admin() -> (Scratch, String, String) {
57 let (ws, admin) = scratch57 let (ws, admin) = scratch
58 .store58 .store
59 .claim_workspace(59 .claim_workspace(
60- "İzlek",60+ "İz",
61- "ada@izlek.sh",61+ "ada@iz.sh",
62 "Ada",62 "Ada",
63 &hash_password("tide-tables-1892").unwrap(),63 &hash_password("tide-tables-1892").unwrap(),
64 )64 )
@@ -72,8 +72,8 @@ async fn workspace_with_admin() -> (Scratch, String, String) {
72 async fn claim(store: &TursoStore) -> (String, String) {72 async fn claim(store: &TursoStore) -> (String, String) {
73 let (ws, admin) = store73 let (ws, admin) = store
74 .claim_workspace(74 .claim_workspace(
75- "İzlek",75+ "İz",
76- "ada@izlek.sh",76+ "ada@iz.sh",
77 "Ada",77 "Ada",
78 &hash_password("tide-tables-1892").unwrap(),78 &hash_password("tide-tables-1892").unwrap(),
79 )79 )
@@ -98,9 +98,9 @@ async fn member(store: &TursoStore, workspace_id: &str, email: &str, name: &str)
98 98
99 #[tokio::test]99 #[tokio::test]
100 async fn the_schema_is_created_once_and_survives_reopen() {100 async fn the_schema_is_created_once_and_survives_reopen() {
101- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));101+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
102 std::fs::create_dir_all(&dir).unwrap();102 std::fs::create_dir_all(&dir).unwrap();
103- let path = dir.join("izlek.db").to_string_lossy().into_owned();103+ let path = dir.join("iz.db").to_string_lossy().into_owned();
104 104
105 let first = TursoStore::open(&path, &dir.join("storage")).await.unwrap();105 let first = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
106 claim(&first).await;106 claim(&first).await;
@@ -110,7 +110,7 @@ async fn the_schema_is_created_once_and_survives_reopen() {
110 // schema (its CREATE TABLE would fail on the first one) and must not110 // schema (its CREATE TABLE would fail on the first one) and must not
111 // lose what the first open wrote.111 // lose what the first open wrote.
112 let second = TursoStore::open(&path, &dir.join("storage")).await.unwrap();112 let second = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
113- assert_eq!(second.workspace().await.unwrap().unwrap().name, "İzlek");113+ assert_eq!(second.workspace().await.unwrap().unwrap().name, "İz");
114 drop(second);114 drop(second);
115 let _ = std::fs::remove_dir_all(&dir);115 let _ = std::fs::remove_dir_all(&dir);
116 }116 }
@@ -352,7 +352,7 @@ async fn a_parent_does_not_finish_before_its_subtasks_do() {
352 !detail352 !detail
353 .activity353 .activity
354 .iter()354 .iter()
355- .any(|entry| matches!(entry.kind, izlek_core::detail::ActivityKind::Moved)),355+ .any(|entry| matches!(entry.kind, iz_core::detail::ActivityKind::Moved)),
356 "a held move leaves no trail"356 "a held move leaves no trail"
357 );357 );
358 358
@@ -476,7 +476,7 @@ async fn the_board_counts_subtasks_instead_of_carding_them() {
476 let (parent, child) = a_parent_and_one_subtask(&scratch.store, &workspace, &admin).await;476 let (parent, child) = a_parent_and_one_subtask(&scratch.store, &workspace, &admin).await;
477 477
478 let board = load(&scratch.store, &workspace).await.unwrap().unwrap();478 let board = load(&scratch.store, &workspace).await.unwrap().unwrap();
479- let cards: Vec<&izlek_core::board::TaskCard> =479+ let cards: Vec<&iz_core::board::TaskCard> =
480 board.columns.iter().flat_map(|c| &c.cards).collect();480 board.columns.iter().flat_map(|c| &c.cards).collect();
481 assert_eq!(cards.len(), 1, "the subtask took a card of its own");481 assert_eq!(cards.len(), 1, "the subtask took a card of its own");
482 assert_eq!(cards[0].id, parent);482 assert_eq!(cards[0].id, parent);
@@ -681,7 +681,7 @@ async fn a_second_claim_loses_and_changes_nothing() {
681 // The loser must not have joined as anything at all.681 // The loser must not have joined as anything at all.
682 assert_eq!(682 assert_eq!(
683 scratch.store.workspace().await.unwrap().unwrap().name,683 scratch.store.workspace().await.unwrap().unwrap().name,
684- "İzlek"684+ "İz"
685 );685 );
686 assert_eq!(scratch.store.count_users("").await.unwrap(), 0);686 assert_eq!(scratch.store.count_users("").await.unwrap(), 0);
687 let ws_id = scratch.store.workspace().await.unwrap().unwrap().id;687 let ws_id = scratch.store.workspace().await.unwrap().unwrap().id;
@@ -698,9 +698,9 @@ async fn a_second_claim_loses_and_changes_nothing() {
698 698
699 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]699 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
700 async fn concurrent_claims_produce_exactly_one_admin() {700 async fn concurrent_claims_produce_exactly_one_admin() {
701- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));701+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
702 std::fs::create_dir_all(&dir).unwrap();702 std::fs::create_dir_all(&dir).unwrap();
703- let path = dir.join("izlek.db").to_string_lossy().into_owned();703+ let path = dir.join("iz.db").to_string_lossy().into_owned();
704 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());704 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());
705 705
706 let hash = hash_password("tide-tables-1892").unwrap();706 let hash = hash_password("tide-tables-1892").unwrap();
@@ -711,8 +711,8 @@ async fn concurrent_claims_produce_exactly_one_admin() {
711 claims.push(tokio::spawn(async move {711 claims.push(tokio::spawn(async move {
712 store712 store
713 .claim_workspace(713 .claim_workspace(
714- "İzlek",714+ "İz",
715- &format!("claimant{i}@izlek.sh"),715+ &format!("claimant{i}@iz.sh"),
716 &format!("Claimant {i}"),716 &format!("Claimant {i}"),
717 &hash,717 &hash,
718 )718 )
@@ -751,9 +751,9 @@ async fn concurrent_claims_produce_exactly_one_admin() {
751 /// come back `Ok`, never that error.751 /// come back `Ok`, never that error.
752 #[tokio::test(flavor = "multi_thread", worker_threads = 8)]752 #[tokio::test(flavor = "multi_thread", worker_threads = 8)]
753 async fn many_concurrent_callers_never_see_concurrent_use_forbidden() {753 async fn many_concurrent_callers_never_see_concurrent_use_forbidden() {
754- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));754+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
755 std::fs::create_dir_all(&dir).unwrap();755 std::fs::create_dir_all(&dir).unwrap();
756- let path = dir.join("izlek.db").to_string_lossy().into_owned();756+ let path = dir.join("iz.db").to_string_lossy().into_owned();
757 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());757 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());
758 let (workspace_id, _) = claim(&store).await;758 let (workspace_id, _) = claim(&store).await;
759 759
@@ -791,8 +791,8 @@ async fn workspace_defaults_match_the_settings_screen() {
791 let (ws, _) = scratch791 let (ws, _) = scratch
792 .store792 .store
793 .claim_workspace(793 .claim_workspace(
794- "İzlek",794+ "İz",
795- "ada@izlek.sh",795+ "ada@iz.sh",
796 "Ada",796 "Ada",
797 &hash_password("tide-tables-1892").unwrap(),797 &hash_password("tide-tables-1892").unwrap(),
798 )798 )
@@ -828,10 +828,10 @@ async fn the_workspace_record_carries_the_sender_but_never_its_password() {
828 NewSender {828 NewSender {
829 host: "smtp.fastmail.com".into(),829 host: "smtp.fastmail.com".into(),
830 port: 587,830 port: 587,
831- username: "izlek".into(),831+ username: "iz".into(),
832 password: Some("a-very-secret-string".into()),832 password: Some("a-very-secret-string".into()),
833- from_name: "İzlek".into(),833+ from_name: "İz".into(),
834- from_address: "izlek@izlek.sh".into(),834+ from_address: "iz@iz.sh".into(),
835 },835 },
836 )836 )
837 .await837 .await
@@ -840,9 +840,9 @@ async fn the_workspace_record_carries_the_sender_but_never_its_password() {
840 let ws = scratch.store.workspace().await.unwrap().unwrap();840 let ws = scratch.store.workspace().await.unwrap().unwrap();
841 assert_eq!(ws.smtp_host.as_deref(), Some("smtp.fastmail.com"));841 assert_eq!(ws.smtp_host.as_deref(), Some("smtp.fastmail.com"));
842 assert_eq!(ws.smtp_port, Some(587));842 assert_eq!(ws.smtp_port, Some(587));
843- assert_eq!(ws.smtp_username.as_deref(), Some("izlek"));843+ assert_eq!(ws.smtp_username.as_deref(), Some("iz"));
844- assert_eq!(ws.smtp_from_name.as_deref(), Some("İzlek"));844+ assert_eq!(ws.smtp_from_name.as_deref(), Some("İz"));
845- assert_eq!(ws.smtp_from_address.as_deref(), Some("izlek@izlek.sh"));845+ assert_eq!(ws.smtp_from_address.as_deref(), Some("iz@iz.sh"));
846 assert!(ws.smtp_password_set, "the screen must be able to say 'set'");846 assert!(ws.smtp_password_set, "the screen must be able to say 'set'");
847 847
848 let serialised = serde_json::to_string(&ws).unwrap();848 let serialised = serde_json::to_string(&ws).unwrap();
@@ -861,10 +861,10 @@ async fn a_save_with_no_password_typed_keeps_the_stored_one() {
861 let mut sender = NewSender {861 let mut sender = NewSender {
862 host: "smtp.fastmail.com".into(),862 host: "smtp.fastmail.com".into(),
863 port: 587,863 port: 587,
864- username: "izlek".into(),864+ username: "iz".into(),
865 password: Some("keep-me".into()),865 password: Some("keep-me".into()),
866- from_name: "İzlek".into(),866+ from_name: "İz".into(),
867- from_address: "izlek@izlek.sh".into(),867+ from_address: "iz@iz.sh".into(),
868 };868 };
869 scratch869 scratch
870 .store870 .store
@@ -898,10 +898,10 @@ async fn a_typed_password_replaces_the_stored_one() {
898 let mut sender = NewSender {898 let mut sender = NewSender {
899 host: "smtp.fastmail.com".into(),899 host: "smtp.fastmail.com".into(),
900 port: 587,900 port: 587,
901- username: "izlek".into(),901+ username: "iz".into(),
902 password: Some("the-old-one".into()),902 password: Some("the-old-one".into()),
903- from_name: "İzlek".into(),903+ from_name: "İz".into(),
904- from_address: "izlek@izlek.sh".into(),904+ from_address: "iz@iz.sh".into(),
905 };905 };
906 scratch906 scratch
907 .store907 .store
@@ -935,10 +935,10 @@ async fn the_stored_password_is_not_the_plaintext_on_disk() {
935 NewSender {935 NewSender {
936 host: "smtp.fastmail.com".into(),936 host: "smtp.fastmail.com".into(),
937 port: 587,937 port: 587,
938- username: "izlek".into(),938+ username: "iz".into(),
939 password: Some("a-very-secret-string".into()),939 password: Some("a-very-secret-string".into()),
940- from_name: "İzlek".into(),940+ from_name: "İz".into(),
941- from_address: "izlek@izlek.sh".into(),941+ from_address: "iz@iz.sh".into(),
942 },942 },
943 )943 )
944 .await944 .await
@@ -975,7 +975,7 @@ async fn the_stored_password_is_not_the_plaintext_on_disk() {
975 );975 );
976 }976 }
977 977
978-/// A backup restored without its sibling `izlek.key`, or a key file damaged978+/// A backup restored without its sibling `iz.key`, or a key file damaged
979 /// in place, must not crash mail sending or the settings screen — it has to979 /// in place, must not crash mail sending or the settings screen — it has to
980 /// degrade to "no password set", exactly like a workspace that never had a980 /// degrade to "no password set", exactly like a workspace that never had a
981 /// sender, so the admin can heal it by retyping the password once.981 /// sender, so the admin can heal it by retyping the password once.
@@ -989,10 +989,10 @@ async fn a_password_that_will_not_decrypt_reads_back_as_none() {
989 NewSender {989 NewSender {
990 host: "smtp.fastmail.com".into(),990 host: "smtp.fastmail.com".into(),
991 port: 587,991 port: 587,
992- username: "izlek".into(),992+ username: "iz".into(),
993 password: Some("a-very-secret-string".into()),993 password: Some("a-very-secret-string".into()),
994- from_name: "İzlek".into(),994+ from_name: "İz".into(),
995- from_address: "izlek@izlek.sh".into(),995+ from_address: "iz@iz.sh".into(),
996 },996 },
997 )997 )
998 .await998 .await
@@ -1023,10 +1023,10 @@ async fn a_password_that_will_not_decrypt_reads_back_as_none() {
1023 NewSender {1023 NewSender {
1024 host: "smtp.fastmail.com".into(),1024 host: "smtp.fastmail.com".into(),
1025 port: 587,1025 port: 587,
1026- username: "izlek".into(),1026+ username: "iz".into(),
1027 password: Some("a-fresh-password".into()),1027 password: Some("a-fresh-password".into()),
1028- from_name: "İzlek".into(),1028+ from_name: "İz".into(),
1029- from_address: "izlek@izlek.sh".into(),1029+ from_address: "iz@iz.sh".into(),
1030 },1030 },
1031 )1031 )
1032 .await1032 .await
@@ -1050,8 +1050,8 @@ async fn a_password_that_will_not_decrypt_reads_back_as_none() {
1050 async fn the_database_and_key_file_are_owner_only() {1050 async fn the_database_and_key_file_are_owner_only() {
1051 use std::os::unix::fs::PermissionsExt;1051 use std::os::unix::fs::PermissionsExt;
1052 let scratch = Scratch::open().await;1052 let scratch = Scratch::open().await;
1053- let db_path = scratch.dir.join("izlek.db");1053+ let db_path = scratch.dir.join("iz.db");
1054- let key_path = scratch.dir.join("izlek.key");1054+ let key_path = scratch.dir.join("iz.key");
1055 for path in [&db_path, &key_path] {1055 for path in [&db_path, &key_path] {
1056 let mode = std::fs::metadata(path)1056 let mode = std::fs::metadata(path)
1057 .unwrap_or_else(|e| panic!("{}: {e}", path.display()))1057 .unwrap_or_else(|e| panic!("{}: {e}", path.display()))
@@ -1094,7 +1094,7 @@ async fn an_invited_member_has_no_password_until_they_choose_one() {
1094 .store1094 .store
1095 .create_user(NewUser {1095 .create_user(NewUser {
1096 workspace_id: ws_id.clone(),1096 workspace_id: ws_id.clone(),
1097- email: "grace@izlek.sh".into(),1097+ email: "grace@iz.sh".into(),
1098 display_name: "Grace".into(),1098 display_name: "Grace".into(),
1099 role: Role::Member,1099 role: Role::Member,
1100 invited_by: None,1100 invited_by: None,
@@ -1120,7 +1120,7 @@ async fn addresses_are_unique_and_case_insensitive() {
1120 .store1120 .store
1121 .create_user(NewUser {1121 .create_user(NewUser {
1122 workspace_id: ws_id.clone(),1122 workspace_id: ws_id.clone(),
1123- email: " ADA@Izlek.sh ".into(),1123+ email: " ADA@Iz.sh ".into(),
1124 display_name: "Ada again".into(),1124 display_name: "Ada again".into(),
1125 role: Role::Member,1125 role: Role::Member,
1126 invited_by: None,1126 invited_by: None,
@@ -1130,7 +1130,7 @@ async fn addresses_are_unique_and_case_insensitive() {
1130 assert!(1130 assert!(
1131 scratch1131 scratch
1132 .store1132 .store
1133- .user_by_email(&ws_id, "Ada@IZLEK.sh")1133+ .user_by_email(&ws_id, "Ada@IZ.sh")
1134 .await1134 .await
1135 .unwrap()1135 .unwrap()
1136 .is_some()1136 .is_some()
@@ -1145,7 +1145,7 @@ async fn an_unknown_address_is_a_plain_none() {
1145 assert!(1145 assert!(
1146 scratch1146 scratch
1147 .store1147 .store
1148- .user_by_email(&ws_id, "nobody@izlek.sh")1148+ .user_by_email(&ws_id, "nobody@iz.sh")
1149 .await1149 .await
1150 .unwrap()1150 .unwrap()
1151 .is_none()1151 .is_none()
@@ -1156,8 +1156,8 @@ async fn an_unknown_address_is_a_plain_none() {
1156 async fn members_list_and_count_for_the_admin_screen() {1156 async fn members_list_and_count_for_the_admin_screen() {
1157 let (scratch, ws_id, admin_id) = workspace_with_admin().await;1157 let (scratch, ws_id, admin_id) = workspace_with_admin().await;
1158 for (email, name, role) in [1158 for (email, name, role) in [
1159- ("grace@izlek.sh", "Grace", Role::Member),1159+ ("grace@iz.sh", "Grace", Role::Member),
1160- ("linus@izlek.sh", "Linus", Role::Viewer),1160+ ("linus@iz.sh", "Linus", Role::Viewer),
1161 ] {1161 ] {
1162 scratch1162 scratch
1163 .store1163 .store
@@ -1184,7 +1184,7 @@ async fn profile_and_role_updates_stick() {
1184 .store1184 .store
1185 .create_user(NewUser {1185 .create_user(NewUser {
1186 workspace_id: ws_id,1186 workspace_id: ws_id,
1187- email: "grace@izlek.sh".into(),1187+ email: "grace@iz.sh".into(),
1188 display_name: "Grace".into(),1188 display_name: "Grace".into(),
1189 role: Role::Member,1189 role: Role::Member,
1190 invited_by: None,1190 invited_by: None,
@@ -1238,29 +1238,29 @@ async fn profile_and_role_updates_stick() {
1238 1238
1239 #[tokio::test]1239 #[tokio::test]
1240 async fn email_change_persists_and_refuses_a_taken_address() {1240 async fn email_change_persists_and_refuses_a_taken_address() {
1241- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));1241+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
1242 std::fs::create_dir_all(&dir).unwrap();1242 std::fs::create_dir_all(&dir).unwrap();
1243- let path = dir.join("izlek.db").to_str().unwrap().to_string();1243+ let path = dir.join("iz.db").to_str().unwrap().to_string();
1244 1244
1245 let user_id = {1245 let user_id = {
1246 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();1246 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
1247 let (ws_id, _admin_id) = claim(&store).await;1247 let (ws_id, _admin_id) = claim(&store).await;
1248- let user_id = member(&store, &ws_id, "grace@izlek.sh", "Grace").await;1248+ let user_id = member(&store, &ws_id, "grace@iz.sh", "Grace").await;
1249 store1249 store
1250- .set_email(&user_id, &ws_id, "Grace.New@Izlek.sh")1250+ .set_email(&user_id, &ws_id, "Grace.New@Iz.sh")
1251 .await1251 .await
1252 .unwrap();1252 .unwrap();
1253 // Case-folded the same way sign-in matches an address.1253 // Case-folded the same way sign-in matches an address.
1254 assert!(1254 assert!(
1255 store1255 store
1256- .user_by_email(&ws_id, "grace.new@izlek.sh")1256+ .user_by_email(&ws_id, "grace.new@iz.sh")
1257 .await1257 .await
1258 .unwrap()1258 .unwrap()
1259 .is_some()1259 .is_some()
1260 );1260 );
1261 assert!(1261 assert!(
1262 store1262 store
1263- .user_by_email(&ws_id, "grace@izlek.sh")1263+ .user_by_email(&ws_id, "grace@iz.sh")
1264 .await1264 .await
1265 .unwrap()1265 .unwrap()
1266 .is_none()1266 .is_none()
@@ -1268,7 +1268,7 @@ async fn email_change_persists_and_refuses_a_taken_address() {
1268 1268
1269 // Taken by the admin already claimed above.1269 // Taken by the admin already claimed above.
1270 let err = store1270 let err = store
1271- .set_email(&user_id, &ws_id, "ada@izlek.sh")1271+ .set_email(&user_id, &ws_id, "ada@iz.sh")
1272 .await1272 .await
1273 .unwrap_err();1273 .unwrap_err();
1274 assert!(matches!(err, StoreError::Conflict("account")));1274 assert!(matches!(err, StoreError::Conflict("account")));
@@ -1278,16 +1278,16 @@ async fn email_change_persists_and_refuses_a_taken_address() {
1278 // Persists across a reopen, and the refused attempt did not stick.1278 // Persists across a reopen, and the refused attempt did not stick.
1279 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();1279 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
1280 let user = store.user(&user_id).await.unwrap().unwrap();1280 let user = store.user(&user_id).await.unwrap().unwrap();
1281- assert_eq!(user.email, "grace.new@izlek.sh");1281+ assert_eq!(user.email, "grace.new@iz.sh");
1282 1282
1283 let _ = std::fs::remove_dir_all(&dir);1283 let _ = std::fs::remove_dir_all(&dir);
1284 }1284 }
1285 1285
1286 #[tokio::test]1286 #[tokio::test]
1287 async fn display_preferences_default_and_persist_across_reopen() {1287 async fn display_preferences_default_and_persist_across_reopen() {
1288- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));1288+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
1289 std::fs::create_dir_all(&dir).unwrap();1289 std::fs::create_dir_all(&dir).unwrap();
1290- let path = dir.join("izlek.db").to_string_lossy().into_owned();1290+ let path = dir.join("iz.db").to_string_lossy().into_owned();
1291 1291
1292 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();1292 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
1293 let (_, admin_id) = claim(&store).await;1293 let (_, admin_id) = claim(&store).await;
@@ -1336,7 +1336,7 @@ async fn a_signin_link_stores_only_the_hash_and_is_used_once() {
1336 .store1336 .store
1337 .create_user(NewUser {1337 .create_user(NewUser {
1338 workspace_id: ws_id,1338 workspace_id: ws_id,
1339- email: "grace@izlek.sh".into(),1339+ email: "grace@iz.sh".into(),
1340 display_name: "Grace".into(),1340 display_name: "Grace".into(),
1341 role: Role::Member,1341 role: Role::Member,
1342 invited_by: None,1342 invited_by: None,
@@ -1351,7 +1351,7 @@ async fn a_signin_link_stores_only_the_hash_and_is_used_once() {
1351 &user.id,1351 &user.id,
1352 "hash-of-the-token",1352 "hash-of-the-token",
1353 now + Duration::days(7),1353 now + Duration::days(7),
1354- izlek_core::store::LinkKind::Join,1354+ iz_core::store::LinkKind::Join,
1355 )1355 )
1356 .await1356 .await
1357 .unwrap();1357 .unwrap();
@@ -1406,7 +1406,7 @@ async fn an_expired_link_is_still_a_live_account() {
1406 .store1406 .store
1407 .create_user(NewUser {1407 .create_user(NewUser {
1408 workspace_id: ws_id,1408 workspace_id: ws_id,
1409- email: "grace@izlek.sh".into(),1409+ email: "grace@iz.sh".into(),
1410 display_name: "Grace".into(),1410 display_name: "Grace".into(),
1411 role: Role::Member,1411 role: Role::Member,
1412 invited_by: None,1412 invited_by: None,
@@ -1421,7 +1421,7 @@ async fn an_expired_link_is_still_a_live_account() {
1421 &user.id,1421 &user.id,
1422 "stale-hash",1422 "stale-hash",
1423 now - Duration::hours(1),1423 now - Duration::hours(1),
1424- izlek_core::store::LinkKind::Join,1424+ iz_core::store::LinkKind::Join,
1425 )1425 )
1426 .await1426 .await
1427 .unwrap();1427 .unwrap();
@@ -1434,7 +1434,7 @@ async fn an_expired_link_is_still_a_live_account() {
1434 &user.id,1434 &user.id,
1435 "fresh-hash",1435 "fresh-hash",
1436 now + Duration::days(7),1436 now + Duration::days(7),
1437- izlek_core::store::LinkKind::Join,1437+ iz_core::store::LinkKind::Join,
1438 )1438 )
1439 .await1439 .await
1440 .unwrap();1440 .unwrap();
@@ -1448,7 +1448,7 @@ async fn the_store_is_usable_behind_a_trait_object() {
1448 let scratch = Scratch::open().await;1448 let scratch = Scratch::open().await;
1449 let store: &dyn Store = &scratch.store;1449 let store: &dyn Store = &scratch.store;
1450 store1450 store
1451- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "$argon2id$fake")1451+ .claim_workspace("İz", "ada@iz.sh", "Ada", "$argon2id$fake")
1452 .await1452 .await
1453 .unwrap();1453 .unwrap();
1454 assert!(store.workspace().await.unwrap().is_some());1454 assert!(store.workspace().await.unwrap().is_some());
@@ -1456,12 +1456,12 @@ async fn the_store_is_usable_behind_a_trait_object() {
1456 1456
1457 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]1457 #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
1458 async fn a_prefetched_link_is_consumed_exactly_once() {1458 async fn a_prefetched_link_is_consumed_exactly_once() {
1459- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));1459+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
1460 std::fs::create_dir_all(&dir).unwrap();1460 std::fs::create_dir_all(&dir).unwrap();
1461- let path = dir.join("izlek.db").to_string_lossy().into_owned();1461+ let path = dir.join("iz.db").to_string_lossy().into_owned();
1462 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());1462 let store = std::sync::Arc::new(TursoStore::open(&path, &dir.join("storage")).await.unwrap());
1463 let (ws_id, _) = claim(&store).await;1463 let (ws_id, _) = claim(&store).await;
1464- let user_id = member(&store, &ws_id, "grace@izlek.sh", "Grace").await;1464+ let user_id = member(&store, &ws_id, "grace@iz.sh", "Grace").await;
1465 1465
1466 let token = Token::mint();1466 let token = Token::mint();
1467 let now = OffsetDateTime::now_utc();1467 let now = OffsetDateTime::now_utc();
@@ -1470,7 +1470,7 @@ async fn a_prefetched_link_is_consumed_exactly_once() {
1470 &user_id,1470 &user_id,
1471 &token.hash(),1471 &token.hash(),
1472 now + Duration::days(7),1472 now + Duration::days(7),
1473- izlek_core::store::LinkKind::Join,1473+ iz_core::store::LinkKind::Join,
1474 )1474 )
1475 .await1475 .await
1476 .unwrap();1476 .unwrap();
@@ -1499,7 +1499,7 @@ async fn a_prefetched_link_is_consumed_exactly_once() {
1499 #[tokio::test]1499 #[tokio::test]
1500 async fn a_session_lives_until_it_expires_or_is_revoked() {1500 async fn a_session_lives_until_it_expires_or_is_revoked() {
1501 let (scratch, ws_id, _) = workspace_with_admin().await;1501 let (scratch, ws_id, _) = workspace_with_admin().await;
1502- let user_id = member(&scratch.store, &ws_id, "grace@izlek.sh", "Grace").await;1502+ let user_id = member(&scratch.store, &ws_id, "grace@iz.sh", "Grace").await;
1503 1503
1504 let token = Token::mint();1504 let token = Token::mint();
1505 let now = OffsetDateTime::now_utc();1505 let now = OffsetDateTime::now_utc();
@@ -1554,7 +1554,7 @@ async fn a_session_lives_until_it_expires_or_is_revoked() {
1554 #[tokio::test]1554 #[tokio::test]
1555 async fn an_expired_session_is_not_live() {1555 async fn an_expired_session_is_not_live() {
1556 let (scratch, ws_id, _) = workspace_with_admin().await;1556 let (scratch, ws_id, _) = workspace_with_admin().await;
1557- let user_id = member(&scratch.store, &ws_id, "grace@izlek.sh", "Grace").await;1557+ let user_id = member(&scratch.store, &ws_id, "grace@iz.sh", "Grace").await;
1558 let now = OffsetDateTime::now_utc();1558 let now = OffsetDateTime::now_utc();
1559 let session = scratch1559 let session = scratch
1560 .store1560 .store
@@ -1567,8 +1567,8 @@ async fn an_expired_session_is_not_live() {
1567 #[tokio::test]1567 #[tokio::test]
1568 async fn changing_a_password_can_sign_out_every_other_device() {1568 async fn changing_a_password_can_sign_out_every_other_device() {
1569 let (scratch, ws_id, _) = workspace_with_admin().await;1569 let (scratch, ws_id, _) = workspace_with_admin().await;
1570- let user_id = member(&scratch.store, &ws_id, "grace@izlek.sh", "Grace").await;1570+ let user_id = member(&scratch.store, &ws_id, "grace@iz.sh", "Grace").await;
1571- let other_id = member(&scratch.store, &ws_id, "linus@izlek.sh", "Linus").await;1571+ let other_id = member(&scratch.store, &ws_id, "linus@iz.sh", "Linus").await;
1572 let now = OffsetDateTime::now_utc();1572 let now = OffsetDateTime::now_utc();
1573 1573
1574 let mut hashes = Vec::new();1574 let mut hashes = Vec::new();
@@ -1617,7 +1617,7 @@ async fn auth_attempts_are_counted_over_a_window() {
1617 for minutes_ago in [30, 20, 10, 5, 1] {1617 for minutes_ago in [30, 20, 10, 5, 1] {
1618 scratch1618 scratch
1619 .store1619 .store
1620- .record_auth_attempt("grace@izlek.sh", now - Duration::minutes(minutes_ago))1620+ .record_auth_attempt("grace@iz.sh", now - Duration::minutes(minutes_ago))
1621 .await1621 .await
1622 .unwrap();1622 .unwrap();
1623 }1623 }
@@ -1631,7 +1631,7 @@ async fn auth_attempts_are_counted_over_a_window() {
1631 assert_eq!(1631 assert_eq!(
1632 scratch1632 scratch
1633 .store1633 .store
1634- .count_auth_attempts("grace@izlek.sh", window)1634+ .count_auth_attempts("grace@iz.sh", window)
1635 .await1635 .await
1636 .unwrap(),1636 .unwrap(),
1637 31637 3
@@ -1647,7 +1647,7 @@ async fn auth_attempts_are_counted_over_a_window() {
1647 assert_eq!(1647 assert_eq!(
1648 scratch1648 scratch
1649 .store1649 .store
1650- .count_auth_attempts("nobody@izlek.sh", window)1650+ .count_auth_attempts("nobody@iz.sh", window)
1651 .await1651 .await
1652 .unwrap(),1652 .unwrap(),
1653 01653 0
@@ -1656,13 +1656,13 @@ async fn auth_attempts_are_counted_over_a_window() {
1656 // A success clears the bucket that succeeded, and only that one.1656 // A success clears the bucket that succeeded, and only that one.
1657 scratch1657 scratch
1658 .store1658 .store
1659- .clear_auth_attempts("grace@izlek.sh")1659+ .clear_auth_attempts("grace@iz.sh")
1660 .await1660 .await
1661 .unwrap();1661 .unwrap();
1662 assert_eq!(1662 assert_eq!(
1663 scratch1663 scratch
1664 .store1664 .store
1665- .count_auth_attempts("grace@izlek.sh", window)1665+ .count_auth_attempts("grace@iz.sh", window)
1666 .await1666 .await
1667 .unwrap(),1667 .unwrap(),
1668 01668 0
@@ -1679,7 +1679,7 @@ async fn auth_attempts_are_counted_over_a_window() {
1679 // Pruning drops what is out of every window.1679 // Pruning drops what is out of every window.
1680 scratch1680 scratch
1681 .store1681 .store
1682- .record_auth_attempt("grace@izlek.sh", now - Duration::hours(2))1682+ .record_auth_attempt("grace@iz.sh", now - Duration::hours(2))
1683 .await1683 .await
1684 .unwrap();1684 .unwrap();
1685 let pruned = scratch1685 let pruned = scratch
@@ -1694,8 +1694,8 @@ async fn auth_attempts_are_counted_over_a_window() {
1694 // Account flows.1694 // Account flows.
1695 // ---------------------------------------------------------------------------1695 // ---------------------------------------------------------------------------
1696 1696
1697-use izlek_core::accounts::{AccountError, Accounts, RATE_LIMIT, SIGNIN_LINK_LIFETIME};1697+use iz_core::accounts::{AccountError, Accounts, RATE_LIMIT, SIGNIN_LINK_LIFETIME};
1698-use izlek_core::auth::PasswordProblem;1698+use iz_core::auth::PasswordProblem;
1699 use std::sync::Arc;1699 use std::sync::Arc;
1700 1700
1701 /// An accounts service over a throwaway database. The directory is kept alive1701 /// An accounts service over a throwaway database. The directory is kept alive
@@ -1703,19 +1703,19 @@ use std::sync::Arc;
1703 async fn accounts() -> (Scratch, Accounts) {1703 async fn accounts() -> (Scratch, Accounts) {
1704 let scratch = Scratch::open().await;1704 let scratch = Scratch::open().await;
1705 let store = TursoStore::open(1705 let store = TursoStore::open(
1706- scratch.dir.join("izlek.db").to_str().unwrap(),1706+ scratch.dir.join("iz.db").to_str().unwrap(),
1707 &scratch.dir.join("storage"),1707 &scratch.dir.join("storage"),
1708 )1708 )
1709 .await1709 .await
1710 .unwrap();1710 .unwrap();
1711- let accounts = Accounts::new(Arc::new(store) as Arc<dyn Store>, "https://izlek.sh");1711+ let accounts = Accounts::new(Arc::new(store) as Arc<dyn Store>, "https://iz.sh");
1712 (scratch, accounts)1712 (scratch, accounts)
1713 }1713 }
1714 1714
1715 async fn claimed() -> (Scratch, Accounts, User) {1715 async fn claimed() -> (Scratch, Accounts, User) {
1716 let (scratch, accounts) = accounts().await;1716 let (scratch, accounts) = accounts().await;
1717 let (_, signed_in) = accounts1717 let (_, signed_in) = accounts
1718- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "tide-tables-1892")1718+ .claim_workspace("İz", "ada@iz.sh", "Ada", "tide-tables-1892")
1719 .await1719 .await
1720 .unwrap();1720 .unwrap();
1721 (scratch, accounts, signed_in.user)1721 (scratch, accounts, signed_in.user)
@@ -1725,10 +1725,10 @@ async fn claimed() -> (Scratch, Accounts, User) {
1725 async fn claiming_makes_an_admin_and_signs_them_in() {1725 async fn claiming_makes_an_admin_and_signs_them_in() {
1726 let (_scratch, accounts) = accounts().await;1726 let (_scratch, accounts) = accounts().await;
1727 let (workspace, signed_in) = accounts1727 let (workspace, signed_in) = accounts
1728- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "tide-tables-1892")1728+ .claim_workspace("İz", "ada@iz.sh", "Ada", "tide-tables-1892")
1729 .await1729 .await
1730 .unwrap();1730 .unwrap();
1731- assert_eq!(workspace.name, "İzlek");1731+ assert_eq!(workspace.name, "İz");
1732 assert_eq!(signed_in.user.role, Role::Admin);1732 assert_eq!(signed_in.user.role, Role::Admin);
1733 assert!(1733 assert!(
1734 signed_in.user.last_signed_in_at.is_some(),1734 signed_in.user.last_signed_in_at.is_some(),
@@ -1755,7 +1755,7 @@ async fn claiming_makes_an_admin_and_signs_them_in() {
1755 async fn the_claim_screen_enforces_its_own_password_rules() {1755 async fn the_claim_screen_enforces_its_own_password_rules() {
1756 let (_scratch, accounts) = accounts().await;1756 let (_scratch, accounts) = accounts().await;
1757 let too_short = accounts1757 let too_short = accounts
1758- .claim_workspace("İzlek", "ada@izlek.sh", "Ada", "short")1758+ .claim_workspace("İz", "ada@iz.sh", "Ada", "short")
1759 .await;1759 .await;
1760 assert!(matches!(1760 assert!(matches!(
1761 too_short,1761 too_short,
@@ -1783,7 +1783,7 @@ async fn a_second_claim_is_refused() {
1783 async fn an_invited_member_chooses_their_own_password() {1783 async fn an_invited_member_chooses_their_own_password() {
1784 let (_scratch, accounts, admin) = claimed().await;1784 let (_scratch, accounts, admin) = claimed().await;
1785 let invitation = accounts1785 let invitation = accounts
1786- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1786+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1787 .await1787 .await
1788 .unwrap();1788 .unwrap();
1789 assert!(!invitation.user.has_signed_in(), "no password yet");1789 assert!(!invitation.user.has_signed_in(), "no password yet");
@@ -1794,7 +1794,7 @@ async fn an_invited_member_chooses_their_own_password() {
1794 1794
1795 // The admin cannot sign in as them in the meantime.1795 // The admin cannot sign in as them in the meantime.
1796 let as_them = accounts1796 let as_them = accounts
1797- .sign_in("grace@izlek.sh", "tide-tables-1892", "198.51.100.7")1797+ .sign_in("grace@iz.sh", "tide-tables-1892", "198.51.100.7")
1798 .await;1798 .await;
1799 assert!(matches!(as_them, Err(AccountError::Rejected)));1799 assert!(matches!(as_them, Err(AccountError::Rejected)));
1800 1800
@@ -1815,7 +1815,7 @@ async fn an_invited_member_chooses_their_own_password() {
1815 1815
1816 // And now the password they chose works, and only that one.1816 // And now the password they chose works, and only that one.
1817 accounts1817 accounts
1818- .sign_in("grace@izlek.sh", "sextant-and-chart", "198.51.100.7")1818+ .sign_in("grace@iz.sh", "sextant-and-chart", "198.51.100.7")
1819 .await1819 .await
1820 .unwrap();1820 .unwrap();
1821 }1821 }
@@ -1824,22 +1824,22 @@ async fn an_invited_member_chooses_their_own_password() {
1824 async fn adding_a_member_queues_the_mail_that_carries_the_link() {1824 async fn adding_a_member_queues_the_mail_that_carries_the_link() {
1825 let (_scratch, accounts, admin) = claimed().await;1825 let (_scratch, accounts, admin) = claimed().await;
1826 let invitation = accounts1826 let invitation = accounts
1827- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1827+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1828 .await1828 .await
1829 .unwrap();1829 .unwrap();
1830 1830
1831 let queue = accounts1831 let queue = accounts
1832 .store()1832 .store()
1833- .mail_queue(10, izlek_core::store::FeedPage::Newest)1833+ .mail_queue(10, iz_core::store::FeedPage::Newest)
1834 .await1834 .await
1835 .unwrap();1835 .unwrap();
1836 let queued = queue1836 let queued = queue
1837 .iter()1837 .iter()
1838- .find(|s| s.recipient == "grace@izlek.sh")1838+ .find(|s| s.recipient == "grace@iz.sh")
1839 .expect("the invite mail is on the outbox");1839 .expect("the invite mail is on the outbox");
1840 assert_eq!(queued.kind, SendKind::Invite);1840 assert_eq!(queued.kind, SendKind::Invite);
1841 let body = queued.body.as_deref().unwrap();1841 let body = queued.body.as_deref().unwrap();
1842- let link = format!("https://izlek.sh/join/{}", invitation.token.expose());1842+ let link = format!("https://iz.sh/join/{}", invitation.token.expose());
1843 assert!(body.contains(&link), "body was: {body}");1843 assert!(body.contains(&link), "body was: {body}");
1844 }1844 }
1845 1845
@@ -1847,7 +1847,7 @@ async fn adding_a_member_queues_the_mail_that_carries_the_link() {
1847 async fn only_an_admin_may_invite() {1847 async fn only_an_admin_may_invite() {
1848 let (_scratch, accounts, admin) = claimed().await;1848 let (_scratch, accounts, admin) = claimed().await;
1849 let invitation = accounts1849 let invitation = accounts
1850- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1850+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1851 .await1851 .await
1852 .unwrap();1852 .unwrap();
1853 let member = accounts1853 let member = accounts
@@ -1862,7 +1862,7 @@ async fn only_an_admin_may_invite() {
1862 1862
1863 // Server-side, not merely hidden: a member calling the flow is refused.1863 // Server-side, not merely hidden: a member calling the flow is refused.
1864 let attempt = accounts1864 let attempt = accounts
1865- .invite(&member, "linus@izlek.sh", "Linus", Role::Member)1865+ .invite(&member, "linus@iz.sh", "Linus", Role::Member)
1866 .await;1866 .await;
1867 assert!(matches!(attempt, Err(AccountError::Forbidden)));1867 assert!(matches!(attempt, Err(AccountError::Forbidden)));
1868 1868
@@ -1870,7 +1870,7 @@ async fn only_an_admin_may_invite() {
1870 viewer.role = Role::Viewer;1870 viewer.role = Role::Viewer;
1871 assert!(matches!(1871 assert!(matches!(
1872 accounts1872 accounts
1873- .invite(&viewer, "linus@izlek.sh", "Linus", Role::Viewer)1873+ .invite(&viewer, "linus@iz.sh", "Linus", Role::Viewer)
1874 .await,1874 .await,
1875 Err(AccountError::Forbidden)1875 Err(AccountError::Forbidden)
1876 ));1876 ));
@@ -1880,7 +1880,7 @@ async fn only_an_admin_may_invite() {
1880 async fn an_admin_may_change_a_members_role() {1880 async fn an_admin_may_change_a_members_role() {
1881 let (_scratch, accounts, admin) = claimed().await;1881 let (_scratch, accounts, admin) = claimed().await;
1882 let invitation = accounts1882 let invitation = accounts
1883- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1883+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1884 .await1884 .await
1885 .unwrap();1885 .unwrap();
1886 1886
@@ -1902,7 +1902,7 @@ async fn an_admin_may_change_a_members_role() {
1902 async fn the_owner_may_not_have_their_role_changed_even_by_another_admin() {1902 async fn the_owner_may_not_have_their_role_changed_even_by_another_admin() {
1903 let (_scratch, accounts, admin) = claimed().await;1903 let (_scratch, accounts, admin) = claimed().await;
1904 let invitation = accounts1904 let invitation = accounts
1905- .invite(&admin, "grace@izlek.sh", "Grace", Role::Admin)1905+ .invite(&admin, "grace@iz.sh", "Grace", Role::Admin)
1906 .await1906 .await
1907 .unwrap();1907 .unwrap();
1908 let other_admin = accounts1908 let other_admin = accounts
@@ -1928,7 +1928,7 @@ async fn the_owner_may_not_have_their_role_changed_even_by_another_admin() {
1928 async fn nobody_may_change_their_own_role() {1928 async fn nobody_may_change_their_own_role() {
1929 let (_scratch, accounts, admin) = claimed().await;1929 let (_scratch, accounts, admin) = claimed().await;
1930 let invitation = accounts1930 let invitation = accounts
1931- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1931+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1932 .await1932 .await
1933 .unwrap();1933 .unwrap();
1934 let member = accounts1934 let member = accounts
@@ -1949,7 +1949,7 @@ async fn nobody_may_change_their_own_role() {
1949 async fn a_link_works_once_and_a_wrong_one_never_does() {1949 async fn a_link_works_once_and_a_wrong_one_never_does() {
1950 let (_scratch, accounts, admin) = claimed().await;1950 let (_scratch, accounts, admin) = claimed().await;
1951 let invitation = accounts1951 let invitation = accounts
1952- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1952+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1953 .await1953 .await
1954 .unwrap();1954 .unwrap();
1955 1955
@@ -1977,7 +1977,7 @@ async fn a_link_works_once_and_a_wrong_one_never_does() {
1977 1977
1978 // The password they actually set is untouched by either failure.1978 // The password they actually set is untouched by either failure.
1979 accounts1979 accounts
1980- .sign_in("grace@izlek.sh", "sextant-and-chart", "198.51.100.7")1980+ .sign_in("grace@iz.sh", "sextant-and-chart", "198.51.100.7")
1981 .await1981 .await
1982 .unwrap();1982 .unwrap();
1983 }1983 }
@@ -1986,7 +1986,7 @@ async fn a_link_works_once_and_a_wrong_one_never_does() {
1986 async fn a_rejected_password_does_not_burn_the_invitation() {1986 async fn a_rejected_password_does_not_burn_the_invitation() {
1987 let (_scratch, accounts, admin) = claimed().await;1987 let (_scratch, accounts, admin) = claimed().await;
1988 let invitation = accounts1988 let invitation = accounts
1989- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)1989+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
1990 .await1990 .await
1991 .unwrap();1991 .unwrap();
1992 1992
@@ -2021,7 +2021,7 @@ async fn a_rejected_password_does_not_burn_the_invitation() {
2021 async fn an_expired_link_is_refused_and_resending_opens_the_same_account() {2021 async fn an_expired_link_is_refused_and_resending_opens_the_same_account() {
2022 let (_scratch, accounts, admin) = claimed().await;2022 let (_scratch, accounts, admin) = claimed().await;
2023 let invitation = accounts2023 let invitation = accounts
2024- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)2024+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
2025 .await2025 .await
2026 .unwrap();2026 .unwrap();
2027 2027
@@ -2033,7 +2033,7 @@ async fn an_expired_link_is_refused_and_resending_opens_the_same_account() {
2033 &invitation.user.id,2033 &invitation.user.id,
2034 &stale.hash(),2034 &stale.hash(),
2035 OffsetDateTime::now_utc() - Duration::minutes(1),2035 OffsetDateTime::now_utc() - Duration::minutes(1),
2036- izlek_core::store::LinkKind::Join,2036+ iz_core::store::LinkKind::Join,
2037 )2037 )
2038 .await2038 .await
2039 .unwrap();2039 .unwrap();
@@ -2060,10 +2060,10 @@ async fn an_expired_link_is_refused_and_resending_opens_the_same_account() {
2060 async fn an_unknown_address_and_a_wrong_password_are_indistinguishable() {2060 async fn an_unknown_address_and_a_wrong_password_are_indistinguishable() {
2061 let (_scratch, accounts, _admin) = claimed().await;2061 let (_scratch, accounts, _admin) = claimed().await;
2062 let unknown = accounts2062 let unknown = accounts
2063- .sign_in("nobody@izlek.sh", "tide-tables-1892", "198.51.100.7")2063+ .sign_in("nobody@iz.sh", "tide-tables-1892", "198.51.100.7")
2064 .await;2064 .await;
2065 let wrong = accounts2065 let wrong = accounts
2066- .sign_in("ada@izlek.sh", "not-her-password", "198.51.100.8")2066+ .sign_in("ada@iz.sh", "not-her-password", "198.51.100.8")
2067 .await;2067 .await;
2068 assert!(matches!(unknown, Err(AccountError::Rejected)));2068 assert!(matches!(unknown, Err(AccountError::Rejected)));
2069 assert!(matches!(wrong, Err(AccountError::Rejected)));2069 assert!(matches!(wrong, Err(AccountError::Rejected)));
@@ -2082,13 +2082,13 @@ async fn the_miss_path_costs_what_the_hit_path_costs() {
2082 // which a skipped verify could not.2082 // which a skipped verify could not.
2083 let baseline = std::time::Instant::now();2083 let baseline = std::time::Instant::now();
2084 let _ = accounts2084 let _ = accounts
2085- .sign_in("ada@izlek.sh", "not-her-password", "198.51.100.7")2085+ .sign_in("ada@iz.sh", "not-her-password", "198.51.100.7")
2086 .await;2086 .await;
2087 let hit_cost = baseline.elapsed();2087 let hit_cost = baseline.elapsed();
2088 2088
2089 let started = std::time::Instant::now();2089 let started = std::time::Instant::now();
2090 let _ = accounts2090 let _ = accounts
2091- .sign_in("nobody@izlek.sh", "not-a-password", "198.51.100.8")2091+ .sign_in("nobody@iz.sh", "not-a-password", "198.51.100.8")
2092 .await;2092 .await;
2093 let miss_cost = started.elapsed();2093 let miss_cost = started.elapsed();
2094 2094
@@ -2102,12 +2102,12 @@ async fn the_miss_path_costs_what_the_hit_path_costs() {
2102 async fn an_invited_account_that_has_no_password_cannot_be_signed_into() {2102 async fn an_invited_account_that_has_no_password_cannot_be_signed_into() {
2103 let (_scratch, accounts, admin) = claimed().await;2103 let (_scratch, accounts, admin) = claimed().await;
2104 accounts2104 accounts
2105- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)2105+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
2106 .await2106 .await
2107 .unwrap();2107 .unwrap();
2108 // Not "set your password first" — that would confirm the address exists.2108 // Not "set your password first" — that would confirm the address exists.
2109 assert!(matches!(2109 assert!(matches!(
2110- accounts.sign_in("grace@izlek.sh", "", "198.51.100.7").await,2110+ accounts.sign_in("grace@iz.sh", "", "198.51.100.7").await,
2111 Err(AccountError::Rejected)2111 Err(AccountError::Rejected)
2112 ));2112 ));
2113 }2113 }
@@ -2117,20 +2117,20 @@ async fn sign_in_attempts_are_rate_limited_per_address() {
2117 let (_scratch, accounts, _admin) = claimed().await;2117 let (_scratch, accounts, _admin) = claimed().await;
2118 for _ in 0..RATE_LIMIT {2118 for _ in 0..RATE_LIMIT {
2119 let _ = accounts2119 let _ = accounts
2120- .sign_in("ada@izlek.sh", "wrong", "198.51.100.7")2120+ .sign_in("ada@iz.sh", "wrong", "198.51.100.7")
2121 .await;2121 .await;
2122 }2122 }
2123 // The next attempt is refused before any Argon2 work happens.2123 // The next attempt is refused before any Argon2 work happens.
2124 assert!(matches!(2124 assert!(matches!(
2125 accounts2125 accounts
2126- .sign_in("ada@izlek.sh", "wrong", "203.0.113.9")2126+ .sign_in("ada@iz.sh", "wrong", "203.0.113.9")
2127 .await,2127 .await,
2128 Err(AccountError::RateLimited)2128 Err(AccountError::RateLimited)
2129 ));2129 ));
2130 // A different address from a fresh client is unaffected.2130 // A different address from a fresh client is unaffected.
2131 assert!(matches!(2131 assert!(matches!(
2132 accounts2132 accounts
2133- .sign_in("someone@izlek.sh", "wrong", "203.0.113.9")2133+ .sign_in("someone@iz.sh", "wrong", "203.0.113.9")
2134 .await,2134 .await,
2135 Err(AccountError::Rejected)2135 Err(AccountError::Rejected)
2136 ));2136 ));
@@ -2146,12 +2146,12 @@ async fn a_flooded_address_never_locks_the_owner_out() {
2146 // Each guess from its own client, so only the address bucket fills.2146 // Each guess from its own client, so only the address bucket fills.
2147 for i in 0..(RATE_LIMIT + 5) {2147 for i in 0..(RATE_LIMIT + 5) {
2148 let _ = accounts2148 let _ = accounts
2149- .sign_in("ada@izlek.sh", "wrong", &format!("203.0.113.{i}"))2149+ .sign_in("ada@iz.sh", "wrong", &format!("203.0.113.{i}"))
2150 .await;2150 .await;
2151 }2151 }
2152 // The owner, from a client of their own, still gets in.2152 // The owner, from a client of their own, still gets in.
2153 accounts2153 accounts
2154- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2154+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2155 .await2155 .await
2156 .unwrap();2156 .unwrap();
2157 }2157 }
@@ -2162,13 +2162,13 @@ async fn sign_in_attempts_are_rate_limited_per_client() {
2162 let (_scratch, accounts, _admin) = claimed().await;2162 let (_scratch, accounts, _admin) = claimed().await;
2163 for i in 0..RATE_LIMIT {2163 for i in 0..RATE_LIMIT {
2164 let _ = accounts2164 let _ = accounts
2165- .sign_in(&format!("nobody{i}@izlek.sh"), "wrong", "203.0.113.9")2165+ .sign_in(&format!("nobody{i}@iz.sh"), "wrong", "203.0.113.9")
2166 .await;2166 .await;
2167 }2167 }
2168 // Refused before any Argon2 work, whatever address it asks about.2168 // Refused before any Argon2 work, whatever address it asks about.
2169 assert!(matches!(2169 assert!(matches!(
2170 accounts2170 accounts
2171- .sign_in("ada@izlek.sh", "tide-tables-1892", "203.0.113.9")2171+ .sign_in("ada@iz.sh", "tide-tables-1892", "203.0.113.9")
2172 .await,2172 .await,
2173 Err(AccountError::RateLimited)2173 Err(AccountError::RateLimited)
2174 ));2174 ));
@@ -2181,7 +2181,7 @@ async fn sign_in_attempts_are_rate_limited_per_client() {
2181 async fn link_redemption_is_rate_limited_per_client() {2181 async fn link_redemption_is_rate_limited_per_client() {
2182 let (_scratch, accounts, admin) = claimed().await;2182 let (_scratch, accounts, admin) = claimed().await;
2183 let invitation = accounts2183 let invitation = accounts
2184- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)2184+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
2185 .await2185 .await
2186 .unwrap();2186 .unwrap();
2187 for i in 0..RATE_LIMIT {2187 for i in 0..RATE_LIMIT {
@@ -2243,17 +2243,17 @@ async fn a_successful_sign_in_clears_the_bucket() {
2243 let (_scratch, accounts, _admin) = claimed().await;2243 let (_scratch, accounts, _admin) = claimed().await;
2244 for _ in 0..(RATE_LIMIT - 1) {2244 for _ in 0..(RATE_LIMIT - 1) {
2245 let _ = accounts2245 let _ = accounts
2246- .sign_in("ada@izlek.sh", "wrong", "198.51.100.7")2246+ .sign_in("ada@iz.sh", "wrong", "198.51.100.7")
2247 .await;2247 .await;
2248 }2248 }
2249 accounts2249 accounts
2250- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2250+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2251 .await2251 .await
2252 .unwrap();2252 .unwrap();
2253 // Someone who mistypes and then gets it right is not left at the edge.2253 // Someone who mistypes and then gets it right is not left at the edge.
2254 assert!(matches!(2254 assert!(matches!(
2255 accounts2255 accounts
2256- .sign_in("ada@izlek.sh", "wrong", "198.51.100.7")2256+ .sign_in("ada@iz.sh", "wrong", "198.51.100.7")
2257 .await,2257 .await,
2258 Err(AccountError::Rejected)2258 Err(AccountError::Rejected)
2259 ));2259 ));
@@ -2263,11 +2263,11 @@ async fn a_successful_sign_in_clears_the_bucket() {
2263 async fn changing_a_password_signs_out_every_device() {2263 async fn changing_a_password_signs_out_every_device() {
2264 let (_scratch, accounts, admin) = claimed().await;2264 let (_scratch, accounts, admin) = claimed().await;
2265 let first = accounts2265 let first = accounts
2266- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2266+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2267 .await2267 .await
2268 .unwrap();2268 .unwrap();
2269 let second = accounts2269 let second = accounts
2270- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.8")2270+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.8")
2271 .await2271 .await
2272 .unwrap();2272 .unwrap();
2273 assert!(2273 assert!(
@@ -2320,7 +2320,7 @@ async fn changing_a_password_signs_out_every_device() {
2320 .is_some()2320 .is_some()
2321 );2321 );
2322 accounts2322 accounts
2323- .sign_in("ada@izlek.sh", "chronometer-1761", "198.51.100.7")2323+ .sign_in("ada@iz.sh", "chronometer-1761", "198.51.100.7")
2324 .await2324 .await
2325 .unwrap();2325 .unwrap();
2326 }2326 }
@@ -2342,7 +2342,7 @@ async fn changing_a_password_needs_the_current_one_and_obeys_the_rules() {
2342 ));2342 ));
2343 // The old password still works after both refusals.2343 // The old password still works after both refusals.
2344 accounts2344 accounts
2345- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2345+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2346 .await2346 .await
2347 .unwrap();2347 .unwrap();
2348 }2348 }
@@ -2361,12 +2361,12 @@ async fn the_old_password_stops_working_after_a_change() {
2361 .unwrap();2361 .unwrap();
2362 assert!(matches!(2362 assert!(matches!(
2363 accounts2363 accounts
2364- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2364+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2365 .await,2365 .await,
2366 Err(AccountError::Rejected)2366 Err(AccountError::Rejected)
2367 ));2367 ));
2368 accounts2368 accounts
2369- .sign_in("ada@izlek.sh", "chronometer-1761", "198.51.100.7")2369+ .sign_in("ada@iz.sh", "chronometer-1761", "198.51.100.7")
2370 .await2370 .await
2371 .unwrap();2371 .unwrap();
2372 }2372 }
@@ -2375,11 +2375,11 @@ async fn the_old_password_stops_working_after_a_change() {
2375 async fn signing_out_ends_that_browser_only() {2375 async fn signing_out_ends_that_browser_only() {
2376 let (_scratch, accounts, _admin) = claimed().await;2376 let (_scratch, accounts, _admin) = claimed().await;
2377 let laptop = accounts2377 let laptop = accounts
2378- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.7")2378+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.7")
2379 .await2379 .await
2380 .unwrap();2380 .unwrap();
2381 let phone = accounts2381 let phone = accounts
2382- .sign_in("ada@izlek.sh", "tide-tables-1892", "198.51.100.8")2382+ .sign_in("ada@iz.sh", "tide-tables-1892", "198.51.100.8")
2383 .await2383 .await
2384 .unwrap();2384 .unwrap();
2385 2385
@@ -2409,18 +2409,18 @@ async fn signing_out_ends_that_browser_only() {
2409 async fn an_address_can_only_be_invited_once() {2409 async fn an_address_can_only_be_invited_once() {
2410 let (_scratch, accounts, admin) = claimed().await;2410 let (_scratch, accounts, admin) = claimed().await;
2411 accounts2411 accounts
2412- .invite(&admin, "grace@izlek.sh", "Grace", Role::Member)2412+ .invite(&admin, "grace@iz.sh", "Grace", Role::Member)
2413 .await2413 .await
2414 .unwrap();2414 .unwrap();
2415 assert!(matches!(2415 assert!(matches!(
2416 accounts2416 accounts
2417- .invite(&admin, "GRACE@izlek.sh", "Grace again", Role::Member)2417+ .invite(&admin, "GRACE@iz.sh", "Grace again", Role::Member)
2418 .await,2418 .await,
2419 Err(AccountError::AddressTaken)2419 Err(AccountError::AddressTaken)
2420 ));2420 ));
2421 assert!(matches!(2421 assert!(matches!(
2422 accounts2422 accounts
2423- .invite(&admin, "ada@izlek.sh", "Ada again", Role::Member)2423+ .invite(&admin, "ada@iz.sh", "Ada again", Role::Member)
2424 .await,2424 .await,
2425 Err(AccountError::AddressTaken)2425 Err(AccountError::AddressTaken)
2426 ));2426 ));
@@ -2428,8 +2428,8 @@ async fn an_address_can_only_be_invited_once() {
2428 2428
2429 // -- board ------------------------------------------------------------------2429 // -- board ------------------------------------------------------------------
2430 2430
2431-use izlek_core::board::{BoardReads, BoardView, Moved, Person, load};2431+use iz_core::board::{BoardReads, BoardView, Moved, Person, load};
2432-use izlek_core::store::NewTask;2432+use iz_core::store::NewTask;
2433 use std::sync::atomic::{AtomicUsize, Ordering};2433 use std::sync::atomic::{AtomicUsize, Ordering};
2434 use time::Date;2434 use time::Date;
2435 use time::macros::date;2435 use time::macros::date;
@@ -2466,12 +2466,12 @@ impl BoardReads for CountingReads<'_> {
2466 async fn board(2466 async fn board(
2467 &self,2467 &self,
2468 workspace_id: &str,2468 workspace_id: &str,
2469- ) -> Result<Option<izlek_core::board::BoardMeta>, StoreError> {2469+ ) -> Result<Option<iz_core::board::BoardMeta>, StoreError> {
2470 self.tick();2470 self.tick();
2471 self.inner.board(workspace_id).await2471 self.inner.board(workspace_id).await
2472 }2472 }
2473 2473
2474- async fn columns(&self, board_id: &str) -> Result<Vec<izlek_core::board::Column>, StoreError> {2474+ async fn columns(&self, board_id: &str) -> Result<Vec<iz_core::board::Column>, StoreError> {
2475 self.tick();2475 self.tick();
2476 self.inner.columns(board_id).await2476 self.inner.columns(board_id).await
2477 }2477 }
@@ -2479,7 +2479,7 @@ impl BoardReads for CountingReads<'_> {
2479 async fn tasks_for_board(2479 async fn tasks_for_board(
2480 &self,2480 &self,
2481 board_id: &str,2481 board_id: &str,
2482- ) -> Result<Vec<izlek_core::board::TaskRow>, StoreError> {2482+ ) -> Result<Vec<iz_core::board::TaskRow>, StoreError> {
2483 self.tick();2483 self.tick();
2484 self.inner.tasks_for_board(board_id).await2484 self.inner.tasks_for_board(board_id).await
2485 }2485 }
@@ -2559,18 +2559,18 @@ async fn add_task(
2559 /// covers exactly the filtered set — no row skipped or repeated.2559 /// covers exactly the filtered set — no row skipped or repeated.
2560 #[tokio::test]2560 #[tokio::test]
2561 async fn count_and_filtered_keyset_walk_cover_exactly_the_filtered_set() {2561 async fn count_and_filtered_keyset_walk_cover_exactly_the_filtered_set() {
2562- use izlek_core::store::{ActivityFilter, Dir, FeedCursor, FeedPage};2562+ use iz_core::store::{ActivityFilter, Dir, FeedCursor, FeedPage};
2563 2563
2564 let (scratch, workspace, admin) = workspace_with_admin().await;2564 let (scratch, workspace, admin) = workspace_with_admin().await;
2565 let store = &scratch.store;2565 let store = &scratch.store;
2566- let other = member(store, &workspace, "sam@izlek.sh", "Sam").await;2566+ let other = member(store, &workspace, "sam@iz.sh", "Sam").await;
2567 let t0 = OffsetDateTime::now_utc();2567 let t0 = OffsetDateTime::now_utc();
2568 for i in 0..20 {2568 for i in 0..20 {
2569 let actor = if i % 2 == 0 { &admin } else { &other };2569 let actor = if i % 2 == 0 { &admin } else { &other };
2570 store2570 store
2571 .record_event(2571 .record_event(
2572 Some(actor),2572 Some(actor),
2573- &izlek_core::detail::ActivityKind::Other("row".to_string()),2573+ &iz_core::detail::ActivityKind::Other("row".to_string()),
2574 &format!("row {i}"),2574 &format!("row {i}"),
2575 t0 + Duration::seconds(i),2575 t0 + Duration::seconds(i),
2576 )2576 )
@@ -2687,7 +2687,7 @@ async fn a_card_carries_its_assignees_comments_and_dependency_keys() {
2687 let mel = store2687 let mel = store
2688 .create_user(NewUser {2688 .create_user(NewUser {
2689 workspace_id: workspace.clone(),2689 workspace_id: workspace.clone(),
2690- email: "mel@izlek.sh".into(),2690+ email: "mel@iz.sh".into(),
2691 display_name: "Mel Duarte".into(),2691 display_name: "Mel Duarte".into(),
2692 role: Role::Member,2692 role: Role::Member,
2693 invited_by: None,2693 invited_by: None,
@@ -2982,14 +2982,14 @@ async fn a_boards_tags_have_unique_names() {
2982 ));2982 ));
2983 }2983 }
2984 2984
2985-fn tag_order(tags: &[izlek_core::store::Tag]) -> Vec<&str> {2985+fn tag_order(tags: &[iz_core::store::Tag]) -> Vec<&str> {
2986 tags.iter().map(|t| t.name.as_str()).collect()2986 tags.iter().map(|t| t.name.as_str()).collect()
2987 }2987 }
2988 2988
2989 fn card_of<'a>(2989 fn card_of<'a>(
2990- view: &'a izlek_core::board::BoardView,2990+ view: &'a iz_core::board::BoardView,
2991 task: &str,2991 task: &str,
2992-) -> &'a izlek_core::board::TaskCard {2992+) -> &'a iz_core::board::TaskCard {
2993 view.columns2993 view.columns
2994 .iter()2994 .iter()
2995 .flat_map(|column| column.cards.iter())2995 .flat_map(|column| column.cards.iter())
@@ -3222,7 +3222,7 @@ fn initials_fall_back_to_two_letters() {
3222 3222
3223 // -- task detail ------------------------------------------------------------3223 // -- task detail ------------------------------------------------------------
3224 3224
3225-use izlek_core::detail::{3225+use iz_core::detail::{
3226 ActivityEntry, ActivityKind, Comment, DependencyEdge, DetailReads, TaskFacts,3226 ActivityEntry, ActivityKind, Comment, DependencyEdge, DetailReads, TaskFacts,
3227 load as load_detail,3227 load as load_detail,
3228 };3228 };
@@ -3261,7 +3261,7 @@ impl DetailReads for CountingDetail<'_> {
3261 async fn columns_for_board(3261 async fn columns_for_board(
3262 &self,3262 &self,
3263 board_id: &str,3263 board_id: &str,
3264- ) -> Result<Vec<izlek_core::Column>, StoreError> {3264+ ) -> Result<Vec<iz_core::Column>, StoreError> {
3265 self.tick();3265 self.tick();
3266 self.inner.columns_for_board(board_id).await3266 self.inner.columns_for_board(board_id).await
3267 }3267 }
@@ -3292,7 +3292,7 @@ impl DetailReads for CountingDetail<'_> {
3292 async fn files_for_task(3292 async fn files_for_task(
3293 &self,3293 &self,
3294 task_id: &str,3294 task_id: &str,
3295- ) -> Result<Vec<izlek_core::detail::FileLine>, StoreError> {3295+ ) -> Result<Vec<iz_core::detail::FileLine>, StoreError> {
3296 self.tick();3296 self.tick();
3297 self.inner.files_for_task(task_id).await3297 self.inner.files_for_task(task_id).await
3298 }3298 }
@@ -3305,7 +3305,7 @@ impl DetailReads for CountingDetail<'_> {
3305 async fn family_for_task(3305 async fn family_for_task(
3306 &self,3306 &self,
3307 task_id: &str,3307 task_id: &str,
3308- ) -> Result<Vec<(bool, izlek_core::detail::SubtaskLine)>, StoreError> {3308+ ) -> Result<Vec<(bool, iz_core::detail::SubtaskLine)>, StoreError> {
3309 self.tick();3309 self.tick();
3310 self.inner.family_for_task(task_id).await3310 self.inner.family_for_task(task_id).await
3311 }3311 }
@@ -3353,7 +3353,7 @@ async fn a_viewer_is_never_offered_as_an_assignee() {
3353 let quiet = store3353 let quiet = store
3354 .create_user(NewUser {3354 .create_user(NewUser {
3355 workspace_id: workspace.clone(),3355 workspace_id: workspace.clone(),
3356- email: "quiet@izlek.sh".into(),3356+ email: "quiet@iz.sh".into(),
3357 display_name: "Quiet Reader".into(),3357 display_name: "Quiet Reader".into(),
3358 role: Role::Viewer,3358 role: Role::Viewer,
3359 invited_by: None,3359 invited_by: None,
@@ -3647,7 +3647,7 @@ async fn a_task_detail_costs_nine_queries_whatever_it_carries() {
3647 let person = store3647 let person = store
3648 .create_user(NewUser {3648 .create_user(NewUser {
3649 workspace_id: workspace.clone(),3649 workspace_id: workspace.clone(),
3650- email: format!("member{n}@izlek.sh"),3650+ email: format!("member{n}@iz.sh"),
3651 display_name: format!("Member {n}"),3651 display_name: format!("Member {n}"),
3652 role: Role::Member,3652 role: Role::Member,
3653 invited_by: None,3653 invited_by: None,
@@ -3972,7 +3972,7 @@ async fn an_orphan_row_is_refused() {
3972 .store3972 .store
3973 .create_user(NewUser {3973 .create_user(NewUser {
3974 workspace_id: "no-such-workspace".into(),3974 workspace_id: "no-such-workspace".into(),
3975- email: "orphan@izlek.sh".into(),3975+ email: "orphan@iz.sh".into(),
3976 display_name: "Orphan".into(),3976 display_name: "Orphan".into(),
3977 role: Role::Member,3977 role: Role::Member,
3978 invited_by: None,3978 invited_by: None,
@@ -3995,9 +3995,9 @@ async fn an_orphan_row_is_refused() {
3995 .len();3995 .len();
3996 assert_eq!(existing, 1, "only the admin");3996 assert_eq!(existing, 1, "only the admin");
3997 3997
3998- let dir = std::env::temp_dir().join(format!("izlek-fk-{}", Ulid::new()));3998+ let dir = std::env::temp_dir().join(format!("iz-fk-{}", Ulid::new()));
3999 std::fs::create_dir_all(&dir).unwrap();3999 std::fs::create_dir_all(&dir).unwrap();
4000- let path = dir.join("izlek.db").to_str().unwrap().to_owned();4000+ let path = dir.join("iz.db").to_str().unwrap().to_owned();
4001 {4001 {
4002 TursoStore::open(&path, &dir.join("storage")).await.unwrap();4002 TursoStore::open(&path, &dir.join("storage")).await.unwrap();
4003 }4003 }
@@ -4017,7 +4017,7 @@ async fn an_orphan_row_is_refused() {
4017 let refused = conn4017 let refused = conn
4018 .execute(4018 .execute(
4019 "INSERT INTO user (id, workspace_id, email, display_name, role, created_at) \4019 "INSERT INTO user (id, workspace_id, email, display_name, role, created_at) \
4020- VALUES ('u-orphan', 'no-such-workspace', 'orphan@izlek.sh', 'Orphan', \4020+ VALUES ('u-orphan', 'no-such-workspace', 'orphan@iz.sh', 'Orphan', \
4021 'member', '2026-08-26')",4021 'member', '2026-08-26')",
4022 (),4022 (),
4023 )4023 )
@@ -4038,7 +4038,7 @@ async fn moved_to(
4038 from: &str,4038 from: &str,
4039 to: &str,4039 to: &str,
4040 actor: &str,4040 actor: &str,
4041-) -> izlek_core::board::Transition {4041+) -> iz_core::board::Transition {
4042 let from_id = column_named(store, workspace, from).await;4042 let from_id = column_named(store, workspace, from).await;
4043 let to_id = column_named(store, workspace, to).await;4043 let to_id = column_named(store, workspace, to).await;
4044 match store4044 match store
@@ -4073,9 +4073,9 @@ async fn a_rule_naming_a_column_it_cannot_act_on_is_refused_by_the_schema() {
4073 // past it, straight at the table. The check constraint is the guard: a4073 // past it, straight at the table. The check constraint is the guard: a
4074 // column on a trigger that never reads one is a rule whose author meant4074 // column on a trigger that never reads one is a rule whose author meant
4075 // something the engine will not do.4075 // something the engine will not do.
4076- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));4076+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
4077 std::fs::create_dir_all(&dir).unwrap();4077 std::fs::create_dir_all(&dir).unwrap();
4078- let path = dir.join("izlek.db").to_string_lossy().into_owned();4078+ let path = dir.join("iz.db").to_string_lossy().into_owned();
4079 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();4079 let store = TursoStore::open(&path, &dir.join("storage")).await.unwrap();
4080 let (workspace, _admin) = claim(&store).await;4080 let (workspace, _admin) = claim(&store).await;
4081 let board = store.board(&workspace).await.unwrap().unwrap();4081 let board = store.board(&workspace).await.unwrap().unwrap();
@@ -4220,7 +4220,7 @@ async fn the_index_decides_who_owns_a_send() {
4220 let now = OffsetDateTime::now_utc();4220 let now = OffsetDateTime::now_utc();
4221 let first = scratch4221 let first = scratch
4222 .store4222 .store
4223- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4223+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4224 .await4224 .await
4225 .unwrap();4225 .unwrap();
4226 assert!(first.is_some(), "the first run owns the send");4226 assert!(first.is_some(), "the first run owns the send");
@@ -4230,7 +4230,7 @@ async fn the_index_decides_who_owns_a_send() {
4230 // first: the insert loses.4230 // first: the insert loses.
4231 let second = scratch4231 let second = scratch
4232 .store4232 .store
4233- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4233+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4234 .await4234 .await
4235 .unwrap();4235 .unwrap();
4236 assert!(second.is_none(), "the second run owns nothing");4236 assert!(second.is_none(), "the second run owns nothing");
@@ -4266,7 +4266,7 @@ async fn a_second_crossing_is_a_second_send() {
4266 assert!(4266 assert!(
4267 scratch4267 scratch
4268 .store4268 .store
4269- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4269+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4270 .await4270 .await
4271 .unwrap()4271 .unwrap()
4272 .is_some()4272 .is_some()
@@ -4300,7 +4300,7 @@ async fn a_refused_send_is_recorded_and_owed_again() {
4300 let now = OffsetDateTime::now_utc();4300 let now = OffsetDateTime::now_utc();
4301 let send = scratch4301 let send = scratch
4302 .store4302 .store
4303- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4303+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4304 .await4304 .await
4305 .unwrap()4305 .unwrap()
4306 .unwrap();4306 .unwrap();
@@ -4353,7 +4353,7 @@ async fn a_refused_address_is_not_retried_forever() {
4353 let now = OffsetDateTime::now_utc();4353 let now = OffsetDateTime::now_utc();
4354 let send = scratch4354 let send = scratch
4355 .store4355 .store
4356- .claim_send(&rule.id, &transition.id, &task, "gone@izlek.sh", now, now)4356+ .claim_send(&rule.id, &transition.id, &task, "gone@iz.sh", now, now)
4357 .await4357 .await
4358 .unwrap()4358 .unwrap()
4359 .unwrap();4359 .unwrap();
@@ -4396,7 +4396,7 @@ async fn an_accepted_send_stops_being_owed() {
4396 let now = OffsetDateTime::now_utc();4396 let now = OffsetDateTime::now_utc();
4397 let send = scratch4397 let send = scratch
4398 .store4398 .store
4399- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4399+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4400 .await4400 .await
4401 .unwrap()4401 .unwrap()
4402 .unwrap();4402 .unwrap();
@@ -4427,14 +4427,14 @@ async fn a_viewer_is_never_a_recipient() {
4427 .store4427 .store
4428 .create_user(NewUser {4428 .create_user(NewUser {
4429 workspace_id: workspace.clone(),4429 workspace_id: workspace.clone(),
4430- email: "viewer@izlek.sh".into(),4430+ email: "viewer@iz.sh".into(),
4431 display_name: "Vera".into(),4431 display_name: "Vera".into(),
4432 role: Role::Viewer,4432 role: Role::Viewer,
4433 invited_by: None,4433 invited_by: None,
4434 })4434 })
4435 .await4435 .await
4436 .unwrap();4436 .unwrap();
4437- let mate = member(&scratch.store, &workspace, "emre@izlek.sh", "Emre").await;4437+ let mate = member(&scratch.store, &workspace, "emre@iz.sh", "Emre").await;
4438 let task = add_task(4438 let task = add_task(
4439 &scratch.store,4439 &scratch.store,
4440 &workspace,4440 &workspace,
@@ -4455,7 +4455,7 @@ async fn a_viewer_is_never_a_recipient() {
4455 scratch.store.recipients_for_board(&board.id).await.unwrap(),4455 scratch.store.recipients_for_board(&board.id).await.unwrap(),
4456 ] {4456 ] {
4457 assert!(4457 assert!(
4458- list.iter().all(|person| person.email != "viewer@izlek.sh"),4458+ list.iter().all(|person| person.email != "viewer@iz.sh"),
4459 "a Viewer was about to be mailed: {list:?}"4459 "a Viewer was about to be mailed: {list:?}"
4460 );4460 );
4461 }4461 }
@@ -4465,7 +4465,7 @@ async fn a_viewer_is_never_a_recipient() {
4465 .iter()4465 .iter()
4466 .map(|p| p.email.as_str())4466 .map(|p| p.email.as_str())
4467 .collect::<Vec<_>>(),4467 .collect::<Vec<_>>(),
4468- ["emre@izlek.sh"]4468+ ["emre@iz.sh"]
4469 );4469 );
4470 }4470 }
4471 4471
@@ -4486,7 +4486,7 @@ async fn deleting_a_rule_takes_its_ledger_with_it() {
4486 let now = OffsetDateTime::now_utc();4486 let now = OffsetDateTime::now_utc();
4487 scratch4487 scratch
4488 .store4488 .store
4489- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)4489+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
4490 .await4490 .await
4491 .unwrap();4491 .unwrap();
4492 4492
@@ -4507,7 +4507,7 @@ async fn deleting_a_rule_takes_its_ledger_with_it() {
4507 4507
4508 // -- the engine ------------------------------------------------------------4508 // -- the engine ------------------------------------------------------------
4509 4509
4510-use izlek_core::mail::{Engine, MailError, Mailer, Outgoing, Report, backoff};4510+use iz_core::mail::{Engine, MailError, Mailer, Outgoing, Report, backoff};
4511 use std::sync::Mutex;4511 use std::sync::Mutex;
4512 4512
4513 /// A mail server that remembers instead of sending, and refuses when told to.4513 /// A mail server that remembers instead of sending, and refuses when told to.
@@ -4558,10 +4558,10 @@ async fn shared() -> (PathBuf, Arc<TursoStore>, String, String) {
4558 4558
4559 /// The same, with a quiet window of `minutes` on the workspace.4559 /// The same, with a quiet window of `minutes` on the workspace.
4560 async fn waiting(minutes: u32) -> (PathBuf, Arc<TursoStore>, String, String) {4560 async fn waiting(minutes: u32) -> (PathBuf, Arc<TursoStore>, String, String) {
4561- let dir = std::env::temp_dir().join(format!("izlek-test-{}", Ulid::new()));4561+ let dir = std::env::temp_dir().join(format!("iz-test-{}", Ulid::new()));
4562 std::fs::create_dir_all(&dir).unwrap();4562 std::fs::create_dir_all(&dir).unwrap();
4563 let store = Arc::new(4563 let store = Arc::new(
4564- TursoStore::open(dir.join("izlek.db").to_str().unwrap(), &dir.join("storage"))4564+ TursoStore::open(dir.join("iz.db").to_str().unwrap(), &dir.join("storage"))
4565 .await4565 .await
4566 .unwrap(),4566 .unwrap(),
4567 );4567 );
@@ -4584,7 +4584,7 @@ async fn waiting(minutes: u32) -> (PathBuf, Arc<TursoStore>, String, String) {
4584 #[tokio::test]4584 #[tokio::test]
4585 async fn a_crossing_mails_the_people_on_the_card_once() {4585 async fn a_crossing_mails_the_people_on_the_card_once() {
4586 let (dir, store, workspace, admin) = shared().await;4586 let (dir, store, workspace, admin) = shared().await;
4587- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4587+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4588 let task = add_task(4588 let task = add_task(
4589 &store,4589 &store,
4590 &workspace,4590 &workspace,
@@ -4598,7 +4598,7 @@ async fn a_crossing_mails_the_people_on_the_card_once() {
4598 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;4598 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
4599 4599
4600 let mailer = Remembering::taking_everything();4600 let mailer = Remembering::taking_everything();
4601- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4601+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4602 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4602 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4603 4603
4604 let first = engine.on_transition(&transition).await.unwrap();4604 let first = engine.on_transition(&transition).await.unwrap();
@@ -4611,11 +4611,11 @@ async fn a_crossing_mails_the_people_on_the_card_once() {
4611 4611
4612 let sent = mailer.sent();4612 let sent = mailer.sent();
4613 assert_eq!(sent.len(), 1);4613 assert_eq!(sent.len(), 1);
4614- assert_eq!(sent[0].to, "emre@izlek.sh");4614+ assert_eq!(sent[0].to, "emre@iz.sh");
4615 assert_eq!(sent[0].subject, "Task completed");4615 assert_eq!(sent[0].subject, "Task completed");
4616 assert!(sent[0].body.contains("CLI install script"));4616 assert!(sent[0].body.contains("CLI install script"));
4617 assert!(4617 assert!(
4618- sent[0].body.contains("https://izlek.sh/?task="),4618+ sent[0].body.contains("https://iz.sh/?task="),
4619 "the mail links back to the task: {}",4619 "the mail links back to the task: {}",
4620 sent[0].body4620 sent[0].body
4621 );4621 );
@@ -4626,7 +4626,7 @@ async fn a_crossing_mails_the_people_on_the_card_once() {
4626 #[tokio::test]4626 #[tokio::test]
4627 async fn a_task_created_straight_into_a_watched_column_mails_too() {4627 async fn a_task_created_straight_into_a_watched_column_mails_too() {
4628 let (dir, store, workspace, admin) = shared().await;4628 let (dir, store, workspace, admin) = shared().await;
4629- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4629+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4630 let rule = a_rule(&store, &workspace, "In Progress", "Work started").await;4630 let rule = a_rule(&store, &workspace, "In Progress", "Work started").await;
4631 4631
4632 let board = store.board(&workspace).await.unwrap().unwrap();4632 let board = store.board(&workspace).await.unwrap().unwrap();
@@ -4650,13 +4650,13 @@ async fn a_task_created_straight_into_a_watched_column_mails_too() {
4650 assert_eq!(created.transition.to_column, column_id);4650 assert_eq!(created.transition.to_column, column_id);
4651 4651
4652 let mailer = Remembering::taking_everything();4652 let mailer = Remembering::taking_everything();
4653- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4653+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4654 let report = engine.on_transition(&created.transition).await.unwrap();4654 let report = engine.on_transition(&created.transition).await.unwrap();
4655 assert_eq!(report.sent, 1);4655 assert_eq!(report.sent, 1);
4656 4656
4657 let sent = mailer.sent();4657 let sent = mailer.sent();
4658 assert_eq!(sent.len(), 1);4658 assert_eq!(sent.len(), 1);
4659- assert_eq!(sent[0].to, "emre@izlek.sh");4659+ assert_eq!(sent[0].to, "emre@iz.sh");
4660 assert_eq!(sent[0].subject, "Work started");4660 assert_eq!(sent[0].subject, "Work started");
4661 assert_eq!(store.sends_for_rule(&rule.id, 10).await.unwrap().len(), 1);4661 assert_eq!(store.sends_for_rule(&rule.id, 10).await.unwrap().len(), 1);
4662 let _ = std::fs::remove_dir_all(&dir);4662 let _ = std::fs::remove_dir_all(&dir);
@@ -4665,12 +4665,12 @@ async fn a_task_created_straight_into_a_watched_column_mails_too() {
4665 #[tokio::test]4665 #[tokio::test]
4666 async fn an_edited_rule_does_not_remail_a_crossing_it_already_covered() {4666 async fn an_edited_rule_does_not_remail_a_crossing_it_already_covered() {
4667 let (dir, store, workspace, admin) = shared().await;4667 let (dir, store, workspace, admin) = shared().await;
4668- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4668+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4669 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4669 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4670 store.assign_task(&task, &mate).await.unwrap();4670 store.assign_task(&task, &mate).await.unwrap();
4671 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;4671 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
4672 let mailer = Remembering::taking_everything();4672 let mailer = Remembering::taking_everything();
4673- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4673+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4674 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4674 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4675 engine.on_transition(&transition).await.unwrap();4675 engine.on_transition(&transition).await.unwrap();
4676 4676
@@ -4688,14 +4688,14 @@ async fn an_edited_rule_does_not_remail_a_crossing_it_already_covered() {
4688 #[tokio::test]4688 #[tokio::test]
4689 async fn a_rule_that_is_off_sends_nothing() {4689 async fn a_rule_that_is_off_sends_nothing() {
4690 let (dir, store, workspace, admin) = shared().await;4690 let (dir, store, workspace, admin) = shared().await;
4691- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4691+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4692 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4692 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4693 store.assign_task(&task, &mate).await.unwrap();4693 store.assign_task(&task, &mate).await.unwrap();
4694 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;4694 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
4695 store.set_mail_rule_enabled(&rule.id, false).await.unwrap();4695 store.set_mail_rule_enabled(&rule.id, false).await.unwrap();
4696 4696
4697 let mailer = Remembering::taking_everything();4697 let mailer = Remembering::taking_everything();
4698- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4698+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4699 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4699 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4700 assert_eq!(4700 assert_eq!(
4701 engine.on_transition(&transition).await.unwrap(),4701 engine.on_transition(&transition).await.unwrap(),
@@ -4711,7 +4711,7 @@ async fn a_rule_that_is_off_sends_nothing() {
4711 #[tokio::test]4711 #[tokio::test]
4712 async fn a_rule_can_opt_the_task_key_into_its_own_mail() {4712 async fn a_rule_can_opt_the_task_key_into_its_own_mail() {
4713 let (dir, store, workspace, admin) = shared().await;4713 let (dir, store, workspace, admin) = shared().await;
4714- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4714+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4715 let board = store.board(&workspace).await.unwrap().unwrap();4715 let board = store.board(&workspace).await.unwrap().unwrap();
4716 let with_details = add_task(4716 let with_details = add_task(
4717 &store,4717 &store,
@@ -4740,7 +4740,7 @@ async fn a_rule_can_opt_the_task_key_into_its_own_mail() {
4740 let opted_out = a_rule(&store, &workspace, "Done", "Task completed, plain").await;4740 let opted_out = a_rule(&store, &workspace, "Done", "Task completed, plain").await;
4741 4741
4742 let mailer = Remembering::taking_everything();4742 let mailer = Remembering::taking_everything();
4743- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4743+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4744 4744
4745 let moved = moved_to(&store, &workspace, &with_details, "Backlog", "Done", &admin).await;4745 let moved = moved_to(&store, &workspace, &with_details, "Backlog", "Done", &admin).await;
4746 engine.on_transition(&moved).await.unwrap();4746 engine.on_transition(&moved).await.unwrap();
@@ -4776,7 +4776,7 @@ async fn a_rule_can_opt_the_task_key_into_its_own_mail() {
4776 #[tokio::test]4776 #[tokio::test]
4777 async fn a_mail_says_when_the_card_moved_not_when_it_was_sent() {4777 async fn a_mail_says_when_the_card_moved_not_when_it_was_sent() {
4778 let (dir, store, workspace, admin) = shared().await;4778 let (dir, store, workspace, admin) = shared().await;
4779- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4779+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4780 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4780 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4781 store.assign_task(&task, &mate).await.unwrap();4781 store.assign_task(&task, &mate).await.unwrap();
4782 a_rule(&store, &workspace, "Done", "Task completed").await;4782 a_rule(&store, &workspace, "Done", "Task completed").await;
@@ -4784,7 +4784,7 @@ async fn a_mail_says_when_the_card_moved_not_when_it_was_sent() {
4784 // The server is down when the card moves and comes back later. The mail4784 // The server is down when the card moves and comes back later. The mail
4785 // that finally goes out has to say Tuesday, not Thursday.4785 // that finally goes out has to say Tuesday, not Thursday.
4786 let mailer = Remembering::refusing(vec![MailError::retryable("connection refused")]);4786 let mailer = Remembering::refusing(vec![MailError::retryable("connection refused")]);
4787- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4787+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4788 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4788 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4789 let refused = engine.on_transition(&transition).await.unwrap();4789 let refused = engine.on_transition(&transition).await.unwrap();
4790 assert_eq!(refused.failed, 1);4790 assert_eq!(refused.failed, 1);
@@ -4805,28 +4805,28 @@ async fn a_mail_says_when_the_card_moved_not_when_it_was_sent() {
4805 #[tokio::test]4805 #[tokio::test]
4806 async fn a_failing_send_is_retried_a_bounded_number_of_times_and_then_written_off() {4806 async fn a_failing_send_is_retried_a_bounded_number_of_times_and_then_written_off() {
4807 let (dir, store, workspace, admin) = shared().await;4807 let (dir, store, workspace, admin) = shared().await;
4808- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4808+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4809 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4809 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4810 store.assign_task(&task, &mate).await.unwrap();4810 store.assign_task(&task, &mate).await.unwrap();
4811 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;4811 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
4812 4812
4813 let mailer = Remembering::refusing(4813 let mailer = Remembering::refusing(
4814- (0..izlek_core::mail::MAX_ATTEMPTS)4814+ (0..iz_core::mail::MAX_ATTEMPTS)
4815 .map(|_| MailError::retryable("connection timed out"))4815 .map(|_| MailError::retryable("connection timed out"))
4816 .collect(),4816 .collect(),
4817 );4817 );
4818- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4818+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4819 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4819 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4820 engine.on_transition(&transition).await.unwrap();4820 engine.on_transition(&transition).await.unwrap();
4821 4821
4822 let mut when = OffsetDateTime::now_utc();4822 let mut when = OffsetDateTime::now_utc();
4823- for _ in 1..izlek_core::mail::MAX_ATTEMPTS {4823+ for _ in 1..iz_core::mail::MAX_ATTEMPTS {
4824- when += backoff(izlek_core::mail::MAX_ATTEMPTS) + Duration::minutes(1);4824+ when += backoff(iz_core::mail::MAX_ATTEMPTS) + Duration::minutes(1);
4825 engine.deliver_owed(when, 10).await.unwrap();4825 engine.deliver_owed(when, 10).await.unwrap();
4826 }4826 }
4827 4827
4828 let ledger = &store.sends_for_rule(&rule.id, 10).await.unwrap()[0];4828 let ledger = &store.sends_for_rule(&rule.id, 10).await.unwrap()[0];
4829- assert_eq!(ledger.attempts, izlek_core::mail::MAX_ATTEMPTS);4829+ assert_eq!(ledger.attempts, iz_core::mail::MAX_ATTEMPTS);
4830 assert_eq!(ledger.state, SendState::Abandoned);4830 assert_eq!(ledger.state, SendState::Abandoned);
4831 assert_eq!(ledger.last_error.as_deref(), Some("connection timed out"));4831 assert_eq!(ledger.last_error.as_deref(), Some("connection timed out"));
4832 assert!(4832 assert!(
@@ -4844,13 +4844,13 @@ async fn a_failing_send_is_retried_a_bounded_number_of_times_and_then_written_of
4844 #[tokio::test]4844 #[tokio::test]
4845 async fn a_refused_address_is_written_off_at_the_first_answer() {4845 async fn a_refused_address_is_written_off_at_the_first_answer() {
4846 let (dir, store, workspace, admin) = shared().await;4846 let (dir, store, workspace, admin) = shared().await;
4847- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4847+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4848 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4848 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4849 store.assign_task(&task, &mate).await.unwrap();4849 store.assign_task(&task, &mate).await.unwrap();
4850 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;4850 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
4851 4851
4852 let mailer = Remembering::refusing(vec![MailError::permanent("550 no such mailbox")]);4852 let mailer = Remembering::refusing(vec![MailError::permanent("550 no such mailbox")]);
4853- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4853+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4854 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;4854 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
4855 let report = engine.on_transition(&transition).await.unwrap();4855 let report = engine.on_transition(&transition).await.unwrap();
4856 assert_eq!(report.abandoned, 1);4856 assert_eq!(report.abandoned, 1);
@@ -4865,7 +4865,7 @@ async fn a_refused_address_is_written_off_at_the_first_answer() {
4865 #[tokio::test]4865 #[tokio::test]
4866 async fn you_can_start_now_waits_for_the_last_blocker() {4866 async fn you_can_start_now_waits_for_the_last_blocker() {
4867 let (dir, store, workspace, admin) = shared().await;4867 let (dir, store, workspace, admin) = shared().await;
4868- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4868+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4869 let board = store.board(&workspace).await.unwrap().unwrap();4869 let board = store.board(&workspace).await.unwrap().unwrap();
4870 let waiting = add_task(4870 let waiting = add_task(
4871 &store,4871 &store,
@@ -4903,7 +4903,7 @@ async fn you_can_start_now_waits_for_the_last_blocker() {
4903 .unwrap();4903 .unwrap();
4904 4904
4905 let mailer = Remembering::taking_everything();4905 let mailer = Remembering::taking_everything();
4906- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4906+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4907 4907
4908 // One blocker finished is not unblocked: the other one is still in the way,4908 // One blocker finished is not unblocked: the other one is still in the way,
4909 // and telling Emre to start would be a lie.4909 // and telling Emre to start would be a lie.
@@ -4915,7 +4915,7 @@ async fn you_can_start_now_waits_for_the_last_blocker() {
4915 assert_eq!(engine.on_transition(&two).await.unwrap().sent, 1);4915 assert_eq!(engine.on_transition(&two).await.unwrap().sent, 1);
4916 let sent = mailer.sent();4916 let sent = mailer.sent();
4917 assert_eq!(sent.len(), 1);4917 assert_eq!(sent.len(), 1);
4918- assert_eq!(sent[0].to, "emre@izlek.sh");4918+ assert_eq!(sent[0].to, "emre@iz.sh");
4919 assert!(4919 assert!(
4920 sent[0].body.contains("Onboarding mails"),4920 sent[0].body.contains("Onboarding mails"),
4921 "the mail is about the freed task, not the blocker: {}",4921 "the mail is about the freed task, not the blocker: {}",
@@ -4927,7 +4927,7 @@ async fn you_can_start_now_waits_for_the_last_blocker() {
4927 #[tokio::test]4927 #[tokio::test]
4928 async fn a_card_that_did_not_move_owes_nobody_a_mail() {4928 async fn a_card_that_did_not_move_owes_nobody_a_mail() {
4929 let (dir, store, workspace, admin) = shared().await;4929 let (dir, store, workspace, admin) = shared().await;
4930- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4930+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4931 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;4931 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
4932 store.assign_task(&task, &mate).await.unwrap();4932 store.assign_task(&task, &mate).await.unwrap();
4933 a_rule(&store, &workspace, "Done", "Task completed").await;4933 a_rule(&store, &workspace, "Done", "Task completed").await;
@@ -4947,7 +4947,7 @@ async fn a_card_that_did_not_move_owes_nobody_a_mail() {
4947 #[tokio::test]4947 #[tokio::test]
4948 async fn a_deleted_blocker_also_says_you_can_start_now() {4948 async fn a_deleted_blocker_also_says_you_can_start_now() {
4949 let (dir, store, workspace, admin) = shared().await;4949 let (dir, store, workspace, admin) = shared().await;
4950- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;4950+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
4951 let board = store.board(&workspace).await.unwrap().unwrap();4951 let board = store.board(&workspace).await.unwrap().unwrap();
4952 let waiting = add_task(4952 let waiting = add_task(
4953 &store,4953 &store,
@@ -4975,7 +4975,7 @@ async fn a_deleted_blocker_also_says_you_can_start_now() {
4975 .unwrap();4975 .unwrap();
4976 4976
4977 let mailer = Remembering::taking_everything();4977 let mailer = Remembering::taking_everything();
4978- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");4978+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
4979 4979
4980 // A blocker can leave the way in two ways, and being deleted is one of4980 // A blocker can leave the way in two ways, and being deleted is one of
4981 // them. The person waiting hears about it either way.4981 // them. The person waiting hears about it either way.
@@ -4993,7 +4993,7 @@ async fn a_deleted_blocker_also_says_you_can_start_now() {
4993 4993
4994 let sent = mailer.sent();4994 let sent = mailer.sent();
4995 assert_eq!(sent.len(), 1);4995 assert_eq!(sent.len(), 1);
4996- assert_eq!(sent[0].to, "emre@izlek.sh");4996+ assert_eq!(sent[0].to, "emre@iz.sh");
4997 assert_eq!(sent[0].subject, "You can start now");4997 assert_eq!(sent[0].subject, "You can start now");
4998 assert!(4998 assert!(
4999 sent[0].body.contains("Onboarding mails"),4999 sent[0].body.contains("Onboarding mails"),
@@ -5011,7 +5011,7 @@ async fn a_deleted_blocker_also_says_you_can_start_now() {
5011 #[tokio::test]5011 #[tokio::test]
5012 async fn a_delete_that_leaves_somebody_still_waiting_mails_nobody() {5012 async fn a_delete_that_leaves_somebody_still_waiting_mails_nobody() {
5013 let (dir, store, workspace, admin) = shared().await;5013 let (dir, store, workspace, admin) = shared().await;
5014- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5014+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5015 let board = store.board(&workspace).await.unwrap().unwrap();5015 let board = store.board(&workspace).await.unwrap().unwrap();
5016 let waiting = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5016 let waiting = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5017 let first = add_task(&store, &workspace, "Backlog", "Signing keys", None, &admin).await;5017 let first = add_task(&store, &workspace, "Backlog", "Signing keys", None, &admin).await;
@@ -5041,7 +5041,7 @@ async fn a_delete_that_leaves_somebody_still_waiting_mails_nobody() {
5041 .unwrap();5041 .unwrap();
5042 5042
5043 let mailer = Remembering::taking_everything();5043 let mailer = Remembering::taking_everything();
5044- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5044+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5045 5045
5046 // Deleting one of two blockers frees nobody, so there is no event at all5046 // Deleting one of two blockers frees nobody, so there is no event at all
5047 // and nothing to fire on.5047 // and nothing to fire on.
@@ -5068,7 +5068,7 @@ async fn a_delete_that_leaves_somebody_still_waiting_mails_nobody() {
5068 #[tokio::test]5068 #[tokio::test]
5069 async fn a_mail_owed_by_a_delete_is_rebuilt_from_the_delete_on_a_retry() {5069 async fn a_mail_owed_by_a_delete_is_rebuilt_from_the_delete_on_a_retry() {
5070 let (dir, store, workspace, admin) = shared().await;5070 let (dir, store, workspace, admin) = shared().await;
5071- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5071+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5072 let board = store.board(&workspace).await.unwrap().unwrap();5072 let board = store.board(&workspace).await.unwrap().unwrap();
5073 let waiting = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5073 let waiting = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5074 let blocker = add_task(&store, &workspace, "Backlog", "Signing keys", None, &admin).await;5074 let blocker = add_task(&store, &workspace, "Backlog", "Signing keys", None, &admin).await;
@@ -5092,7 +5092,7 @@ async fn a_mail_owed_by_a_delete_is_rebuilt_from_the_delete_on_a_retry() {
5092 // readable back as an event — the deleted task's key included, since the5092 // readable back as an event — the deleted task's key included, since the
5093 // task itself is gone.5093 // task itself is gone.
5094 let mailer = Remembering::refusing(vec![MailError::retryable("connection refused")]);5094 let mailer = Remembering::refusing(vec![MailError::retryable("connection refused")]);
5095- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5095+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5096 let deletion = store.delete_task(&blocker, &admin, now).await.unwrap();5096 let deletion = store.delete_task(&blocker, &admin, now).await.unwrap();
5097 let freeing = deletion.event.clone().unwrap();5097 let freeing = deletion.event.clone().unwrap();
5098 assert_eq!(5098 assert_eq!(
@@ -5122,16 +5122,16 @@ async fn a_mail_owed_by_a_delete_is_rebuilt_from_the_delete_on_a_retry() {
5122 #[tokio::test]5122 #[tokio::test]
5123 async fn nobody_is_mailed_about_what_they_did_themselves() {5123 async fn nobody_is_mailed_about_what_they_did_themselves() {
5124 let (dir, store, workspace, admin) = shared().await;5124 let (dir, store, workspace, admin) = shared().await;
5125- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5125+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5126 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5126 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5127 store.assign_task(&task, &mate).await.unwrap();5127 store.assign_task(&task, &mate).await.unwrap();
5128 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;5128 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
5129 5129
5130 let mailer = Remembering::taking_everything();5130 let mailer = Remembering::taking_everything();
5131- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5131+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5132 5132
5133 // Emre is the only assignee and Emre moved the card. Telling him what he5133 // Emre is the only assignee and Emre moved the card. Telling him what he
5134- // just did is how a person learns to filter İzlek's mail away.5134+ // just did is how a person learns to filter İz's mail away.
5135 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;5135 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;
5136 let report = engine.on_transition(&transition).await.unwrap();5136 let report = engine.on_transition(&transition).await.unwrap();
5137 assert_eq!(report, Default::default());5137 assert_eq!(report, Default::default());
@@ -5145,18 +5145,18 @@ async fn nobody_is_mailed_about_what_they_did_themselves() {
5145 #[tokio::test]5145 #[tokio::test]
5146 async fn a_rule_that_owed_nobody_still_says_so() {5146 async fn a_rule_that_owed_nobody_still_says_so() {
5147 let (dir, store, workspace, admin) = shared().await;5147 let (dir, store, workspace, admin) = shared().await;
5148- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5148+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5149 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5149 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5150 store.assign_task(&task, &mate).await.unwrap();5150 store.assign_task(&task, &mate).await.unwrap();
5151 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;5151 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
5152 5152
5153 let mailer = Remembering::taking_everything();5153 let mailer = Remembering::taking_everything();
5154- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5154+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5155 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;5155 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;
5156 engine.on_transition(&transition).await.unwrap();5156 engine.on_transition(&transition).await.unwrap();
5157 5157
5158 let decisions = store5158 let decisions = store
5159- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)5159+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
5160 .await5160 .await
5161 .unwrap();5161 .unwrap();
5162 let row = decisions5162 let row = decisions
@@ -5174,14 +5174,14 @@ async fn a_rule_that_did_not_match_leaves_a_reason() {
5174 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;5174 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
5175 5175
5176 let mailer = Remembering::taking_everything();5176 let mailer = Remembering::taking_everything();
5177- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5177+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5178 // Rule watches "Done"; this crossing lands in "Review", so the rule never5178 // Rule watches "Done"; this crossing lands in "Review", so the rule never
5179 // fires for it.5179 // fires for it.
5180 let transition = moved_to(&store, &workspace, &task, "Backlog", "Review", &admin).await;5180 let transition = moved_to(&store, &workspace, &task, "Backlog", "Review", &admin).await;
5181 engine.on_transition(&transition).await.unwrap();5181 engine.on_transition(&transition).await.unwrap();
5182 5182
5183 let decisions = store5183 let decisions = store
5184- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)5184+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
5185 .await5185 .await
5186 .unwrap();5186 .unwrap();
5187 let row = decisions5187 let row = decisions
@@ -5200,7 +5200,7 @@ async fn a_deleted_task_still_leaves_a_task_gone_row() {
5200 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;5200 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
5201 5201
5202 let mailer = Remembering::taking_everything();5202 let mailer = Remembering::taking_everything();
5203- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5203+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5204 // The crossing happened; the task is gone before the engine gets to it —5204 // The crossing happened; the task is gone before the engine gets to it —
5205 // a retry, or a worker that lagged behind a delete.5205 // a retry, or a worker that lagged behind a delete.
5206 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;5206 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &admin).await;
@@ -5214,7 +5214,7 @@ async fn a_deleted_task_still_leaves_a_task_gone_row() {
5214 assert!(mailer.sent().is_empty());5214 assert!(mailer.sent().is_empty());
5215 5215
5216 let decisions = store5216 let decisions = store
5217- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)5217+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
5218 .await5218 .await
5219 .unwrap();5219 .unwrap();
5220 let row = decisions5220 let row = decisions
@@ -5230,7 +5230,7 @@ async fn a_deleted_task_still_leaves_a_task_gone_row() {
5230 #[tokio::test]5230 #[tokio::test]
5231 async fn the_actor_comes_off_the_board_audience_too_and_the_rest_still_get_it() {5231 async fn the_actor_comes_off_the_board_audience_too_and_the_rest_still_get_it() {
5232 let (dir, store, workspace, admin) = shared().await;5232 let (dir, store, workspace, admin) = shared().await;
5233- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5233+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5234 let board = store.board(&workspace).await.unwrap().unwrap();5234 let board = store.board(&workspace).await.unwrap().unwrap();
5235 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5235 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5236 let column_id = column_named(&store, &workspace, "Done").await;5236 let column_id = column_named(&store, &workspace, "Done").await;
@@ -5247,13 +5247,13 @@ async fn the_actor_comes_off_the_board_audience_too_and_the_rest_still_get_it()
5247 .unwrap();5247 .unwrap();
5248 5248
5249 let mailer = Remembering::taking_everything();5249 let mailer = Remembering::taking_everything();
5250- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5250+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5251 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;5251 let transition = moved_to(&store, &workspace, &task, "Backlog", "Done", &mate).await;
5252 assert_eq!(engine.on_transition(&transition).await.unwrap().sent, 1);5252 assert_eq!(engine.on_transition(&transition).await.unwrap().sent, 1);
5253 5253
5254 let sent = mailer.sent();5254 let sent = mailer.sent();
5255 assert_eq!(sent.len(), 1, "the board minus the person who moved it");5255 assert_eq!(sent.len(), 1, "the board minus the person who moved it");
5256- assert_eq!(sent[0].to, "ada@izlek.sh");5256+ assert_eq!(sent[0].to, "ada@iz.sh");
5257 let _ = std::fs::remove_dir_all(&dir);5257 let _ = std::fs::remove_dir_all(&dir);
5258 }5258 }
5259 5259
@@ -5342,7 +5342,7 @@ async fn updating_a_rule_leaves_its_identity_and_ledger_alone() {
5342 5342
5343 let decisions = scratch5343 let decisions = scratch
5344 .store5344 .store
5345- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)5345+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
5346 .await5346 .await
5347 .unwrap();5347 .unwrap();
5348 assert!(5348 assert!(
@@ -5372,7 +5372,7 @@ async fn a_rules_creator_audience_names_who_opened_the_card() {
5372 .store5372 .store
5373 .create_user(NewUser {5373 .create_user(NewUser {
5374 workspace_id: workspace.clone(),5374 workspace_id: workspace.clone(),
5375- email: "viewer@izlek.sh".into(),5375+ email: "viewer@iz.sh".into(),
5376 display_name: "Vera".into(),5376 display_name: "Vera".into(),
5377 role: Role::Viewer,5377 role: Role::Viewer,
5378 invited_by: None,5378 invited_by: None,
@@ -5434,7 +5434,7 @@ async fn an_account_records_the_admin_who_made_it() {
5434 .store5434 .store
5435 .create_user(NewUser {5435 .create_user(NewUser {
5436 workspace_id: ws_id,5436 workspace_id: ws_id,
5437- email: "grace@izlek.sh".into(),5437+ email: "grace@iz.sh".into(),
5438 display_name: "Grace".into(),5438 display_name: "Grace".into(),
5439 role: Role::Member,5439 role: Role::Member,
5440 invited_by: Some(admin_id.clone()),5440 invited_by: Some(admin_id.clone()),
@@ -5534,7 +5534,7 @@ async fn a_file_name_that_is_a_path_is_stored_as_the_label_it_is() {
5534 let written: Vec<String> = std::fs::read_dir(&scratch.dir)5534 let written: Vec<String> = std::fs::read_dir(&scratch.dir)
5535 .unwrap()5535 .unwrap()
5536 .map(|entry| entry.unwrap().file_name().to_string_lossy().into_owned())5536 .map(|entry| entry.unwrap().file_name().to_string_lossy().into_owned())
5537- .filter(|name| !name.starts_with("izlek.db") && name != "izlek.key" && name != "storage")5537+ .filter(|name| !name.starts_with("iz.db") && name != "iz.key" && name != "storage")
5538 .collect();5538 .collect();
5539 assert!(written.is_empty(), "{written:?}");5539 assert!(written.is_empty(), "{written:?}");
5540 }5540 }
@@ -5605,7 +5605,7 @@ async fn a_file_can_be_taken_away_and_saying_so_twice_is_answered_honestly() {
5605 /// come back in.5605 /// come back in.
5606 #[tokio::test]5606 #[tokio::test]
5607 async fn keyset_paging_covers_the_queue_ascending() {5607 async fn keyset_paging_covers_the_queue_ascending() {
5608- use izlek_core::store::{FeedCursor, FeedPage};5608+ use iz_core::store::{FeedCursor, FeedPage};
5609 5609
5610 let (scratch, _workspace, _admin) = workspace_with_admin().await;5610 let (scratch, _workspace, _admin) = workspace_with_admin().await;
5611 let store = &scratch.store;5611 let store = &scratch.store;
@@ -5613,7 +5613,7 @@ async fn keyset_paging_covers_the_queue_ascending() {
5613 for i in 0..11 {5613 for i in 0..11 {
5614 store5614 store
5615 .queue_invite(5615 .queue_invite(
5616- &format!("row{i}@izlek.sh"),5616+ &format!("row{i}@iz.sh"),
5617 "Join",5617 "Join",
5618 "Come aboard.",5618 "Come aboard.",
5619 t0 + Duration::seconds(i),5619 t0 + Duration::seconds(i),
@@ -5658,7 +5658,7 @@ async fn the_queue_shows_what_is_owed_and_not_what_is_done() {
5658 &rule.id,5658 &rule.id,
5659 &transition.id,5659 &transition.id,
5660 &task,5660 &task,
5661- "pending@izlek.sh",5661+ "pending@iz.sh",
5662 now,5662 now,
5663 now,5663 now,
5664 )5664 )
@@ -5667,7 +5667,7 @@ async fn the_queue_shows_what_is_owed_and_not_what_is_done() {
5667 .unwrap();5667 .unwrap();
5668 5668
5669 let failed = store5669 let failed = store
5670- .claim_send(&rule.id, &transition.id, &task, "failed@izlek.sh", now, now)5670+ .claim_send(&rule.id, &transition.id, &task, "failed@iz.sh", now, now)
5671 .await5671 .await
5672 .unwrap()5672 .unwrap()
5673 .unwrap();5673 .unwrap();
@@ -5677,7 +5677,7 @@ async fn the_queue_shows_what_is_owed_and_not_what_is_done() {
5677 .unwrap();5677 .unwrap();
5678 5678
5679 let sent = store5679 let sent = store
5680- .claim_send(&rule.id, &transition.id, &task, "sent@izlek.sh", now, now)5680+ .claim_send(&rule.id, &transition.id, &task, "sent@iz.sh", now, now)
5681 .await5681 .await
5682 .unwrap()5682 .unwrap()
5683 .unwrap();5683 .unwrap();
@@ -5688,7 +5688,7 @@ async fn the_queue_shows_what_is_owed_and_not_what_is_done() {
5688 &rule.id,5688 &rule.id,
5689 &transition.id,5689 &transition.id,
5690 &task,5690 &task,
5691- "abandoned@izlek.sh",5691+ "abandoned@iz.sh",
5692 now,5692 now,
5693 now,5693 now,
5694 )5694 )
@@ -5701,7 +5701,7 @@ async fn the_queue_shows_what_is_owed_and_not_what_is_done() {
5701 .unwrap();5701 .unwrap();
5702 5702
5703 let queue = store5703 let queue = store
5704- .mail_queue(10, izlek_core::store::FeedPage::Newest)5704+ .mail_queue(10, iz_core::store::FeedPage::Newest)
5705 .await5705 .await
5706 .unwrap();5706 .unwrap();
5707 let ids: Vec<&str> = queue.iter().map(|s| s.id.as_str()).collect();5707 let ids: Vec<&str> = queue.iter().map(|s| s.id.as_str()).collect();
@@ -5718,7 +5718,7 @@ async fn an_invite_mail_is_owed_without_a_rule() {
5718 let now = OffsetDateTime::now_utc();5718 let now = OffsetDateTime::now_utc();
5719 5719
5720 let invite = store5720 let invite = store
5721- .queue_invite("newcomer@izlek.sh", "Join İzlek", "Come aboard.", now)5721+ .queue_invite("newcomer@iz.sh", "Join İz", "Come aboard.", now)
5722 .await5722 .await
5723 .unwrap();5723 .unwrap();
5724 assert_eq!(invite.rule_id, None);5724 assert_eq!(invite.rule_id, None);
@@ -5729,7 +5729,7 @@ async fn an_invite_mail_is_owed_without_a_rule() {
5729 assert_eq!(found.rule_id, None);5729 assert_eq!(found.rule_id, None);
5730 5730
5731 let queue = store5731 let queue = store
5732- .mail_queue(10, izlek_core::store::FeedPage::Newest)5732+ .mail_queue(10, iz_core::store::FeedPage::Newest)
5733 .await5733 .await
5734 .unwrap();5734 .unwrap();
5735 let found = queue.iter().find(|s| s.id == invite.id).unwrap();5735 let found = queue.iter().find(|s| s.id == invite.id).unwrap();
@@ -5741,23 +5741,23 @@ async fn an_invite_mail_with_no_sender_is_held_not_failed() {
5741 let (dir, store, _workspace, _admin) = shared().await;5741 let (dir, store, _workspace, _admin) = shared().await;
5742 let now = OffsetDateTime::now_utc();5742 let now = OffsetDateTime::now_utc();
5743 store5743 store
5744- .queue_invite("newcomer@izlek.sh", "Join İzlek", "Come aboard.", now)5744+ .queue_invite("newcomer@iz.sh", "Join İz", "Come aboard.", now)
5745 .await5745 .await
5746 .unwrap();5746 .unwrap();
5747 5747
5748 let mailer = Remembering::refusing(vec![MailError::unsent("no sender configured")]);5748 let mailer = Remembering::refusing(vec![MailError::unsent("no sender configured")]);
5749- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5749+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5750 let report = engine.deliver_owed(now, 10).await.unwrap();5750 let report = engine.deliver_owed(now, 10).await.unwrap();
5751 assert_eq!(report.held, 1);5751 assert_eq!(report.held, 1);
5752 assert_eq!(report.sent, 0);5752 assert_eq!(report.sent, 0);
5753 5753
5754 let queue = store5754 let queue = store
5755- .mail_queue(10, izlek_core::store::FeedPage::Newest)5755+ .mail_queue(10, iz_core::store::FeedPage::Newest)
5756 .await5756 .await
5757 .unwrap();5757 .unwrap();
5758 let held = queue5758 let held = queue
5759 .iter()5759 .iter()
5760- .find(|s| s.recipient == "newcomer@izlek.sh")5760+ .find(|s| s.recipient == "newcomer@iz.sh")
5761 .unwrap();5761 .unwrap();
5762 assert_eq!(held.attempts, 0);5762 assert_eq!(held.attempts, 0);
5763 let _ = std::fs::remove_dir_all(&dir);5763 let _ = std::fs::remove_dir_all(&dir);
@@ -5788,7 +5788,7 @@ async fn two_passes_over_one_owed_mail_send_it_once() {
5788 let (dir, store, _workspace, _admin) = shared().await;5788 let (dir, store, _workspace, _admin) = shared().await;
5789 let now = OffsetDateTime::now_utc();5789 let now = OffsetDateTime::now_utc();
5790 store5790 store
5791- .queue_invite("newcomer@izlek.sh", "Join İzlek", "Come aboard.", now)5791+ .queue_invite("newcomer@iz.sh", "Join İz", "Come aboard.", now)
5792 .await5792 .await
5793 .unwrap();5793 .unwrap();
5794 5794
@@ -5797,8 +5797,8 @@ async fn two_passes_over_one_owed_mail_send_it_once() {
5797 });5797 });
5798 // Two engines over one store, which is what the process actually has: the5798 // Two engines over one store, which is what the process actually has: the
5799 // request's pass and the sweep's.5799 // request's pass and the sweep's.
5800- let request = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5800+ let request = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5801- let sweep = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5801+ let sweep = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5802 let (a, b) = tokio::join!(request.deliver_owed(now, 10), sweep.deliver_owed(now, 10),);5802 let (a, b) = tokio::join!(request.deliver_owed(now, 10), sweep.deliver_owed(now, 10),);
5803 let (a, b) = (a.unwrap(), b.unwrap());5803 let (a, b) = (a.unwrap(), b.unwrap());
5804 5804
@@ -5817,7 +5817,7 @@ async fn two_passes_over_one_owed_mail_send_it_once() {
5817 // the lease runs out — the loser leaving it alone is not the same as the5817 // the lease runs out — the loser leaving it alone is not the same as the
5818 // mail being dropped.5818 // mail being dropped.
5819 let owed = store5819 let owed = store
5820- .sends_owed(now + izlek_core::mail::LEASE + Duration::seconds(1), 10)5820+ .sends_owed(now + iz_core::mail::LEASE + Duration::seconds(1), 10)
5821 .await5821 .await
5822 .unwrap();5822 .unwrap();
5823 assert!(5823 assert!(
@@ -5834,7 +5834,7 @@ async fn a_crossing_and_a_sweep_at_the_same_moment_mail_once() {
5834 // which wakes the sweep, while the pass that wrote it is still composing.5834 // which wakes the sweep, while the pass that wrote it is still composing.
5835 // The row is therefore born held, and this is the test that says so.5835 // The row is therefore born held, and this is the test that says so.
5836 let (dir, store, workspace, admin) = shared().await;5836 let (dir, store, workspace, admin) = shared().await;
5837- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;5837+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
5838 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;5838 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
5839 store.assign_task(&task, &mate).await.unwrap();5839 store.assign_task(&task, &mate).await.unwrap();
5840 let _rule = a_rule(&store, &workspace, "Done", "Task completed").await;5840 let _rule = a_rule(&store, &workspace, "Done", "Task completed").await;
@@ -5843,8 +5843,8 @@ async fn a_crossing_and_a_sweep_at_the_same_moment_mail_once() {
5843 let mailer = Arc::new(Dawdling {5843 let mailer = Arc::new(Dawdling {
5844 sent: Mutex::new(Vec::new()),5844 sent: Mutex::new(Vec::new()),
5845 });5845 });
5846- let crossing = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5846+ let crossing = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5847- let sweep = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");5847+ let sweep = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
5848 5848
5849 // The sweep passes run while the crossing is inside its send, which is5849 // The sweep passes run while the crossing is inside its send, which is
5850 // exactly when the row it just wrote is sitting in the ledger.5850 // exactly when the row it just wrote is sitting in the ledger.
@@ -5875,12 +5875,12 @@ async fn a_lease_that_expires_gives_the_mail_back() {
5875 let store = &scratch.store;5875 let store = &scratch.store;
5876 let now = OffsetDateTime::now_utc();5876 let now = OffsetDateTime::now_utc();
5877 let invite = store5877 let invite = store
5878- .queue_invite("newcomer@izlek.sh", "Join İzlek", "Come aboard.", now)5878+ .queue_invite("newcomer@iz.sh", "Join İz", "Come aboard.", now)
5879 .await5879 .await
5880 .unwrap();5880 .unwrap();
5881 5881
5882 let mine = store5882 let mine = store
5883- .claim_sends_owed(now, now + izlek_core::mail::LEASE, 10)5883+ .claim_sends_owed(now, now + iz_core::mail::LEASE, 10)
5884 .await5884 .await
5885 .unwrap();5885 .unwrap();
5886 assert!(5886 assert!(
@@ -5888,7 +5888,7 @@ async fn a_lease_that_expires_gives_the_mail_back() {
5888 "the first pass did not get a mail nobody holds"5888 "the first pass did not get a mail nobody holds"
5889 );5889 );
5890 let theirs = store5890 let theirs = store
5891- .claim_sends_owed(now, now + izlek_core::mail::LEASE, 10)5891+ .claim_sends_owed(now, now + iz_core::mail::LEASE, 10)
5892 .await5892 .await
5893 .unwrap();5893 .unwrap();
5894 assert!(5894 assert!(
@@ -5898,7 +5898,7 @@ async fn a_lease_that_expires_gives_the_mail_back() {
5898 // Nobody wrote the outcome down, so once the lease is out the mail is owed5898 // Nobody wrote the outcome down, so once the lease is out the mail is owed
5899 // again rather than lost.5899 // again rather than lost.
5900 let owed = store5900 let owed = store
5901- .sends_owed(now + izlek_core::mail::LEASE + Duration::seconds(1), 10)5901+ .sends_owed(now + iz_core::mail::LEASE + Duration::seconds(1), 10)
5902 .await5902 .await
5903 .unwrap();5903 .unwrap();
5904 assert!(5904 assert!(
@@ -5911,7 +5911,7 @@ async fn a_lease_that_expires_gives_the_mail_back() {
5911 async fn the_activity_feed_is_the_whole_workspace_newest_first() {5911 async fn the_activity_feed_is_the_whole_workspace_newest_first() {
5912 let (scratch, workspace, admin) = workspace_with_admin().await;5912 let (scratch, workspace, admin) = workspace_with_admin().await;
5913 let store = &scratch.store;5913 let store = &scratch.store;
5914- let other = member(store, &workspace, "sam@izlek.sh", "Sam").await;5914+ let other = member(store, &workspace, "sam@iz.sh", "Sam").await;
5915 let task_a = add_task(store, &workspace, "Backlog", "first task", None, &admin).await;5915 let task_a = add_task(store, &workspace, "Backlog", "first task", None, &admin).await;
5916 let task_b = add_task(store, &workspace, "Backlog", "second task", None, &admin).await;5916 let task_b = add_task(store, &workspace, "Backlog", "second task", None, &admin).await;
5917 let t0 = OffsetDateTime::now_utc();5917 let t0 = OffsetDateTime::now_utc();
@@ -5935,9 +5935,9 @@ async fn the_activity_feed_is_the_whole_workspace_newest_first() {
5935 let feed = store5935 let feed = store
5936 .recent_activity(5936 .recent_activity(
5937 10,5937 10,
5938- izlek_core::store::FeedPage::Newest,5938+ iz_core::store::FeedPage::Newest,
5939- izlek_core::store::Dir::Newest,5939+ iz_core::store::Dir::Newest,
5940- &izlek_core::store::ActivityFilter::default(),5940+ &iz_core::store::ActivityFilter::default(),
5941 )5941 )
5942 .await5942 .await
5943 .unwrap();5943 .unwrap();
@@ -5958,7 +5958,7 @@ async fn the_activity_feed_is_the_whole_workspace_newest_first() {
5958 /// feed reads.5958 /// feed reads.
5959 #[tokio::test]5959 #[tokio::test]
5960 async fn keyset_paging_covers_every_activity_row_once() {5960 async fn keyset_paging_covers_every_activity_row_once() {
5961- use izlek_core::store::{FeedCursor, FeedPage};5961+ use iz_core::store::{FeedCursor, FeedPage};
5962 5962
5963 let (scratch, workspace, admin) = workspace_with_admin().await;5963 let (scratch, workspace, admin) = workspace_with_admin().await;
5964 let store = &scratch.store;5964 let store = &scratch.store;
@@ -5980,8 +5980,8 @@ async fn keyset_paging_covers_every_activity_row_once() {
5980 .recent_activity(5980 .recent_activity(
5981 100,5981 100,
5982 FeedPage::Newest,5982 FeedPage::Newest,
5983- izlek_core::store::Dir::Newest,5983+ iz_core::store::Dir::Newest,
5984- &izlek_core::store::ActivityFilter::default(),5984+ &iz_core::store::ActivityFilter::default(),
5985 )5985 )
5986 .await5986 .await
5987 .unwrap();5987 .unwrap();
@@ -5994,8 +5994,8 @@ async fn keyset_paging_covers_every_activity_row_once() {
5994 .recent_activity(5994 .recent_activity(
5995 7,5995 7,
5996 page,5996 page,
5997- izlek_core::store::Dir::Newest,5997+ iz_core::store::Dir::Newest,
5998- &izlek_core::store::ActivityFilter::default(),5998+ &iz_core::store::ActivityFilter::default(),
5999 )5999 )
6000 .await6000 .await
6001 .unwrap();6001 .unwrap();
@@ -6038,9 +6038,9 @@ async fn an_account_event_rides_the_feed_without_a_task() {
6038 let feed = store6038 let feed = store
6039 .recent_activity(6039 .recent_activity(
6040 10,6040 10,
6041- izlek_core::store::FeedPage::Newest,6041+ iz_core::store::FeedPage::Newest,
6042- izlek_core::store::Dir::Newest,6042+ iz_core::store::Dir::Newest,
6043- &izlek_core::store::ActivityFilter::default(),6043+ &iz_core::store::ActivityFilter::default(),
6044 )6044 )
6045 .await6045 .await
6046 .unwrap();6046 .unwrap();
@@ -6121,7 +6121,7 @@ async fn a_created_task_s_activity_id_resolves_as_an_event() {
6121 // -- the engine hears activity ----------------------------------------------6121 // -- the engine hears activity ----------------------------------------------
6122 6122
6123 /// Reads an activity row back as the event the engine takes.6123 /// Reads an activity row back as the event the engine takes.
6124-async fn activity_event(store: &TursoStore, activity_id: &str) -> izlek_core::store::ActivityEvent {6124+async fn activity_event(store: &TursoStore, activity_id: &str) -> iz_core::store::ActivityEvent {
6125 match store.event(activity_id).await.unwrap() {6125 match store.event(activity_id).await.unwrap() {
6126 Some(Event::Happened(event)) => event,6126 Some(Event::Happened(event)) => event,
6127 other => panic!("expected Event::Happened, got {other:?}"),6127 other => panic!("expected Event::Happened, got {other:?}"),
@@ -6131,7 +6131,7 @@ async fn activity_event(store: &TursoStore, activity_id: &str) -> izlek_core::st
6131 #[tokio::test]6131 #[tokio::test]
6132 async fn an_assignment_mails_the_assignees_minus_the_actor() {6132 async fn an_assignment_mails_the_assignees_minus_the_actor() {
6133 let (dir, store, workspace, admin) = shared().await;6133 let (dir, store, workspace, admin) = shared().await;
6134- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6134+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6135 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6135 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6136 store.assign_task(&task, &mate).await.unwrap();6136 store.assign_task(&task, &mate).await.unwrap();
6137 let board = store.board(&workspace).await.unwrap().unwrap();6137 let board = store.board(&workspace).await.unwrap().unwrap();
@@ -6148,7 +6148,7 @@ async fn an_assignment_mails_the_assignees_minus_the_actor() {
6148 .unwrap();6148 .unwrap();
6149 6149
6150 let mailer = Remembering::taking_everything();6150 let mailer = Remembering::taking_everything();
6151- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6151+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6152 // Ada assigned Emre; Ada is not on the assignee list to begin with, so6152 // Ada assigned Emre; Ada is not on the assignee list to begin with, so
6153 // the audience is Emre alone.6153 // the audience is Emre alone.
6154 let activity_id = store6154 let activity_id = store
@@ -6168,7 +6168,7 @@ async fn an_assignment_mails_the_assignees_minus_the_actor() {
6168 assert_eq!(first.sent, 1);6168 assert_eq!(first.sent, 1);
6169 let sent = mailer.sent();6169 let sent = mailer.sent();
6170 assert_eq!(sent.len(), 1);6170 assert_eq!(sent.len(), 1);
6171- assert_eq!(sent[0].to, "emre@izlek.sh");6171+ assert_eq!(sent[0].to, "emre@iz.sh");
6172 6172
6173 // The same activity replayed — a restart, a second worker — owns nothing6173 // The same activity replayed — a restart, a second worker — owns nothing
6174 // and sends nothing more. The unique index decided, not a read.6174 // and sends nothing more. The unique index decided, not a read.
@@ -6182,9 +6182,9 @@ async fn an_assignment_mails_the_assignees_minus_the_actor() {
6182 #[tokio::test]6182 #[tokio::test]
6183 async fn assigning_one_person_mails_that_person_not_every_assignee() {6183 async fn assigning_one_person_mails_that_person_not_every_assignee() {
6184 let (dir, store, workspace, admin) = shared().await;6184 let (dir, store, workspace, admin) = shared().await;
6185- let first = member(&store, &workspace, "grace@izlek.sh", "Grace").await;6185+ let first = member(&store, &workspace, "grace@iz.sh", "Grace").await;
6186- let second = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6186+ let second = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6187- let third = member(&store, &workspace, "linus@izlek.sh", "Linus").await;6187+ let third = member(&store, &workspace, "linus@iz.sh", "Linus").await;
6188 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6188 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6189 store.assign_task(&task, &first).await.unwrap();6189 store.assign_task(&task, &first).await.unwrap();
6190 store.assign_task(&task, &second).await.unwrap();6190 store.assign_task(&task, &second).await.unwrap();
@@ -6203,10 +6203,10 @@ async fn assigning_one_person_mails_that_person_not_every_assignee() {
6203 .unwrap();6203 .unwrap();
6204 6204
6205 let mailer = Remembering::taking_everything();6205 let mailer = Remembering::taking_everything();
6206- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6206+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6207 // Ada assigns Yusuf to a card that already carries three people: the line6207 // Ada assigns Yusuf to a card that already carries three people: the line
6208 // is about Yusuf, so Yusuf is the audience — not the three already there.6208 // is about Yusuf, so Yusuf is the audience — not the three already there.
6209- let fourth = member(&store, &workspace, "yusuf@izlek.sh", "Yusuf").await;6209+ let fourth = member(&store, &workspace, "yusuf@iz.sh", "Yusuf").await;
6210 let activity_id = store6210 let activity_id = store
6211 .record_activity(6211 .record_activity(
6212 &task,6212 &task,
@@ -6224,14 +6224,14 @@ async fn assigning_one_person_mails_that_person_not_every_assignee() {
6224 assert_eq!(report.sent, 1, "one assignment, one mail");6224 assert_eq!(report.sent, 1, "one assignment, one mail");
6225 let sent = mailer.sent();6225 let sent = mailer.sent();
6226 assert_eq!(sent.len(), 1);6226 assert_eq!(sent.len(), 1);
6227- assert_eq!(sent[0].to, "yusuf@izlek.sh");6227+ assert_eq!(sent[0].to, "yusuf@iz.sh");
6228 let _ = std::fs::remove_dir_all(&dir);6228 let _ = std::fs::remove_dir_all(&dir);
6229 }6229 }
6230 6230
6231 #[tokio::test]6231 #[tokio::test]
6232 async fn a_time_change_fires_a_deadline_set_rule() {6232 async fn a_time_change_fires_a_deadline_set_rule() {
6233 let (dir, store, workspace, admin) = shared().await;6233 let (dir, store, workspace, admin) = shared().await;
6234- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6234+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6235 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6235 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6236 let board = store.board(&workspace).await.unwrap().unwrap();6236 let board = store.board(&workspace).await.unwrap().unwrap();
6237 store6237 store
@@ -6247,7 +6247,7 @@ async fn a_time_change_fires_a_deadline_set_rule() {
6247 .unwrap();6247 .unwrap();
6248 6248
6249 let mailer = Remembering::taking_everything();6249 let mailer = Remembering::taking_everything();
6250- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6250+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6251 // Ada sets the time on her own card — a ClockSet activity, no deadline6251 // Ada sets the time on her own card — a ClockSet activity, no deadline
6252 // in sight — and the only person the board audience can mail is Emre,6252 // in sight — and the only person the board audience can mail is Emre,
6253 // the board minus the actor.6253 // the board minus the actor.
@@ -6268,7 +6268,7 @@ async fn a_time_change_fires_a_deadline_set_rule() {
6268 assert_eq!(report.sent, 1, "the time change mails the board");6268 assert_eq!(report.sent, 1, "the time change mails the board");
6269 let sent = mailer.sent();6269 let sent = mailer.sent();
6270 assert_eq!(sent.len(), 1);6270 assert_eq!(sent.len(), 1);
6271- assert_eq!(sent[0].to, "emre@izlek.sh");6271+ assert_eq!(sent[0].to, "emre@iz.sh");
6272 assert!(6272 assert!(
6273 sent[0].body.contains("set the time to"),6273 sent[0].body.contains("set the time to"),
6274 "the body says the honest per-kind sentence: {}",6274 "the body says the honest per-kind sentence: {}",
@@ -6280,8 +6280,8 @@ async fn a_time_change_fires_a_deadline_set_rule() {
6280 #[tokio::test]6280 #[tokio::test]
6281 async fn an_unassignment_mails_the_person_removed_not_the_rest() {6281 async fn an_unassignment_mails_the_person_removed_not_the_rest() {
6282 let (dir, store, workspace, admin) = shared().await;6282 let (dir, store, workspace, admin) = shared().await;
6283- let staying = member(&store, &workspace, "grace@izlek.sh", "Grace").await;6283+ let staying = member(&store, &workspace, "grace@iz.sh", "Grace").await;
6284- let leaving = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6284+ let leaving = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6285 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6285 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6286 store.assign_task(&task, &staying).await.unwrap();6286 store.assign_task(&task, &staying).await.unwrap();
6287 store.assign_task(&task, &leaving).await.unwrap();6287 store.assign_task(&task, &leaving).await.unwrap();
@@ -6299,7 +6299,7 @@ async fn an_unassignment_mails_the_person_removed_not_the_rest() {
6299 .unwrap();6299 .unwrap();
6300 6300
6301 let mailer = Remembering::taking_everything();6301 let mailer = Remembering::taking_everything();
6302- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6302+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6303 store.unassign_task(&task, &leaving).await.unwrap();6303 store.unassign_task(&task, &leaving).await.unwrap();
6304 let activity_id = store6304 let activity_id = store
6305 .record_activity(6305 .record_activity(
@@ -6319,7 +6319,7 @@ async fn an_unassignment_mails_the_person_removed_not_the_rest() {
6319 let sent = mailer.sent();6319 let sent = mailer.sent();
6320 assert_eq!(sent.len(), 1);6320 assert_eq!(sent.len(), 1);
6321 assert_eq!(6321 assert_eq!(
6322- sent[0].to, "emre@izlek.sh",6322+ sent[0].to, "emre@iz.sh",
6323 "the mail is for the one removed"6323 "the mail is for the one removed"
6324 );6324 );
6325 let _ = std::fs::remove_dir_all(&dir);6325 let _ = std::fs::remove_dir_all(&dir);
@@ -6328,8 +6328,8 @@ async fn an_unassignment_mails_the_person_removed_not_the_rest() {
6328 #[tokio::test]6328 #[tokio::test]
6329 async fn a_rule_whose_line_has_no_subject_still_mails_every_assignee() {6329 async fn a_rule_whose_line_has_no_subject_still_mails_every_assignee() {
6330 let (dir, store, workspace, admin) = shared().await;6330 let (dir, store, workspace, admin) = shared().await;
6331- let first = member(&store, &workspace, "grace@izlek.sh", "Grace").await;6331+ let first = member(&store, &workspace, "grace@iz.sh", "Grace").await;
6332- let second = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6332+ let second = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6333 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6333 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6334 store.assign_task(&task, &first).await.unwrap();6334 store.assign_task(&task, &first).await.unwrap();
6335 store.assign_task(&task, &second).await.unwrap();6335 store.assign_task(&task, &second).await.unwrap();
@@ -6347,7 +6347,7 @@ async fn a_rule_whose_line_has_no_subject_still_mails_every_assignee() {
6347 .unwrap();6347 .unwrap();
6348 6348
6349 let mailer = Remembering::taking_everything();6349 let mailer = Remembering::taking_everything();
6350- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6350+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6351 // A comment has no subject: the audience stays the whole assignee list,6351 // A comment has no subject: the audience stays the whole assignee list,
6352 // minus the actor, exactly as before the subject column existed.6352 // minus the actor, exactly as before the subject column existed.
6353 let activity_id = store6353 let activity_id = store
@@ -6367,14 +6367,14 @@ async fn a_rule_whose_line_has_no_subject_still_mails_every_assignee() {
6367 assert_eq!(report.sent, 2, "both assignees, the old breadth");6367 assert_eq!(report.sent, 2, "both assignees, the old breadth");
6368 let mut to: Vec<_> = mailer.sent().iter().map(|m| m.to.clone()).collect();6368 let mut to: Vec<_> = mailer.sent().iter().map(|m| m.to.clone()).collect();
6369 to.sort();6369 to.sort();
6370- assert_eq!(to, vec!["emre@izlek.sh", "grace@izlek.sh"]);6370+ assert_eq!(to, vec!["emre@iz.sh", "grace@iz.sh"]);
6371 let _ = std::fs::remove_dir_all(&dir);6371 let _ = std::fs::remove_dir_all(&dir);
6372 }6372 }
6373 6373
6374 #[tokio::test]6374 #[tokio::test]
6375 async fn a_creator_audience_rule_mails_the_creator_and_nobody_when_the_creator_commented() {6375 async fn a_creator_audience_rule_mails_the_creator_and_nobody_when_the_creator_commented() {
6376 let (dir, store, workspace, admin) = shared().await;6376 let (dir, store, workspace, admin) = shared().await;
6377- let mate = member(&store, &workspace, "emre@izlek.sh", "Emre").await;6377+ let mate = member(&store, &workspace, "emre@iz.sh", "Emre").await;
6378 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;6378 let task = add_task(&store, &workspace, "Backlog", "Ship it", None, &admin).await;
6379 let board = store.board(&workspace).await.unwrap().unwrap();6379 let board = store.board(&workspace).await.unwrap().unwrap();
6380 store6380 store
@@ -6390,7 +6390,7 @@ async fn a_creator_audience_rule_mails_the_creator_and_nobody_when_the_creator_c
6390 .unwrap();6390 .unwrap();
6391 6391
6392 let mailer = Remembering::taking_everything();6392 let mailer = Remembering::taking_everything();
6393- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6393+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6394 6394
6395 // Emre comments on Ada's task: Ada, the creator, gets mailed.6395 // Emre comments on Ada's task: Ada, the creator, gets mailed.
6396 let commented_by_mate = store6396 let commented_by_mate = store
@@ -6409,7 +6409,7 @@ async fn a_creator_audience_rule_mails_the_creator_and_nobody_when_the_creator_c
6409 assert_eq!(report.sent, 1);6409 assert_eq!(report.sent, 1);
6410 let sent = mailer.sent();6410 let sent = mailer.sent();
6411 assert_eq!(sent.len(), 1);6411 assert_eq!(sent.len(), 1);
6412- assert_eq!(sent[0].to, "ada@izlek.sh");6412+ assert_eq!(sent[0].to, "ada@iz.sh");
6413 6413
6414 // Ada comments on her own task: the audience is only the actor, so6414 // Ada comments on her own task: the audience is only the actor, so
6415 // nobody is mailed and the ledger says why rather than looking silent.6415 // nobody is mailed and the ledger says why rather than looking silent.
@@ -6430,7 +6430,7 @@ async fn a_creator_audience_rule_mails_the_creator_and_nobody_when_the_creator_c
6430 assert_eq!(mailer.sent().len(), 1, "no second mail went out");6430 assert_eq!(mailer.sent().len(), 1, "no second mail went out");
6431 6431
6432 let decisions = store6432 let decisions = store
6433- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)6433+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
6434 .await6434 .await
6435 .unwrap();6435 .unwrap();
6436 let row = decisions6436 let row = decisions
@@ -6449,7 +6449,7 @@ async fn a_created_activity_does_not_fire_a_status_rule() {
6449 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;6449 let rule = a_rule(&store, &workspace, "Done", "Task completed").await;
6450 6450
6451 let mailer = Remembering::taking_everything();6451 let mailer = Remembering::taking_everything();
6452- let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh");6452+ let engine = Engine::new(store.clone(), mailer.clone(), "https://iz.sh");
6453 let activity_id = store6453 let activity_id = store
6454 .record_activity(6454 .record_activity(
6455 &task,6455 &task,
@@ -6468,7 +6468,7 @@ async fn a_created_activity_does_not_fire_a_status_rule() {
6468 assert!(mailer.sent().is_empty());6468 assert!(mailer.sent().is_empty());
6469 6469
6470 let decisions = store6470 let decisions = store
6471- .recent_mail_decisions(10, izlek_core::store::FeedPage::Newest)6471+ .recent_mail_decisions(10, iz_core::store::FeedPage::Newest)
6472 .await6472 .await
6473 .unwrap();6473 .unwrap();
6474 let row = decisions6474 let row = decisions
@@ -6508,7 +6508,7 @@ async fn decisions_and_sends_for_task_read_only_that_tasks_own_rows() {
6508 .await6508 .await
6509 .unwrap();6509 .unwrap();
6510 let send = store6510 let send = store
6511- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)6511+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
6512 .await6512 .await
6513 .unwrap()6513 .unwrap()
6514 .unwrap();6514 .unwrap();
@@ -6517,7 +6517,7 @@ async fn decisions_and_sends_for_task_read_only_that_tasks_own_rows() {
6517 &rule.id,6517 &rule.id,
6518 &other_transition.id,6518 &other_transition.id,
6519 &other_task,6519 &other_task,
6520- "emre@izlek.sh",6520+ "emre@iz.sh",
6521 now,6521 now,
6522 now,6522 now,
6523 )6523 )
@@ -6544,7 +6544,7 @@ async fn requeuing_a_send_puts_it_back_in_play_but_leaves_a_sent_one_alone() {
6544 let now = OffsetDateTime::now_utc();6544 let now = OffsetDateTime::now_utc();
6545 6545
6546 let failed = store6546 let failed = store
6547- .claim_send(&rule.id, &transition.id, &task, "failed@izlek.sh", now, now)6547+ .claim_send(&rule.id, &transition.id, &task, "failed@iz.sh", now, now)
6548 .await6548 .await
6549 .unwrap()6549 .unwrap()
6550 .unwrap();6550 .unwrap();
@@ -6554,7 +6554,7 @@ async fn requeuing_a_send_puts_it_back_in_play_but_leaves_a_sent_one_alone() {
6554 .unwrap();6554 .unwrap();
6555 6555
6556 let sent = store6556 let sent = store
crates/izlek-web/Cargo.toml → crates/iz-web/Cargo.tomlrenamed+3 -3
@@ -1,10 +1,10 @@
1 [package]1 [package]
2-name = "izlek-web"2+name = "iz-web"
3 version.workspace = true3 version.workspace = true
4 edition.workspace = true4 edition.workspace = true
5 license.workspace = true5 license.workspace = true
6 repository.workspace = true6 repository.workspace = true
7-description = "İzlek web app: topcoat UI, routes and the server"7+description = "İz web app: topcoat UI, routes and the server"
8 8
9 [dependencies]9 [dependencies]
10 topcoat = { version = "0.6.2", default-features = false, features = [10 topcoat = { version = "0.6.2", default-features = false, features = [
@@ -19,7 +19,7 @@ topcoat = { version = "0.6.2", default-features = false, features = [
19 "multipart",19 "multipart",
20 "sse",20 "sse",
21 ] }21 ] }
22-izlek-core = { workspace = true, features = ["server"] }22+iz-core = { workspace = true, features = ["server"] }
23 serde.workspace = true23 serde.workspace = true
24 serde_json.workspace = true24 serde_json.workspace = true
25 time.workspace = true25 time.workspace = true
crates/izlek-web/build.rs → crates/iz-web/build.rsrenamed+1 -1
@@ -31,5 +31,5 @@ fn main() {
31 for byte in fingerprint {31 for byte in fingerprint {
32 hex.push_str(&format!("{byte:02x}"));32 hex.push_str(&format!("{byte:02x}"));
33 }33 }
34- println!("cargo:rustc-env=IZLEK_STYLE_FINGERPRINT=sha256:{hex}");34+ println!("cargo:rustc-env=IZ_STYLE_FINGERPRINT=sha256:{hex}");
35 }35 }
crates/izlek-web/src/auth.rs → crates/iz-web/src/auth.rsrenamed+10 -10
@@ -1,14 +1,14 @@
1 //! The account surface: claiming the workspace, first sign-in from an invited1 //! The account surface: claiming the workspace, first sign-in from an invited
2 //! link, signing in and out, and changing a password.2 //! link, signing in and out, and changing a password.
3 //!3 //!
4-//! Ported from `izlek-web/src/auth.rs`. Every mutating call answers a browser4+//! Ported from `iz-web/src/auth.rs`. Every mutating call answers a browser
5 //! without script the same way: a 303 back to wherever the form was posted5 //! without script the same way: a 303 back to wherever the form was posted
6 //! from, with the refusal (if any) serialized as the body so6 //! from, with the refusal (if any) serialized as the body so
7 //! [`crate::server::carry_refusal_on_redirect`] can carry it onto that7 //! [`crate::server::carry_refusal_on_redirect`] can carry it onto that
8 //! redirect's query.8 //! redirect's query.
9 9
10-use izlek_core::accounts::SESSION_LIFETIME;10+use iz_core::accounts::SESSION_LIFETIME;
11-use izlek_core::detail::ActivityKind;11+use iz_core::detail::ActivityKind;
12 use serde::{Deserialize, Serialize};12 use serde::{Deserialize, Serialize};
13 use topcoat::Result;13 use topcoat::Result;
14 use topcoat::context::Cx;14 use topcoat::context::Cx;
@@ -25,7 +25,7 @@ use crate::settings::encode_q;
25 25
26 /// The workspace has exactly one name and no screen that sets it, so it is a26 /// The workspace has exactly one name and no screen that sets it, so it is a
27 /// constant rather than a field nobody was shown.27 /// constant rather than a field nobody was shown.
28-pub const WORKSPACE_NAME: &str = "İzlek";28+pub const WORKSPACE_NAME: &str = "İz";
29 29
30 /// The name and address an invitation was made out to.30 /// The name and address an invitation was made out to.
31 #[derive(Clone, Debug, Serialize)]31 #[derive(Clone, Debug, Serialize)]
@@ -43,7 +43,7 @@ pub struct Invited {
43 /// Shared by the `/api/invitation` route and the `/join/{token}` page: both43 /// Shared by the `/api/invitation` route and the `/join/{token}` page: both
44 /// answer the same question, one for a hydrated caller and one to render.44 /// answer the same question, one for a hydrated caller and one to render.
45 pub async fn invited_by_token(cx: &Cx, token: &str) -> Result<Option<Invited>> {45 pub async fn invited_by_token(cx: &Cx, token: &str) -> Result<Option<Invited>> {
46- use izlek_core::auth::hash_token;46+ use iz_core::auth::hash_token;
47 use time::OffsetDateTime;47 use time::OffsetDateTime;
48 48
49 let store = accounts(cx).store().clone();49 let store = accounts(cx).store().clone();
@@ -144,7 +144,7 @@ async fn sign_in(cx: &Cx, Form(input): Form<SignInForm>) -> Redirect {
144 redirect(cx, None)144 redirect(cx, None)
145 }145 }
146 Err(error) => {146 Err(error) => {
147- if !matches!(error, izlek_core::accounts::AccountError::RateLimited) {147+ if !matches!(error, iz_core::accounts::AccountError::RateLimited) {
148 let _ = accounts(cx)148 let _ = accounts(cx)
149 .store()149 .store()
150 .record_event(150 .record_event(
@@ -268,7 +268,7 @@ async fn change_password(cx: &Cx, Form(input): Form<ChangePasswordForm>) -> Redi
268 struct InviteMemberForm {268 struct InviteMemberForm {
269 email: String,269 email: String,
270 display_name: String,270 display_name: String,
271- role: izlek_core::Role,271+ role: iz_core::Role,
272 }272 }
273 273
274 /// Admin creates an account with a name and an address and no password. The274 /// Admin creates an account with a name and an address and no password. The
@@ -276,7 +276,7 @@ struct InviteMemberForm {
276 ///276 ///
277 /// A caller with script reads the address straight off the JSON body, same277 /// A caller with script reads the address straight off the JSON body, same
278 /// as always. A plain form post has no such reader, so — same as278 /// as always. A plain form post has no such reader, so — same as
279-/// `resend_link` (`izlek-web/src/settings.rs`) — it lands back on Settings279+/// `resend_link` (`iz-web/src/settings.rs`) — it lands back on Settings
280 /// instead: `mailed=<address>` on success, `refusal=<code>&on=invite_member`280 /// instead: `mailed=<address>` on success, `refusal=<code>&on=invite_member`
281 /// otherwise.281 /// otherwise.
282 #[route(POST "/api/invite_member")]282 #[route(POST "/api/invite_member")]
@@ -345,7 +345,7 @@ async fn invitation(cx: &Cx, Form(input): Form<InvitationForm>) -> Result<Json<O
345 /// here, and only while it is still usable: a spent or expired link shows345 /// here, and only while it is still usable: a spent or expired link shows
346 /// the same dead card an unknown token does.346 /// the same dead card an unknown token does.
347 pub async fn reset_by_token(cx: &Cx, token: &str) -> Result<Option<Invited>> {347 pub async fn reset_by_token(cx: &Cx, token: &str) -> Result<Option<Invited>> {
348- use izlek_core::auth::hash_token;348+ use iz_core::auth::hash_token;
349 use time::OffsetDateTime;349 use time::OffsetDateTime;
350 350
351 let store = accounts(cx).store().clone();351 let store = accounts(cx).store().clone();
@@ -353,7 +353,7 @@ pub async fn reset_by_token(cx: &Cx, token: &str) -> Result<Option<Invited>> {
353 let Some(link) = store.signin_link_by_hash(&digest).await? else {353 let Some(link) = store.signin_link_by_hash(&digest).await? else {
354 return Ok(None);354 return Ok(None);
355 };355 };
356- if link.kind != izlek_core::store::LinkKind::Reset356+ if link.kind != iz_core::store::LinkKind::Reset
357 || !link.is_usable(OffsetDateTime::now_utc())357 || !link.is_usable(OffsetDateTime::now_utc())
358 {358 {
359 return Ok(None);359 return Ok(None);
crates/izlek-web/src/board.rs → crates/iz-web/src/board.rsrenamed+29 -29
@@ -6,8 +6,8 @@
6 //! the server — a drag's only client-side memory is the browser's own drag6 //! the server — a drag's only client-side memory is the browser's own drag
7 //! session (`dataTransfer`), read back by the column that catches the drop.7 //! session (`dataTransfer`), read back by the column that catches the drop.
8 8
9-use izlek_core::board::{DeadlineState, Moved, TaskCard, day_label};9+use iz_core::board::{DeadlineState, Moved, TaskCard, day_label};
10-use izlek_core::store::{NewTask, User};10+use iz_core::store::{NewTask, User};
11 use time::{Date, OffsetDateTime};11 use time::{Date, OffsetDateTime};
12 use topcoat::Result;12 use topcoat::Result;
13 use topcoat::context::Cx;13 use topcoat::context::Cx;
@@ -66,7 +66,7 @@ async fn move_card_shared(
66 Ok(Moved::Unchanged) => Ok(None),66 Ok(Moved::Unchanged) => Ok(None),
67 Ok(Moved::Stale) => Ok(Some(Refusal::MovedAlready)),67 Ok(Moved::Stale) => Ok(Some(Refusal::MovedAlready)),
68 Ok(Moved::Held) => Ok(Some(Refusal::SubtasksOpen)),68 Ok(Moved::Held) => Ok(Some(Refusal::SubtasksOpen)),
69- Err(izlek_core::store::StoreError::NotFound) => Ok(Some(Refusal::NotFound)),69+ Err(iz_core::store::StoreError::NotFound) => Ok(Some(Refusal::NotFound)),
70 Err(error) => {70 Err(error) => {
71 eprintln!("store error: {error}");71 eprintln!("store error: {error}");
72 Ok(Some(Refusal::Unavailable))72 Ok(Some(Refusal::Unavailable))
@@ -93,7 +93,7 @@ async fn create_task_shared(
93 if title.is_empty() {93 if title.is_empty() {
94 return Ok(Some(Refusal::EmptyTitle));94 return Ok(Some(Refusal::EmptyTitle));
95 }95 }
96- let zone = izlek_core::detail::parse_zone(&user.timezone);96+ let zone = iz_core::detail::parse_zone(&user.timezone);
97 let time = match crate::detail::combine_clock(clock_hour, clock_minute) {97 let time = match crate::detail::combine_clock(clock_hour, clock_minute) {
98 Ok(time) => time,98 Ok(time) => time,
99 Err(refusal) => return Ok(Some(refusal)),99 Err(refusal) => return Ok(Some(refusal)),
@@ -231,7 +231,7 @@ fn valid_sort(sort: Option<&str>) -> &'static str {
231 }231 }
232 /// The `?tag=` filter: an id only counts while it names a tag on this232 /// The `?tag=` filter: an id only counts while it names a tag on this
233 /// board — a stale or hand-edited query string falls back to all.233 /// board — a stale or hand-edited query string falls back to all.
234-fn valid_tag(tag: Option<&str>, tags: &[izlek_core::store::Tag]) -> Option<String> {234+fn valid_tag(tag: Option<&str>, tags: &[iz_core::store::Tag]) -> Option<String> {
235 tag.and_then(|id| tags.iter().find(|t| t.id == id).map(|t| t.id.clone()))235 tag.and_then(|id| tags.iter().find(|t| t.id == id).map(|t| t.id.clone()))
236 }236 }
237 237
@@ -254,7 +254,7 @@ fn searched(query: Option<&str>) -> Option<String> {
254 .map(str::to_string)254 .map(str::to_string)
255 }255 }
256 256
257-/// `deadline` is the order [`izlek_core::board::load`] already hands back257+/// `deadline` is the order [`iz_core::board::load`] already hands back
258 /// (soonest first); the other two re-order in place here so core stays free258 /// (soonest first); the other two re-order in place here so core stays free
259 /// of a UI sort preference. `created` reads the task id, a ULID, which sorts259 /// of a UI sort preference. `created` reads the task id, a ULID, which sorts
260 /// lexically by the moment it was minted — newest first.260 /// lexically by the moment it was minted — newest first.
@@ -288,7 +288,7 @@ async fn board_columns(
288 };288 };
289 let lang = Lang::from_code(&user.language);289 let lang = Lang::from_code(&user.language);
290 let store = accounts(cx).store().clone();290 let store = accounts(cx).store().clone();
291- let Some(mut view_data) = izlek_core::board::load(store.as_ref(), &user.workspace_id).await?291+ let Some(mut view_data) = iz_core::board::load(store.as_ref(), &user.workspace_id).await?
292 else {292 else {
293 return view! {293 return view! {
294 cx =>294 cx =>
@@ -306,7 +306,7 @@ async fn board_columns(
306 }306 }
307 let today = OffsetDateTime::now_utc().date();307 let today = OffsetDateTime::now_utc().date();
308 let may_write = user.role.can_write_tasks();308 let may_write = user.role.can_write_tasks();
309- let zone = izlek_core::detail::parse_zone(&user.timezone);309+ let zone = iz_core::detail::parse_zone(&user.timezone);
310 310
311 let all_columns: Vec<(String, String)> = view_data311 let all_columns: Vec<(String, String)> = view_data
312 .columns312 .columns
@@ -326,7 +326,7 @@ async fn board_columns(
326 326
327 async fn render_column(327 async fn render_column(
328 cx: &Cx,328 cx: &Cx,
329- column: izlek_core::board::ColumnView,329+ column: iz_core::board::ColumnView,
330 today: Date,330 today: Date,
331 zone: time::UtcOffset,331 zone: time::UtcOffset,
332 may_write: bool,332 may_write: bool,
@@ -507,7 +507,7 @@ async fn render_card(
507 /// card's `@contextmenu` calls into this same global, by the menu's id.507 /// card's `@contextmenu` calls into this same global, by the menu's id.
508 ///508 ///
509 /// Also registers the board page's own `Escape` resolvers on509 /// Also registers the board page's own `Escape` resolvers on
510-/// `window.__izlekEsc`: the datepicker panel (priority 20 — below the510+/// `window.__izEsc`: the datepicker panel (priority 20 — below the
511 /// dropdown panel and the user-menu, above only the card menu; the modal511 /// dropdown panel and the user-menu, above only the card menu; the modal
512 /// chain steps aside on its own (its resolver returns false while a512 /// chain steps aside on its own (its resolver returns false while a
513 /// datepick is open), which is how the datepicker still closes before the513 /// datepick is open), which is how the datepicker still closes before the
@@ -519,25 +519,25 @@ async fn card_menu_script(cx: &Cx) -> Result {
519 use topcoat::view::Unescaped;519 use topcoat::view::Unescaped;
520 const JS: &str = "\520 const JS: &str = "\
521 (function () { \521 (function () { \
522- if (window.__izlekCardMenu) { return; } \522+ if (window.__izCardMenu) { return; } \
523- window.__izlekCardMenu = true; \523+ window.__izCardMenu = true; \
524 function closeCardMenus() { document.querySelectorAll('.card-menu-open').forEach(function (el) { el.classList.remove('card-menu-open'); }); } \524 function closeCardMenus() { document.querySelectorAll('.card-menu-open').forEach(function (el) { el.classList.remove('card-menu-open'); }); } \
525- window.__izlekOpenCardMenu = function (e, id) { \525+ window.__izOpenCardMenu = function (e, id) { \
526 closeCardMenus(); \526 closeCardMenus(); \
527 var menu = document.getElementById(id); \527 var menu = document.getElementById(id); \
528 if (!menu) { return; } \528 if (!menu) { return; } \
529 menu.style.left = e.clientX + 'px'; \529 menu.style.left = e.clientX + 'px'; \
530 menu.style.top = e.clientY + 'px'; \530 menu.style.top = e.clientY + 'px'; \
531- window.__izlekOwn(menu, ['card-menu-open'], ['style']); \531+ window.__izOwn(menu, ['card-menu-open'], ['style']); \
532 }; \532 }; \
533 document.addEventListener('click', closeCardMenus); \533 document.addEventListener('click', closeCardMenus); \
534- window.__izlekEsc.register(20, function () { \534+ window.__izEsc.register(20, function () { \
535 var datepick = document.querySelector('.datepick-pop > .edit-toggle:checked'); \535 var datepick = document.querySelector('.datepick-pop > .edit-toggle:checked'); \
536 if (!datepick) { return false; } \536 if (!datepick) { return false; } \
537 datepick.checked = false; \537 datepick.checked = false; \
538 return true; \538 return true; \
539 }); \539 }); \
540- window.__izlekEsc.register(10, function () { \540+ window.__izEsc.register(10, function () { \
541 var menu = document.querySelector('.card-menu-open'); \541 var menu = document.querySelector('.card-menu-open'); \
542 if (!menu) { return false; } \542 if (!menu) { return false; } \
543 closeCardMenus(); \543 closeCardMenus(); \
@@ -547,13 +547,13 @@ async fn card_menu_script(cx: &Cx) -> Result {
547 var card = e.target.closest ? e.target.closest('.card[data-menu-id]') : null; \547 var card = e.target.closest ? e.target.closest('.card[data-menu-id]') : null; \
548 if (!card) { return; } \548 if (!card) { return; } \
549 e.preventDefault(); \549 e.preventDefault(); \
550- window.__izlekOpenCardMenu(e, card.dataset.menuId); \550+ window.__izOpenCardMenu(e, card.dataset.menuId); \
551 }); \551 }); \
552 document.addEventListener('dragstart', function (e) { \552 document.addEventListener('dragstart', function (e) { \
553 var card = e.target.closest ? e.target.closest('.card[data-task-id]') : null; \553 var card = e.target.closest ? e.target.closest('.card[data-task-id]') : null; \
554 if (!card) { return; } \554 if (!card) { return; } \
555- e.dataTransfer.setData('izlek-task', card.dataset.taskId); \555+ e.dataTransfer.setData('iz-task', card.dataset.taskId); \
556- e.dataTransfer.setData('izlek-from', card.dataset.fromColumn); \556+ e.dataTransfer.setData('iz-from', card.dataset.fromColumn); \
557 }); \557 }); \
558 document.addEventListener('dragover', function (e) { \558 document.addEventListener('dragover', function (e) { \
559 if (e.target.closest && e.target.closest('.board-columns')) { e.preventDefault(); } \559 if (e.target.closest && e.target.closest('.board-columns')) { e.preventDefault(); } \
@@ -562,10 +562,10 @@ async fn card_menu_script(cx: &Cx) -> Result {
562 var column = e.target.closest ? e.target.closest('.column-cards') : null; \562 var column = e.target.closest ? e.target.closest('.column-cards') : null; \
563 if (!column) { return; } \563 if (!column) { return; } \
564 e.preventDefault(); \564 e.preventDefault(); \
565- var task = e.dataTransfer.getData('izlek-task'); \565+ var task = e.dataTransfer.getData('iz-task'); \
566- var from = e.dataTransfer.getData('izlek-from'); \566+ var from = e.dataTransfer.getData('iz-from'); \
567- if (task && window.__izlekPost) { \567+ if (task && window.__izPost) { \
568- window.__izlekPost('/api/move_card', { task_id: task, from_column_id: from, to_column_id: column.id }); \568+ window.__izPost('/api/move_card', { task_id: task, from_column_id: from, to_column_id: column.id }); \
569 } \569 } \
570 }); \570 }); \
571 })();";571 })();";
@@ -582,16 +582,16 @@ async fn search_script(cx: &Cx) -> Result {
582 use topcoat::view::Unescaped;582 use topcoat::view::Unescaped;
583 const JS: &str = "\583 const JS: &str = "\
584 (function () { \584 (function () { \
585- if (window.__izlekBoardSearch) { return; } \585+ if (window.__izBoardSearch) { return; } \
586- window.__izlekBoardSearch = true; \586+ window.__izBoardSearch = true; \
587 var timer = null; \587 var timer = null; \
588 var last = (document.querySelector('.field-box-search input[name=q]') || {}).value || ''; \588 var last = (document.querySelector('.field-box-search input[name=q]') || {}).value || ''; \
589 function fire() { \589 function fire() { \
590 var el = document.querySelector('.field-box-search input[name=q]'); \590 var el = document.querySelector('.field-box-search input[name=q]'); \
591- if (!el || !el.form || !window.__izlekQuery || el.value === last) { return; } \591+ if (!el || !el.form || !window.__izQuery || el.value === last) { return; } \
592 last = el.value; \592 last = el.value; \
593- window.__izlekKeep = true; \593+ window.__izKeep = true; \
594- window.__izlekQuery((el.form.getAttribute('action') || window.location.pathname) + '?' + new URLSearchParams(new FormData(el.form)).toString()); \594+ window.__izQuery((el.form.getAttribute('action') || window.location.pathname) + '?' + new URLSearchParams(new FormData(el.form)).toString()); \
595 } \595 } \
596 document.addEventListener('input', function (e) { \596 document.addEventListener('input', function (e) { \
597 var el = e.target; \597 var el = e.target; \
@@ -640,7 +640,7 @@ fn sort_label(sort: &str, lang: Lang) -> &'static str {
640 pub async fn board_page(cx: &Cx, user: &User) -> Result {640 pub async fn board_page(cx: &Cx, user: &User) -> Result {
641 let view_data = {641 let view_data = {
642 let store = accounts(cx).store().clone();642 let store = accounts(cx).store().clone();
643- izlek_core::board::load(store.as_ref(), &user.workspace_id).await?643+ iz_core::board::load(store.as_ref(), &user.workspace_id).await?
644 };644 };
645 let lang = Lang::from_code(&user.language);645 let lang = Lang::from_code(&user.language);
646 let Some(mut view_data) = view_data else {646 let Some(mut view_data) = view_data else {
crates/izlek-web/src/detail.rs → crates/iz-web/src/detail.rsrenamed+46 -46
@@ -16,11 +16,11 @@
16 //! (`after_activity`/`after_freeing`) from the old version is carried over16 //! (`after_activity`/`after_freeing`) from the old version is carried over
17 //! unchanged.17 //! unchanged.
18 18
19-use izlek_core::board::{DeadlineState, Person};19+use iz_core::board::{DeadlineState, Person};
20-use izlek_core::detail::{20+use iz_core::detail::{
21 Comment, DeletionCost, DependencyEdge, TaskDetail, TaskFacts, moment_label_in, parse_zone,21 Comment, DeletionCost, DependencyEdge, TaskDetail, TaskFacts, moment_label_in, parse_zone,
22 };22 };
23-use izlek_core::store::{Store, StoreError, User};23+use iz_core::store::{Store, StoreError, User};
24 use serde::{Deserialize, Serialize};24 use serde::{Deserialize, Serialize};
25 use time::{Date, UtcOffset};25 use time::{Date, UtcOffset};
26 use topcoat::Result;26 use topcoat::Result;
@@ -42,13 +42,13 @@ pub struct LinkTarget {
42 }42 }
43 43
44 /// The person the current browser is signed in as, wired the same as44 /// The person the current browser is signed in as, wired the same as
45-/// `izlek-web/src/auth.rs`'s `Me` so [`fetch_task`]'s answer keeps its shape.45+/// `iz-web/src/auth.rs`'s `Me` so [`fetch_task`]'s answer keeps its shape.
46 #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]46 #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
47 pub struct Me {47 pub struct Me {
48 pub id: String,48 pub id: String,
49 pub display_name: String,49 pub display_name: String,
50 pub email: String,50 pub email: String,
51- pub role: izlek_core::Role,51+ pub role: iz_core::Role,
52 pub language: String,52 pub language: String,
53 pub has_photo: bool,53 pub has_photo: bool,
54 }54 }
@@ -89,7 +89,7 @@ pub struct DetailSnapshot {
89 pub may_administer: bool,89 pub may_administer: bool,
90 /// Every tag on this workspace's board, in the admin's hand-set order —90 /// Every tag on this workspace's board, in the admin's hand-set order —
91 /// the tag field reads both its options and its current value from here.91 /// the tag field reads both its options and its current value from here.
92- pub tags: Vec<izlek_core::store::Tag>,92+ pub tags: Vec<iz_core::store::Tag>,
93 }93 }
94 94
95 /// One send's fate, joined to the sends of its decision's event.95 /// One send's fate, joined to the sends of its decision's event.
@@ -281,7 +281,7 @@ async fn load_snapshot(
281 cx: &Cx,281 cx: &Cx,
282 task_id: &str,282 task_id: &str,
283 ) -> Result<std::result::Result<DetailSnapshot, Refusal>> {283 ) -> Result<std::result::Result<DetailSnapshot, Refusal>> {
284- use izlek_core::detail::load;284+ use iz_core::detail::load;
285 use time::OffsetDateTime;285 use time::OffsetDateTime;
286 286
287 let user = match require_user(cx).await {287 let user = match require_user(cx).await {
@@ -378,7 +378,7 @@ async fn load_snapshot(
378 378
379 let decisions = store.decisions_for_task(&detail.id, 10).await?;379 let decisions = store.decisions_for_task(&detail.id, 10).await?;
380 let sends = store.sends_for_task(&detail.id, 50).await?;380 let sends = store.sends_for_task(&detail.id, 50).await?;
381- let mut columns_cache: std::collections::HashMap<String, Vec<izlek_core::board::Column>> =381+ let mut columns_cache: std::collections::HashMap<String, Vec<iz_core::board::Column>> =
382 std::collections::HashMap::new();382 std::collections::HashMap::new();
383 let mut notifications = Vec::with_capacity(decisions.len());383 let mut notifications = Vec::with_capacity(decisions.len());
384 for decision in decisions {384 for decision in decisions {
@@ -402,7 +402,7 @@ async fn load_snapshot(
402 .iter()402 .iter()
403 .filter(|s| s.event_id.as_deref() == Some(decision.event_id.as_str()))403 .filter(|s| s.event_id.as_deref() == Some(decision.event_id.as_str()))
404 .map(|send| {404 .map(|send| {
405- use izlek_core::store::SendState;405+ use iz_core::store::SendState;
406 let (state, state_kind) = match send.state {406 let (state, state_kind) = match send.state {
407 SendState::Pending => (t(lang, Key::QueueStatePending), "pending"),407 SendState::Pending => (t(lang, Key::QueueStatePending), "pending"),
408 SendState::Failed if send.attempts == 0 => {408 SendState::Failed if send.attempts == 0 => {
@@ -641,7 +641,7 @@ async fn set_task_tag(cx: &Cx, Form(input): Form<SetTaskTagForm>) -> Redirect {
641 &input.task_id,641 &input.task_id,
642 Some(&actor.id),642 Some(&actor.id),
643 None,643 None,
644- &izlek_core::detail::ActivityKind::Other("tagged".to_string()),644+ &iz_core::detail::ActivityKind::Other("tagged".to_string()),
645 &tag.name,645 &tag.name,
646 time::OffsetDateTime::now_utc(),646 time::OffsetDateTime::now_utc(),
647 )647 )
@@ -652,7 +652,7 @@ async fn set_task_tag(cx: &Cx, Form(input): Form<SetTaskTagForm>) -> Redirect {
652 /// Puts someone on a task. A Viewer can neither do this nor be the target.652 /// Puts someone on a task. A Viewer can neither do this nor be the target.
653 #[route(POST "/api/assign")]653 #[route(POST "/api/assign")]
654 async fn assign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {654 async fn assign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {
655- use izlek_core::detail::ActivityKind;655+ use iz_core::detail::ActivityKind;
656 use time::OffsetDateTime;656 use time::OffsetDateTime;
657 657
658 let (actor, _) = match writer_and_task(cx, &input.task_id).await {658 let (actor, _) = match writer_and_task(cx, &input.task_id).await {
@@ -688,7 +688,7 @@ async fn assign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {
688 688
689 #[route(POST "/api/unassign")]689 #[route(POST "/api/unassign")]
690 async fn unassign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {690 async fn unassign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {
691- use izlek_core::detail::ActivityKind;691+ use iz_core::detail::ActivityKind;
692 use time::OffsetDateTime;692 use time::OffsetDateTime;
693 693
694 let (actor, _) = match writer_and_task(cx, &input.task_id).await {694 let (actor, _) = match writer_and_task(cx, &input.task_id).await {
@@ -723,7 +723,7 @@ async fn unassign(cx: &Cx, Form(input): Form<PersonForm>) -> Redirect {
723 /// transaction that would have written it.723 /// transaction that would have written it.
724 #[route(POST "/api/link_tasks")]724 #[route(POST "/api/link_tasks")]
725 async fn link_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {725 async fn link_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {
726- use izlek_core::detail::ActivityKind;726+ use iz_core::detail::ActivityKind;
727 use time::OffsetDateTime;727 use time::OffsetDateTime;
728 728
729 let (actor, _) = match writer_and_task(cx, &input.task_id).await {729 let (actor, _) = match writer_and_task(cx, &input.task_id).await {
@@ -761,7 +761,7 @@ async fn link_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {
761 /// rules engine — still has something to read.761 /// rules engine — still has something to read.
762 #[route(POST "/api/unlink_tasks")]762 #[route(POST "/api/unlink_tasks")]
763 async fn unlink_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {763 async fn unlink_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {
764- use izlek_core::detail::ActivityKind;764+ use iz_core::detail::ActivityKind;
765 use time::OffsetDateTime;765 use time::OffsetDateTime;
766 766
767 let (actor, _) = match writer_and_task(cx, &input.task_id).await {767 let (actor, _) = match writer_and_task(cx, &input.task_id).await {
@@ -795,7 +795,7 @@ async fn unlink_tasks(cx: &Cx, Form(input): Form<LinkForm>) -> Redirect {
795 /// first column, the way a card dropped on the board's first column would.795 /// first column, the way a card dropped on the board's first column would.
796 #[route(POST "/api/create_subtask")]796 #[route(POST "/api/create_subtask")]
797 async fn create_subtask(cx: &Cx, Form(input): Form<NewSubtaskForm>) -> Redirect {797 async fn create_subtask(cx: &Cx, Form(input): Form<NewSubtaskForm>) -> Redirect {
798- use izlek_core::store::NewTask;798+ use iz_core::store::NewTask;
799 799
800 let (actor, parent) = match writer_and_task(cx, &input.parent_id).await {800 let (actor, parent) = match writer_and_task(cx, &input.parent_id).await {
801 Ok(pair) => pair,801 Ok(pair) => pair,
@@ -836,7 +836,7 @@ async fn create_subtask(cx: &Cx, Form(input): Form<NewSubtaskForm>) -> Redirect
836 /// `parent_id` is the second. One handler, because it is one write.836 /// `parent_id` is the second. One handler, because it is one write.
837 #[route(POST "/api/set_parent")]837 #[route(POST "/api/set_parent")]
838 async fn set_parent(cx: &Cx, Form(input): Form<ParentForm>) -> Redirect {838 async fn set_parent(cx: &Cx, Form(input): Form<ParentForm>) -> Redirect {
839- use izlek_core::detail::ActivityKind;839+ use iz_core::detail::ActivityKind;
840 use time::OffsetDateTime;840 use time::OffsetDateTime;
841 841
842 let (actor, task) = match writer_and_task(cx, &input.task_id).await {842 let (actor, task) = match writer_and_task(cx, &input.task_id).await {
@@ -994,7 +994,7 @@ async fn delete_file(cx: &Cx, Form(input): Form<FileIdForm>) -> Redirect {
994 &attachment.task_id,994 &attachment.task_id,
995 Some(&user.id),995 Some(&user.id),
996 None,996 None,
997- &izlek_core::detail::ActivityKind::FileRemoved,997+ &iz_core::detail::ActivityKind::FileRemoved,
998 &attachment.file_name,998 &attachment.file_name,
999 time::OffsetDateTime::now_utc(),999 time::OffsetDateTime::now_utc(),
1000 )1000 )
@@ -1147,10 +1147,10 @@ pub(crate) mod glyph {
1147 1147
1148 /// `Escape` for everything the task modal renders, topmost first: viewer →1148 /// `Escape` for everything the task modal renders, topmost first: viewer →
1149 /// delete confirm (`confirm=delete` in URL) → open edit popovers → modal1149 /// delete confirm (`confirm=delete` in URL) → open edit popovers → modal
1150-/// itself — one resolver at priority 90 on `window.__izlekEsc` (table on1150+/// itself — one resolver at priority 90 on `window.__izEsc` (table on
1151 /// `layout.rs`'s `escape_manager_script`); an open datepick popover returns1151 /// `layout.rs`'s `escape_manager_script`); an open datepick popover returns
1152 /// false, leaving it to `board.rs`'s priority-100 resolver. Closing never1152 /// false, leaving it to `board.rs`'s priority-100 resolver. Closing never
1153-/// navigates: `layout.rs`'s `__izlekCloseViewer`/`__izlekCloseModal` drop1153+/// navigates: `layout.rs`'s `__izCloseViewer`/`__izCloseModal` drop
1154 /// the overlay's DOM and rewrite the URL, the board underneath is already1154 /// the overlay's DOM and rewrite the URL, the board underneath is already
1155 /// rendered. Focused native media controls swallow `Escape` before the page1155 /// rendered. Focused native media controls swallow `Escape` before the page
1156 /// ever sees the key, so focus landing on the viewer's audio/video is moved1156 /// ever sees the key, so focus landing on the viewer's audio/video is moved
@@ -1159,17 +1159,17 @@ async fn escape_closes(cx: &Cx) -> Result {
1159 use topcoat::view::Unescaped;1159 use topcoat::view::Unescaped;
1160 const JS: &str = "\1160 const JS: &str = "\
1161 (function () { \1161 (function () { \
1162- if (window.__izlekEscModal) { return; } \1162+ if (window.__izEscModal) { return; } \
1163- window.__izlekEscModal = true; \1163+ window.__izEscModal = true; \
1164- window.__izlekEsc.register(90, function () { \1164+ window.__izEsc.register(90, function () { \
1165 if (document.querySelector('.datepick-pop .edit-toggle:checked')) { return false; } \1165 if (document.querySelector('.datepick-pop .edit-toggle:checked')) { return false; } \
1166 if (document.querySelector('.viewer-scrim')) { \1166 if (document.querySelector('.viewer-scrim')) { \
1167- window.__izlekCloseViewer(); \1167+ window.__izCloseViewer(); \
1168 return true; \1168 return true; \
1169 } \1169 } \
1170 var confirm = document.querySelector('details.confirm-details[open]'); \1170 var confirm = document.querySelector('details.confirm-details[open]'); \
1171 if (confirm && window.location.search.indexOf('confirm=delete') !== -1) { \1171 if (confirm && window.location.search.indexOf('confirm=delete') !== -1) { \
1172- window.__izlekCloseModal(); \1172+ window.__izCloseModal(); \
1173 return true; \1173 return true; \
1174 } \1174 } \
1175 var toggled = false; \1175 var toggled = false; \
@@ -1183,7 +1183,7 @@ async fn escape_closes(cx: &Cx) -> Result {
1183 return true; \1183 return true; \
1184 } \1184 } \
1185 if (document.querySelector('.modal-scrim')) { \1185 if (document.querySelector('.modal-scrim')) { \
1186- window.__izlekCloseModal(); \1186+ window.__izCloseModal(); \
1187 return true; \1187 return true; \
1188 } \1188 } \
1189 return false; \1189 return false; \
@@ -1194,7 +1194,7 @@ async fn escape_closes(cx: &Cx) -> Result {
1194 var panel = media.closest('.viewer'); \1194 var panel = media.closest('.viewer'); \
1195 if (panel) { panel.focus(); } \1195 if (panel) { panel.focus(); } \
1196 }, true); \1196 }, true); \
1197- document.addEventListener('click', function (e) { var confirm = document.querySelector('details.confirm-details[open]'); if (!confirm) { return; } var panel = confirm.querySelector('.confirm'); if (panel && !panel.contains(e.target) && !e.target.closest('summary')) { if (window.location.search.indexOf('confirm=delete') !== -1) { window.__izlekCloseModal(); } else { confirm.removeAttribute('open'); } } }, true); \1197+ document.addEventListener('click', function (e) { var confirm = document.querySelector('details.confirm-details[open]'); if (!confirm) { return; } var panel = confirm.querySelector('.confirm'); if (panel && !panel.contains(e.target) && !e.target.closest('summary')) { if (window.location.search.indexOf('confirm=delete') !== -1) { window.__izCloseModal(); } else { confirm.removeAttribute('open'); } } }, true); \
1198 document.addEventListener('click', function (e) { \1198 document.addEventListener('click', function (e) { \
1199 document.querySelectorAll('.edit-toggle:checked').forEach(function (toggle) { \1199 document.querySelectorAll('.edit-toggle:checked').forEach(function (toggle) { \
1200 if (toggle.closest('.datepick-pop')) { return; } \1200 if (toggle.closest('.datepick-pop')) { return; } \
@@ -1312,7 +1312,7 @@ async fn deadline_control(
1312 (Some(at), Some(parts)) => format!("{} {:02}:{:02}", parts.date, at.hour(), at.minute()),1312 (Some(at), Some(parts)) => format!("{} {:02}:{:02}", parts.date, at.hour(), at.minute()),
1313 (Some(at), None) => format!(1313 (Some(at), None) => format!(
1314 "{} {:02}:{:02}",1314 "{} {:02}:{:02}",
1315- izlek_core::board::day_label(at.date()),1315+ iz_core::board::day_label(at.date()),
1316 at.hour(),1316 at.hour(),
1317 at.minute()1317 at.minute()
1318 ),1318 ),
@@ -1418,8 +1418,8 @@ pub(crate) async fn datepicker_grid(
1418 /// bytes and wrote the old date back over the pick; the label it reverted,1418 /// bytes and wrote the old date back over the pick; the label it reverted,
1419 /// the client-built grid it emptied, the month nav's `data-year`/`data-month`1419 /// the client-built grid it emptied, the month nav's `data-year`/`data-month`
1420 /// it swept. So the pick declares itself the client's the moment it happens1420 /// it swept. So the pick declares itself the client's the moment it happens
1421-/// (`__izlekOwn(input, [], ['value'])`, and the panel's month attrs when1421+/// (`__izOwn(input, [], ['value'])`, and the panel's month attrs when
1422-/// `render` first sets them), and an `izlek:wire` repair pass re-derives the1422+/// `render` first sets them), and an `iz:wire` repair pass re-derives the
1423 /// rest from that value: the label of a popover holding an unsaved pick, and1423 /// rest from that value: the label of a popover holding an unsaved pick, and
1424 /// the grid of one standing open. The pass runs on every wire — a repair,1424 /// the grid of one standing open. The pass runs on every wire — a repair,
1425 /// not an install; closed popovers with no unsaved pick are left to the1425 /// not an install; closed popovers with no unsaved pick are left to the
@@ -1430,8 +1430,8 @@ pub(crate) async fn datepicker_script(cx: &Cx, lang: Lang) -> Result {
1430 let (months, weekdays) = datepicker_js_literals(lang);1430 let (months, weekdays) = datepicker_js_literals(lang);
1431 let js = format!(1431 let js = format!(
1432 "(function() {{\1432 "(function() {{\
1433- if (window.__izlekDatepick) {{ return; }}\1433+ if (window.__izDatepick) {{ return; }}\
1434- window.__izlekDatepick = true;\1434+ window.__izDatepick = true;\
1435 var MONTHS = {months};\1435 var MONTHS = {months};\
1436 var WEEKDAYS = {weekdays};\1436 var WEEKDAYS = {weekdays};\
1437 function pad(n) {{ return String(n).padStart(2, '0'); }}\1437 function pad(n) {{ return String(n).padStart(2, '0'); }}\
@@ -1443,7 +1443,7 @@ pub(crate) async fn datepicker_script(cx: &Cx, lang: Lang) -> Result {
1443 if (!input) {{ return; }}\1443 if (!input) {{ return; }}\
1444 var sel = parseYmd(input.value);\1444 var sel = parseYmd(input.value);\
1445 var t = todayYmd();\1445 var t = todayYmd();\
1446- if (!panel.dataset.year) {{ var base = sel || t; panel.dataset.year = base.y; panel.dataset.month = base.m; window.__izlekOwn(panel, [], ['data-year', 'data-month']); }}\1446+ if (!panel.dataset.year) {{ var base = sel || t; panel.dataset.year = base.y; panel.dataset.month = base.m; window.__izOwn(panel, [], ['data-year', 'data-month']); }}\
1447 var y = +panel.dataset.year, m = +panel.dataset.month;\1447 var y = +panel.dataset.year, m = +panel.dataset.month;\
1448 panel.querySelector('.datepick-title').textContent = MONTHS[m - 1] + ' ' + y;\1448 panel.querySelector('.datepick-title').textContent = MONTHS[m - 1] + ' ' + y;\
1449 panel.querySelector('.datepick-weekdays').innerHTML = WEEKDAYS.map(function(w) {{ return '<span>' + w + '</span>'; }}).join('');\1449 panel.querySelector('.datepick-weekdays').innerHTML = WEEKDAYS.map(function(w) {{ return '<span>' + w + '</span>'; }}).join('');\
@@ -1463,7 +1463,7 @@ pub(crate) async fn datepicker_script(cx: &Cx, lang: Lang) -> Result {
1463 var input = panel.querySelector('.datepick-input');\1463 var input = panel.querySelector('.datepick-input');\
1464 if (!input) {{ return; }}\1464 if (!input) {{ return; }}\
1465 input.value = ymd ? (ymd.y + '-' + pad(ymd.m) + '-' + pad(ymd.d)) : '';\1465 input.value = ymd ? (ymd.y + '-' + pad(ymd.m) + '-' + pad(ymd.d)) : '';\
1466- window.__izlekOwn(input, [], ['value']);\1466+ window.__izOwn(input, [], ['value']);\
1467 if (!ymd) {{ ['clock_hour', 'clock_minute'].forEach(function (name) {{ var box = panel.querySelector('[name=' + name + ']'); if (!box) {{ return; }} box.value = ''; var trig = box.__ddTrigger; if (trig) {{ trig.textContent = box.options[0].textContent; trig.setAttribute('aria-expanded', 'false'); }} var drop = box.__ddPanel; if (drop) {{ drop.classList.remove('dd-open'); drop.querySelectorAll('.dd-option-selected').forEach(function (r) {{ r.classList.remove('dd-option-selected'); r.setAttribute('aria-selected', 'false'); }}); }} }}); }} \1467 if (!ymd) {{ ['clock_hour', 'clock_minute'].forEach(function (name) {{ var box = panel.querySelector('[name=' + name + ']'); if (!box) {{ return; }} box.value = ''; var trig = box.__ddTrigger; if (trig) {{ trig.textContent = box.options[0].textContent; trig.setAttribute('aria-expanded', 'false'); }} var drop = box.__ddPanel; if (drop) {{ drop.classList.remove('dd-open'); drop.querySelectorAll('.dd-option-selected').forEach(function (r) {{ r.classList.remove('dd-option-selected'); r.setAttribute('aria-selected', 'false'); }}); }} }}); }} \
1468 var pop = panel.closest('.datepick-pop');\1468 var pop = panel.closest('.datepick-pop');\
1469 var label = pop.querySelector('.datepick-label');\1469 var label = pop.querySelector('.datepick-label');\
@@ -1490,14 +1490,14 @@ pub(crate) async fn datepicker_script(cx: &Cx, lang: Lang) -> Result {
1490 if (!!hour.value !== !!minute.value) {{ return; }}\1490 if (!!hour.value !== !!minute.value) {{ return; }}\
1491 if (input.form) {{ input.form.requestSubmit(); }}\1491 if (input.form) {{ input.form.requestSubmit(); }}\
1492 }});\1492 }});\
1493- document.addEventListener('izlek:wire', function () {{\1493+ document.addEventListener('iz:wire', function () {{\
1494 document.querySelectorAll('.datepick-pop').forEach(function (pop) {{\1494 document.querySelectorAll('.datepick-pop').forEach(function (pop) {{\
1495 var panel = pop.querySelector('.datepick-panel');\1495 var panel = pop.querySelector('.datepick-panel');\
1496 if (!panel) {{ return; }}\1496 if (!panel) {{ return; }}\
1497 var toggle = pop.querySelector('.edit-toggle');\1497 var toggle = pop.querySelector('.edit-toggle');\
1498 if (toggle && toggle.checked) {{ render(panel); }}\1498 if (toggle && toggle.checked) {{ render(panel); }}\
1499 var input = panel.querySelector('.datepick-input');\1499 var input = panel.querySelector('.datepick-input');\
1500- if (!input || !input.__izlekMine || input.__izlekMine.a.indexOf('value') === -1) {{ return; }}\1500+ if (!input || !input.__izMine || input.__izMine.a.indexOf('value') === -1) {{ return; }}\
1501 var label = pop.querySelector('.datepick-label');\1501 var label = pop.querySelector('.datepick-label');\
1502 if (label) {{ speak(label, parseYmd(input.value)); }}\1502 if (label) {{ speak(label, parseYmd(input.value)); }}\
1503 }});\1503 }});\
@@ -1646,8 +1646,8 @@ async fn link_picker(cx: &Cx, task_id: &str, linkable: &[LinkTarget], lang: Lang
1646 /// board's columns the page already has.1646 /// board's columns the page already has.
1647 async fn subtask_row(1647 async fn subtask_row(
1648 cx: &Cx,1648 cx: &Cx,
1649- part: &izlek_core::detail::SubtaskLine,1649+ part: &iz_core::detail::SubtaskLine,
1650- columns: &[izlek_core::Column],1650+ columns: &[iz_core::Column],
1651 may_write: bool,1651 may_write: bool,
1652 lang: Lang,1652 lang: Lang,
1653 ) -> Result {1653 ) -> Result {
@@ -1783,14 +1783,14 @@ async fn dep_row(
1783 /// Uploads are insert-only — nothing in the store rewrites an attachment —1783 /// Uploads are insert-only — nothing in the store rewrites an attachment —
1784 /// so the stamp is the one moment the bytes have ever changed, and a URL1784 /// so the stamp is the one moment the bytes have ever changed, and a URL
1785 /// that carries it can be cached as if it were the bytes themselves.1785 /// that carries it can be cached as if it were the bytes themselves.
1786-fn attachment_stamp(attachment: &izlek_core::store::Attachment) -> String {1786+fn attachment_stamp(attachment: &iz_core::store::Attachment) -> String {
1787 (attachment.uploaded_at.unix_timestamp_nanos() / 1_000).to_string()1787 (attachment.uploaded_at.unix_timestamp_nanos() / 1_000).to_string()
1788 }1788 }
1789 1789
1790 async fn file_chip(1790 async fn file_chip(
1791 cx: &Cx,1791 cx: &Cx,
1792 task_id: &str,1792 task_id: &str,
1793- file: &izlek_core::detail::FileLine,1793+ file: &iz_core::detail::FileLine,
1794 me: &Me,1794 me: &Me,
1795 may_write: bool,1795 may_write: bool,
1796 lang: Lang,1796 lang: Lang,
@@ -2221,7 +2221,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
2221 for entry in &detail.activity {2221 for entry in &detail.activity {
2222 <div class="activity-line">2222 <div class="activity-line">
2223 <span class="activity-stamp">(entry.moment_in(zone))</span>2223 <span class="activity-stamp">(entry.moment_in(zone))</span>
2224- <strong class="activity-who">(entry.actor.as_ref().map(|person| person.display_name.clone()).unwrap_or_else(|| "İzlek".to_string()))</strong>2224+ <strong class="activity-who">(entry.actor.as_ref().map(|person| person.display_name.clone()).unwrap_or_else(|| "İz".to_string()))</strong>
2225 <span class="activity-what">(entry.sentence())</span>2225 <span class="activity-what">(entry.sentence())</span>
2226 </div>2226 </div>
2227 }2227 }
@@ -2339,18 +2339,18 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
2339 /// `<audio>` — native controls live in the browser's own chrome, ignore the2339 /// `<audio>` — native controls live in the browser's own chrome, ignore the
2340 /// theme, and swallow `Escape` while focused, so the viewer draws its own.2340 /// theme, and swallow `Escape` while focused, so the viewer draws its own.
2341 /// Wiring is per-player and idempotent (`data-wired`), re-run on2341 /// Wiring is per-player and idempotent (`data-wired`), re-run on
2342-/// `izlek:wire` so a player arriving in a soft page swap — where inline2342+/// `iz:wire` so a player arriving in a soft page swap — where inline
2343 /// scripts never execute — still gets its controls.2343 /// scripts never execute — still gets its controls.
2344 async fn audio_player_script(cx: &Cx) -> Result {2344 async fn audio_player_script(cx: &Cx) -> Result {
2345 use topcoat::view::Unescaped;2345 use topcoat::view::Unescaped;
2346 const JS: &str = "\2346 const JS: &str = "\
2347 (function () { \2347 (function () { \
2348- if (window.__izlekAudioWired) { return; } \2348+ if (window.__izAudioWired) { return; } \
2349- window.__izlekAudioWired = true; \2349+ window.__izAudioWired = true; \
2350 function wireAll() { document.querySelectorAll('.audio-player').forEach(wirePlayer); } \2350 function wireAll() { document.querySelectorAll('.audio-player').forEach(wirePlayer); } \
2351 function wirePlayer(player) { \2351 function wirePlayer(player) { \
2352 if (player.dataset.wired) { return; } \2352 if (player.dataset.wired) { return; } \
2353- window.__izlekOwn(player, [], ['data-wired']); \2353+ window.__izOwn(player, [], ['data-wired']); \
2354 player.dataset.wired = '1'; \2354 player.dataset.wired = '1'; \
2355 var audio = player.querySelector('.audio-el'); \2355 var audio = player.querySelector('.audio-el'); \
2356 var play = player.querySelector('.audio-play'); \2356 var play = player.querySelector('.audio-play'); \
@@ -2367,7 +2367,7 @@ async fn audio_player_script(cx: &Cx) -> Result {
2367 if (audio.paused) { audio.play(); } else { audio.pause(); } \2367 if (audio.paused) { audio.play(); } else { audio.pause(); } \
2368 }); \2368 }); \
2369 audio.addEventListener('play', function () { \2369 audio.addEventListener('play', function () { \
2370- window.__izlekOwn(player, ['audio-playing'], []); \2370+ window.__izOwn(player, ['audio-playing'], []); \
2371 play.setAttribute('aria-label', play.getAttribute('data-pause')); \2371 play.setAttribute('aria-label', play.getAttribute('data-pause')); \
2372 }); \2372 }); \
2373 audio.addEventListener('pause', function () { \2373 audio.addEventListener('pause', function () { \
@@ -2384,7 +2384,7 @@ async fn audio_player_script(cx: &Cx) -> Result {
2384 }); \2384 }); \
2385 } \2385 } \
2386 wireAll(); \2386 wireAll(); \
2387- document.addEventListener('izlek:wire', wireAll); \2387+ document.addEventListener('iz:wire', wireAll); \
2388 })();";2388 })();";
2389 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }2389 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }
2390 }2390 }
crates/izlek-web/src/dropdown.rs → crates/iz-web/src/dropdown.rsrenamed+11 -11
@@ -43,7 +43,7 @@ use topcoat::context::Cx;
43 use topcoat::view::{Unescaped, view};43 use topcoat::view::{Unescaped, view};
44 44
45 /// Emitted once per page that renders a `<select>`; the enhancement is45 /// Emitted once per page that renders a `<select>`; the enhancement is
46-/// per-element and idempotent (`data-dd-done`), re-run on `izlek:wire` so46+/// per-element and idempotent (`data-dd-done`), re-run on `iz:wire` so
47 /// selects arriving in a soft page swap get theirs too. A select that is47 /// selects arriving in a soft page swap get theirs too. A select that is
48 /// already done is not skipped but repaired: the live refresh morphs the48 /// already done is not skipped but repaired: the live refresh morphs the
49 /// server's HTML over the live DOM, and what it writes is the select — its49 /// server's HTML over the live DOM, and what it writes is the select — its
@@ -54,7 +54,7 @@ use topcoat::view::{Unescaped, view};
54 /// drift: the select unhides itself under its own trigger, or the trigger54 /// drift: the select unhides itself under its own trigger, or the trigger
55 /// keeps announcing a status somebody else has already changed. An open55 /// keeps announcing a status somebody else has already changed. An open
56 /// panel is left alone — repairing under a pointer is worse than stale. Owns its own56 /// panel is left alone — repairing under a pointer is worse than stale. Owns its own
57-/// `Escape` resolver on `window.__izlekEsc` (priority 95 — the dropdown57+/// `Escape` resolver on `window.__izEsc` (priority 95 — the dropdown
58 /// outranks the modal chain: Escape on an open panel closes just the58 /// outranks the modal chain: Escape on an open panel closes just the
59 /// panel, never the modal above it. The old per-script listeners made59 /// panel, never the modal above it. The old per-script listeners made
60 /// this order path-dependent — a modal swapped in by soft navigation60 /// this order path-dependent — a modal swapped in by soft navigation
@@ -65,8 +65,8 @@ use topcoat::view::{Unescaped, view};
65 pub async fn dropdown_script(cx: &Cx) -> Result {65 pub async fn dropdown_script(cx: &Cx) -> Result {
66 const JS: &str = "\66 const JS: &str = "\
67 (function () {\67 (function () {\
68- if (window.__izlekDd) { return; }\68+ if (window.__izDd) { return; }\
69- window.__izlekDd = true;\69+ window.__izDd = true;\
70 function opts(select) { return Array.prototype.slice.call(select.options); }\70 function opts(select) { return Array.prototype.slice.call(select.options); }\
71 function closeAll() {\71 function closeAll() {\
72 document.querySelectorAll('.dd-panel.dd-open').forEach(function (panel) {\72 document.querySelectorAll('.dd-panel.dd-open').forEach(function (panel) {\
@@ -161,7 +161,7 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
161 function resync(select) {\161 function resync(select) {\
162 var trigger = select.__ddTrigger, panel = select.__ddPanel;\162 var trigger = select.__ddTrigger, panel = select.__ddPanel;\
163 if (!trigger || !panel) { return; }\163 if (!trigger || !panel) { return; }\
164- window.__izlekOwn(select, ['dd-native'], []);\164+ window.__izOwn(select, ['dd-native'], []);\
165 if (panel.classList.contains('dd-open')) { return; }\165 if (panel.classList.contains('dd-open')) { return; }\
166 if (!rowsMatch(panel, select)) { fillRows(panel, select); }\166 if (!rowsMatch(panel, select)) { fillRows(panel, select); }\
167 var current = select.options[select.selectedIndex];\167 var current = select.options[select.selectedIndex];\
@@ -175,7 +175,7 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
175 }\175 }\
176 function enhance(select) {\176 function enhance(select) {\
177 if (select.dataset.ddDone) { resync(select); return; }\177 if (select.dataset.ddDone) { resync(select); return; }\
178- window.__izlekOwn(select, [], ['data-dd-done']);\178+ window.__izOwn(select, [], ['data-dd-done']);\
179 select.dataset.ddDone = '1';\179 select.dataset.ddDone = '1';\
180 var trigger = document.createElement('button');\180 var trigger = document.createElement('button');\
181 trigger.type = 'button';\181 trigger.type = 'button';\
@@ -184,9 +184,9 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
184 trigger.textContent = current ? current.textContent : '';\184 trigger.textContent = current ? current.textContent : '';\
185 trigger.setAttribute('aria-haspopup', 'listbox');\185 trigger.setAttribute('aria-haspopup', 'listbox');\
186 trigger.setAttribute('aria-expanded', 'false');\186 trigger.setAttribute('aria-expanded', 'false');\
187- window.__izlekAdded(trigger);\187+ window.__izAdded(trigger);\
188 select.parentNode.insertBefore(trigger, select);\188 select.parentNode.insertBefore(trigger, select);\
189- window.__izlekOwn(select, ['dd-native'], []);\189+ window.__izOwn(select, ['dd-native'], []);\
190 var panel = document.createElement('div');\190 var panel = document.createElement('div');\
191 panel.className = 'dd-panel';\191 panel.className = 'dd-panel';\
192 panel.setAttribute('role', 'listbox');\192 panel.setAttribute('role', 'listbox');\
@@ -205,7 +205,7 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
205 panel.__ddSearch = search;\205 panel.__ddSearch = search;\
206 }\206 }\
207 fillRows(panel, select);\207 fillRows(panel, select);\
208- window.__izlekAdded(panel);\208+ window.__izAdded(panel);\
209 document.body.appendChild(panel);\209 document.body.appendChild(panel);\
210 trigger.addEventListener('click', function (e) {\210 trigger.addEventListener('click', function (e) {\
211 e.stopPropagation();\211 e.stopPropagation();\
@@ -253,7 +253,7 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
253 if (row) { pick(select, trigger, panel, row); }\253 if (row) { pick(select, trigger, panel, row); }\
254 });\254 });\
255 }\255 }\
256- window.__izlekEsc.register(95, function () {\256+ window.__izEsc.register(95, function () {\
257 var panel = document.querySelector('.dd-panel.dd-open');\257 var panel = document.querySelector('.dd-panel.dd-open');\
258 if (!panel) { return false; }\258 if (!panel) { return false; }\
259 var trigger = panel.__ddTrigger;\259 var trigger = panel.__ddTrigger;\
@@ -288,7 +288,7 @@ pub async fn dropdown_script(cx: &Cx) -> Result {
288 }, true);\288 }, true);\
289 function enhanceAll() { document.querySelectorAll('select.status-select, select.field-input').forEach(enhance); }\289 function enhanceAll() { document.querySelectorAll('select.status-select, select.field-input').forEach(enhance); }\
290 enhanceAll();\290 enhanceAll();\
291- document.addEventListener('izlek:wire', enhanceAll);\291+ document.addEventListener('iz:wire', enhanceAll);\
292 })();";292 })();";
293 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }293 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }
294 }294 }
crates/izlek-web/src/files.rs → crates/iz-web/src/files.rsrenamed+8 -8
@@ -4,7 +4,7 @@
4 //! carry. Both routes read the session cookie through the same4 //! carry. Both routes read the session cookie through the same
5 //! `crate::server::require_user` every other route uses.5 //! `crate::server::require_user` every other route uses.
6 //!6 //!
7-//! Ported from `izlek-web/src/files.rs`.7+//! Ported from `iz-web/src/files.rs`.
8 8
9 use time::OffsetDateTime;9 use time::OffsetDateTime;
10 use topcoat::context::Cx;10 use topcoat::context::Cx;
@@ -14,8 +14,8 @@ use topcoat::router::{
14 HeaderMap, HeaderValue, StatusCode, header, path_param, query_params, route,14 HeaderMap, HeaderValue, StatusCode, header, path_param, query_params, route,
15 };15 };
16 16
17-use izlek_core::store::sniff::sniff;17+use iz_core::store::sniff::sniff;
18-use izlek_core::store::{NewAttachment, Store, User};18+use iz_core::store::{NewAttachment, Store, User};
19 19
20 use crate::server::{Refusal, accounts, require_user};20 use crate::server::{Refusal, accounts, require_user};
21 21
@@ -23,7 +23,7 @@ path_param!(id);
23 23
24 /// The task, if this person's workspace is the one holding it. A task in24 /// The task, if this person's workspace is the one holding it. A task in
25 /// another workspace is not found rather than forbidden, same as25 /// another workspace is not found rather than forbidden, same as
26-/// `izlek-web/src/detail.rs`'s `guard::task_of`.26+/// `iz-web/src/detail.rs`'s `guard::task_of`.
27 async fn task_of(store: &dyn Store, user: &User, task_id: &str) -> Result<(), Refusal> {27 async fn task_of(store: &dyn Store, user: &User, task_id: &str) -> Result<(), Refusal> {
28 match store.task(task_id).await {28 match store.task(task_id).await {
29 Ok(Some(facts)) if facts.workspace_id == user.workspace_id => Ok(()),29 Ok(Some(facts)) if facts.workspace_id == user.workspace_id => Ok(()),
@@ -120,7 +120,7 @@ fn mime_of_extension(ext: &str) -> Option<&'static str> {
120 /// true for a mime type a browser renders on its own ([`renders_inline`]) and120 /// true for a mime type a browser renders on its own ([`renders_inline`]) and
121 /// the caller did not ask for a forced download (`?dl=1`) — an uploaded HTML121 /// the caller did not ask for a forced download (`?dl=1`) — an uploaded HTML
122 /// or SVG file stays `attachment` either way, so it is offered to save rather122 /// or SVG file stays `attachment` either way, so it is offered to save rather
123-/// than run on İzlek's origin. The ASCII fallback keeps only characters no123+/// than run on İz's origin. The ASCII fallback keeps only characters no
124 /// quoting scheme could turn into a delimiter or a control character;124 /// quoting scheme could turn into a delimiter or a control character;
125 /// `filename*` carries the real name, percent-encoded, for browsers that read125 /// `filename*` carries the real name, percent-encoded, for browsers that read
126 /// it.126 /// it.
@@ -173,7 +173,7 @@ pub(crate) enum ViewerKind {
173 Video,173 Video,
174 Audio,174 Audio,
175 Pdf,175 Pdf,
176- /// A spreadsheet İzlek reads itself and lays out as a table — no browser176+ /// A spreadsheet İz reads itself and lays out as a table — no browser
177 /// renders one, so this is the only viewer whose bytes are parsed here177 /// renders one, so this is the only viewer whose bytes are parsed here
178 /// rather than handed to an element.178 /// rather than handed to an element.
179 Sheet,179 Sheet,
@@ -376,7 +376,7 @@ async fn upload(
376 None => None,376 None => None,
377 };377 };
378 378
379- let mut added: Result<(), izlek_core::store::StoreError> = Ok(());379+ let mut added: Result<(), iz_core::store::StoreError> = Ok(());
380 for (file_name, bytes) in files {380 for (file_name, bytes) in files {
381 let label = label_of(&file_name);381 let label = label_of(&file_name);
382 let mime_type = sniff(&bytes);382 let mime_type = sniff(&bytes);
@@ -400,7 +400,7 @@ async fn upload(
400 &task_id,400 &task_id,
401 Some(&user.id),401 Some(&user.id),
402 None,402 None,
403- &izlek_core::detail::ActivityKind::FileAdded,403+ &iz_core::detail::ActivityKind::FileAdded,
404 &label,404 &label,
405 OffsetDateTime::now_utc(),405 OffsetDateTime::now_utc(),
406 )406 )
crates/izlek-web/src/i18n.rs → crates/iz-web/src/i18n.rsrenamed+5 -5
@@ -1,7 +1,7 @@
1 //! Per-user UI strings. Part A wires `board.rs`/`detail.rs`; part B appends1 //! Per-user UI strings. Part A wires `board.rs`/`detail.rs`; part B appends
2 //! `auth.rs`/`rules.rs`/`logs.rs`/`pages.rs`/`settings.rs`'s keys to the same2 //! `auth.rs`/`rules.rs`/`logs.rs`/`pages.rs`/`settings.rs`'s keys to the same
3 //! `Key` enum and `t` match, nothing else to change here. Mail bodies in3 //! `Key` enum and `t` match, nothing else to change here. Mail bodies in
4-//! `izlek-core` stay English — a compose has no viewer to pick a language for.4+//! `iz-core` stay English — a compose has no viewer to pick a language for.
5 5
6 /// A user's stored `language` column ('en' default). Anything not `"tr"` is6 /// A user's stored `language` column ('en' default). Anything not `"tr"` is
7 /// English — an unrecognized code is not a refusal, just the default.7 /// English — an unrecognized code is not a refusal, just the default.
@@ -696,16 +696,16 @@ pub fn t(lang: Lang, key: Key) -> &'static str {
696 696
697 (LinkExpiredTitle, En) => "This link no longer works",697 (LinkExpiredTitle, En) => "This link no longer works",
698 (LinkExpiredTitle, Tr) => "Bu bağlantı artık çalışmıyor",698 (LinkExpiredTitle, Tr) => "Bu bağlantı artık çalışmıyor",
699- (SetupTitle, En) => "Set up İzlek",699+ (SetupTitle, En) => "Set up İz",
700- (SetupTitle, Tr) => "İzlek'i kur",700+ (SetupTitle, Tr) => "İz'i kur",
701 (SetupSub, En) => "First account becomes the admin.",701 (SetupSub, En) => "First account becomes the admin.",
702 (SetupSub, Tr) => "İlk hesap yönetici olur.",702 (SetupSub, Tr) => "İlk hesap yönetici olur.",
703 (YourNameLabel, En) => "YOUR NAME",703 (YourNameLabel, En) => "YOUR NAME",
704 (YourNameLabel, Tr) => "ADIN",704 (YourNameLabel, Tr) => "ADIN",
705 (CreateWorkspace, En) => "Create workspace",705 (CreateWorkspace, En) => "Create workspace",
706 (CreateWorkspace, Tr) => "Çalışma alanı oluştur",706 (CreateWorkspace, Tr) => "Çalışma alanı oluştur",
707- (SignInTitle, En) => "Sign in to İzlek",707+ (SignInTitle, En) => "Sign in to İz",
708- (SignInTitle, Tr) => "İzlek'e giriş yap",708+ (SignInTitle, Tr) => "İz'e giriş yap",
709 (SignInSub, En) => {709 (SignInSub, En) => {
710 "Accounts are made by the admin. If you were invited, use the link you were sent — it is where you choose your password."710 "Accounts are made by the admin. If you were invited, use the link you were sent — it is where you choose your password."
711 }711 }
crates/izlek-web/src/layout.rs → crates/iz-web/src/layout.rsrenamed+76 -76
@@ -1,5 +1,5 @@
1 //! The document shell every page renders inside, ported from1 //! The document shell every page renders inside, ported from
2-//! `izlek-web/src/app.rs`'s `shell`/`App`/`NotFound`.2+//! `iz-web/src/app.rs`'s `shell`/`App`/`NotFound`.
3 3
4 use topcoat::{4 use topcoat::{
5 Result,5 Result,
@@ -13,7 +13,7 @@ use topcoat::{
13 view::{Unescaped, view},13 view::{Unescaped, view},
14 };14 };
15 15
16-use izlek_core::board::Person;16+use iz_core::board::Person;
17 17
18 use crate::i18n::{Key, Lang, t};18 use crate::i18n::{Key, Lang, t};
19 use crate::server::current_user;19 use crate::server::current_user;
@@ -37,14 +37,14 @@ const FAVICON: &str = "data:image/svg+xml,\
37 /// its tittle, so one drawing serves both skins and both themes.37 /// its tittle, so one drawing serves both skins and both themes.
38 ///38 ///
39 /// The monogram and the wordmark are alternates, never a pair: `İz` spells the39 /// The monogram and the wordmark are alternates, never a pair: `İz` spells the
40-/// first two letters of `İzlek`, so standing them side by side reads as a40+/// first two letters of `İz`, so standing them side by side reads as a
41 /// stutter no amount of space or framing repairs. The mark carries the chrome,41 /// stutter no amount of space or framing repairs. The mark carries the chrome,
42 /// where the name is already known and the room is 44px; the word carries the42 /// where the name is already known and the room is 44px; the word carries the
43 /// front door, where a stranger arrives and nothing else has said it yet.43 /// front door, where a stranger arrives and nothing else has said it yet.
44 pub(crate) async fn mark(cx: &Cx) -> Result {44 pub(crate) async fn mark(cx: &Cx) -> Result {
45 view! {45 view! {
46 cx =>46 cx =>
47- <a class="wordmark" href="/" aria-label="İzlek">47+ <a class="wordmark" href="/" aria-label="İz">
48 <svg class="wordmark-mark" width="24" height="24" viewBox="0 0 24 24"48 <svg class="wordmark-mark" width="24" height="24" viewBox="0 0 24 24"
49 aria-hidden="true">49 aria-hidden="true">
50 <rect x="3.1" y="9.4" width="4.4" height="11.6" rx="2.2"50 <rect x="3.1" y="9.4" width="4.4" height="11.6" rx="2.2"
@@ -64,7 +64,7 @@ pub(crate) async fn wordmark(cx: &Cx) -> Result {
64 view! {64 view! {
65 cx =>65 cx =>
66 <a class="wordmark wordmark-lone" href="/">66 <a class="wordmark wordmark-lone" href="/">
67- <span class="wordmark-text">"İzlek"</span>67+ <span class="wordmark-text">"İz"</span>
68 </a>68 </a>
69 }69 }
70 }70 }
@@ -104,11 +104,11 @@ pub(crate) async fn avatar(cx: &Cx, person: &Person, extra: &str) -> Result {
104 /// signed-in page's topbar (board, settings, mail rules, logs).104 /// signed-in page's topbar (board, settings, mail rules, logs).
105 pub async fn user_menu(cx: &Cx, me: &crate::detail::Me, lang: Lang) -> Result {105 pub async fn user_menu(cx: &Cx, me: &crate::detail::Me, lang: Lang) -> Result {
106 let role_key = match me.role {106 let role_key = match me.role {
107- izlek_core::Role::Admin => Key::RoleAdminOption,107+ iz_core::Role::Admin => Key::RoleAdminOption,
108- izlek_core::Role::Member => Key::RoleMemberOption,108+ iz_core::Role::Member => Key::RoleMemberOption,
109- izlek_core::Role::Viewer => Key::RoleViewerOption,109+ iz_core::Role::Viewer => Key::RoleViewerOption,
110 };110 };
111- let person = izlek_core::board::Person {111+ let person = iz_core::board::Person {
112 id: me.id.clone(),112 id: me.id.clone(),
113 display_name: me.display_name.clone(),113 display_name: me.display_name.clone(),
114 has_photo: me.has_photo,114 has_photo: me.has_photo,
@@ -177,7 +177,7 @@ impl NavPage {
177 /// current one marked, the admin-only ones (rules, logs, tags) shown only to177 /// current one marked, the admin-only ones (rules, logs, tags) shown only to
178 /// roles that can administer. Plain `<a>`s — the soft-nav forwarder swaps them178 /// roles that can administer. Plain `<a>`s — the soft-nav forwarder swaps them
179 /// like any same-origin link, so `data-hard` stays off.179 /// like any same-origin link, so `data-hard` stays off.
180-pub async fn topbar_nav(cx: &Cx, active: NavPage, role: izlek_core::Role, lang: Lang) -> Result {180+pub async fn topbar_nav(cx: &Cx, active: NavPage, role: iz_core::Role, lang: Lang) -> Result {
181 view! {181 view! {
182 cx =>182 cx =>
183 <nav class="topbar-nav-links">183 <nav class="topbar-nav-links">
@@ -216,7 +216,7 @@ pub async fn topbar_nav(cx: &Cx, active: NavPage, role: izlek_core::Role, lang:
216 /// current password and a right one landed on the same silent page.216 /// current password and a right one landed on the same silent page.
217 ///217 ///
218 /// Every fetch that ends in a swap carries the navigation counter it started218 /// Every fetch that ends in a swap carries the navigation counter it started
219-/// under (`window.__izlekNav`), and its answer is thrown away if that counter219+/// under (`window.__izNav`), and its answer is thrown away if that counter
220 /// has moved. Without it the newest paint is not the newest intent: the live220 /// has moved. Without it the newest paint is not the newest intent: the live
221 /// refresh fetches the URL it was on, and a click landing during that flight221 /// refresh fetches the URL it was on, and a click landing during that flight
222 /// pushed a new page that the refresh's answer then overwrote — the page222 /// pushed a new page that the refresh's answer then overwrote — the page
@@ -233,16 +233,16 @@ pub async fn topbar_nav(cx: &Cx, active: NavPage, role: izlek_core::Role, lang:
233 ///233 ///
234 /// Swapped-in `<script>` nodes are inert (parser-inserted only), so234 /// Swapped-in `<script>` nodes are inert (parser-inserted only), so
235 /// `swap()` re-creates each one as a fresh element, which runs it; every235 /// `swap()` re-creates each one as a fresh element, which runs it; every
236-/// emitted script carries a one-shot `window.__izlek*` guard, so that236+/// emitted script carries a one-shot `window.__iz*` guard, so that
237 /// re-execution never stacks duplicate document-level listeners. There237 /// re-execution never stacks duplicate document-level listeners. There
238 /// is no topcoat re-hydrate entry, so per-element behavior is re-run by238 /// is no topcoat re-hydrate entry, so per-element behavior is re-run by
239-/// the `izlek:wire` event (`dropdown.rs`, the audio player) over the new239+/// the `iz:wire` event (`dropdown.rs`, the audio player) over the new
240 /// nodes.240 /// nodes.
241 ///241 ///
242 /// Forms that must really navigate (sign-in/out, claim, redeem: the session242 /// Forms that must really navigate (sign-in/out, claim, redeem: the session
243 /// cookie and the whole page identity change) opt out with `data-hard`.243 /// cookie and the whole page identity change) opt out with `data-hard`.
244 /// Overlay closes never hit the server at all: the board is already244 /// Overlay closes never hit the server at all: the board is already
245-/// rendered under the modal, so `__izlekCloseModal`/`__izlekCloseViewer`245+/// rendered under the modal, so `__izCloseModal`/`__izCloseViewer`
246 /// drop the overlay's DOM and rewrite the URL.246 /// drop the overlay's DOM and rewrite the URL.
247 ///247 ///
248 /// The click-forwarder at the end is the repo-wide fix for the dead-zone248 /// The click-forwarder at the end is the repo-wide fix for the dead-zone
@@ -264,12 +264,12 @@ pub async fn topbar_nav(cx: &Cx, active: NavPage, role: izlek_core::Role, lang:
264 pub async fn soft_nav_script(cx: &Cx) -> Result {264 pub async fn soft_nav_script(cx: &Cx) -> Result {
265 const JS: &str = "\265 const JS: &str = "\
266 (function () { \266 (function () { \
267- if (window.__izlekSoft) { return; } \267+ if (window.__izSoft) { return; } \
268- window.__izlekSoft = true; \268+ window.__izSoft = true; \
269- window.__izlekBuild = document.documentElement.getAttribute('data-build') || ''; \269+ window.__izBuild = document.documentElement.getAttribute('data-build') || ''; \
270- window.__izlekOwn = function (node, classes, attrs) { \270+ window.__izOwn = function (node, classes, attrs) { \
271- var own = node.__izlekMine; \271+ var own = node.__izMine; \
272- if (!own) { own = node.__izlekMine = { c: [], a: [] }; } \272+ if (!own) { own = node.__izMine = { c: [], a: [] }; } \
273 (classes || []).forEach(function (c) { \273 (classes || []).forEach(function (c) { \
274 if (own.c.indexOf(c) === -1) { own.c.push(c); } \274 if (own.c.indexOf(c) === -1) { own.c.push(c); } \
275 node.classList.add(c); \275 node.classList.add(c); \
@@ -277,10 +277,10 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
277 (attrs || []).forEach(function (a) { if (own.a.indexOf(a) === -1) { own.a.push(a); } }); \277 (attrs || []).forEach(function (a) { if (own.a.indexOf(a) === -1) { own.a.push(a); } }); \
278 return node; \278 return node; \
279 }; \279 }; \
280- window.__izlekAdded = function (node) { node.__izlekAdded = true; return node; }; \280+ window.__izAdded = function (node) { node.__izAdded = true; return node; }; \
281 function wire() { \281 function wire() { \
282 document.querySelectorAll('.comment-list').forEach(function (list) { list.scrollTop = list.scrollHeight; }); \282 document.querySelectorAll('.comment-list').forEach(function (list) { list.scrollTop = list.scrollHeight; }); \
283- document.dispatchEvent(new Event('izlek:wire')); \283+ document.dispatchEvent(new Event('iz:wire')); \
284 } \284 } \
285 function keyOf(el) { \285 function keyOf(el) { \
286 var form = el.form ? (el.form.getAttribute('action') || '') : ''; \286 var form = el.form ? (el.form.getAttribute('action') || '') : ''; \
@@ -329,7 +329,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
329 } \329 } \
330 }); \330 }); \
331 } \331 } \
332- function clientMade(node) { return node.__izlekAdded === true; } \332+ function clientMade(node) { return node.__izAdded === true; } \
333 function pairable(a, b) { \333 function pairable(a, b) { \
334 if (a.nodeType !== b.nodeType) { return false; } \334 if (a.nodeType !== b.nodeType) { return false; } \
335 if (a.nodeType !== 1) { return true; } \335 if (a.nodeType !== 1) { return true; } \
@@ -349,7 +349,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
349 else if (from.hasAttribute('class')) { from.removeAttribute('class'); } \349 else if (from.hasAttribute('class')) { from.removeAttribute('class'); } \
350 } \350 } \
351 function syncAttrs(from, to) { \351 function syncAttrs(from, to) { \
352- var own = from.__izlekMine, i, at; \352+ var own = from.__izMine, i, at; \
353 for (i = to.attributes.length - 1; i >= 0; i--) { \353 for (i = to.attributes.length - 1; i >= 0; i--) { \
354 at = to.attributes[i]; \354 at = to.attributes[i]; \
355 if (at.name === 'class') { continue; } \355 if (at.name === 'class') { continue; } \
@@ -396,28 +396,28 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
396 } \396 } \
397 for (i = theirs.length; i < mine.length; i++) { mine[i].remove(); } \397 for (i = theirs.length; i < mine.length; i++) { mine[i].remove(); } \
398 } \398 } \
399- window.__izlekNav = 0; \399+ window.__izNav = 0; \
400- function navStep() { return ++window.__izlekNav; } \400+ function navStep() { return ++window.__izNav; } \
401- function stillCurrent(n) { return window.__izlekNav === n; } \401+ function stillCurrent(n) { return window.__izNav === n; } \
402 function swap(html, url, fresh, push, morphing) { \402 function swap(html, url, fresh, push, morphing) { \
403 var doc = new DOMParser().parseFromString(html, 'text/html'); \403 var doc = new DOMParser().parseFromString(html, 'text/html'); \
404 var build = doc.documentElement.getAttribute('data-build') || ''; \404 var build = doc.documentElement.getAttribute('data-build') || ''; \
405- if (build && window.__izlekBuild && build !== window.__izlekBuild) { \405+ if (build && window.__izBuild && build !== window.__izBuild) { \
406 var dirty = captureFields().length > 0; \406 var dirty = captureFields().length > 0; \
407 var reloaded = null; \407 var reloaded = null; \
408- try { reloaded = sessionStorage.getItem('izlekSkewFor'); } catch (err) { } \408+ try { reloaded = sessionStorage.getItem('izSkewFor'); } catch (err) { } \
409 if (!dirty && reloaded !== build) { \409 if (!dirty && reloaded !== build) { \
410- try { sessionStorage.setItem('izlekSkewFor', build); } catch (err) { } \410+ try { sessionStorage.setItem('izSkewFor', build); } catch (err) { } \
411 location.reload(); \411 location.reload(); \
412 return; \412 return; \
413 } \413 } \
414 if (!dirty) { \414 if (!dirty) { \
415- window.__izlekBuild = build; \415+ window.__izBuild = build; \
416 document.documentElement.setAttribute('data-build', build); \416 document.documentElement.setAttribute('data-build', build); \
417 } \417 } \
418 } \418 } \
419- var keep = window.__izlekKeep ? captureFields() : null; \419+ var keep = window.__izKeep ? captureFields() : null; \
420- window.__izlekKeep = false; \420+ window.__izKeep = false; \
421 var x = window.scrollX, y = window.scrollY; \421 var x = window.scrollX, y = window.scrollY; \
422 var root = doc.documentElement; \422 var root = doc.documentElement; \
423 if (root.getAttribute('lang')) { document.documentElement.setAttribute('lang', root.getAttribute('lang')); } \423 if (root.getAttribute('lang')) { document.documentElement.setAttribute('lang', root.getAttribute('lang')); } \
@@ -447,35 +447,35 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
447 if (panel.__ddTrigger && !document.contains(panel.__ddTrigger)) { panel.remove(); } \447 if (panel.__ddTrigger && !document.contains(panel.__ddTrigger)) { panel.remove(); } \
448 }); \448 }); \
449 } \449 } \
450- window.__izlekGo = function (url) { \450+ window.__izGo = function (url) { \
451 var n = navStep(); \451 var n = navStep(); \
452 fetch(url).then( \452 fetch(url).then( \
453 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url); } }); }, \453 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url); } }); }, \
454 function () { window.location.href = url; } \454 function () { window.location.href = url; } \
455 ); \455 ); \
456 }; \456 }; \
457- window.__izlekRefresh = function () { \457+ window.__izRefresh = function () { \
458- var n = window.__izlekNav; \458+ var n = window.__izNav; \
459 fetch(window.location.href).then( \459 fetch(window.location.href).then( \
460 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url, false, false, true); } }); }, \460 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url, false, false, true); } }); }, \
461 function () {} \461 function () {} \
462 ); \462 ); \
463 }; \463 }; \
464- window.__izlekQuery = function (url) { \464+ window.__izQuery = function (url) { \
465 var n = navStep(); \465 var n = navStep(); \
466 fetch(url).then( \466 fetch(url).then( \
467 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url, false, false, true); } }); }, \467 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url, false, false, true); } }); }, \
468 function () {} \468 function () {} \
469 ); \469 ); \
470 }; \470 }; \
471- window.__izlekPost = function (action, fields) { \471+ window.__izPost = function (action, fields) { \
472 var n = navStep(); \472 var n = navStep(); \
473 fetch(action, { method: 'POST', headers: { accept: 'text/html' }, body: new URLSearchParams(fields) }).then( \473 fetch(action, { method: 'POST', headers: { accept: 'text/html' }, body: new URLSearchParams(fields) }).then( \
474 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url); } }); }, \474 function (r) { return r.text().then(function (t) { if (stillCurrent(n)) { swap(t, r.url); } }); }, \
475 function () {} \475 function () {} \
476 ); \476 ); \
477 }; \477 }; \
478- window.__izlekCloseViewer = function () { \478+ window.__izCloseViewer = function () { \
479 var scrim = document.querySelector('.viewer-scrim'); \479 var scrim = document.querySelector('.viewer-scrim'); \
480 if (!scrim) { return false; } \480 if (!scrim) { return false; } \
481 var back = scrim.querySelector('.viewer-close').getAttribute('href'); \481 var back = scrim.querySelector('.viewer-close').getAttribute('href'); \
@@ -487,7 +487,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
487 if (modal) { modal.focus(); } \487 if (modal) { modal.focus(); } \
488 return true; \488 return true; \
489 }; \489 }; \
490- window.__izlekCloseModal = function () { \490+ window.__izCloseModal = function () { \
491 var scrims = document.querySelectorAll('.modal-scrim'); \491 var scrims = document.querySelectorAll('.modal-scrim'); \
492 if (!scrims.length) { return false; } \492 if (!scrims.length) { return false; } \
493 navStep(); \493 navStep(); \
@@ -506,15 +506,15 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
506 if (method !== 'post') { \506 if (method !== 'post') { \
507 e.preventDefault(); \507 e.preventDefault(); \
508 var q = new URLSearchParams(new FormData(form)).toString(); \508 var q = new URLSearchParams(new FormData(form)).toString(); \
509- window.__izlekGo((form.getAttribute('action') || window.location.pathname) + (q ? '?' + q : '')); \509+ window.__izGo((form.getAttribute('action') || window.location.pathname) + (q ? '?' + q : '')); \
510 return; \510 return; \
511 } \511 } \
512 e.preventDefault(); \512 e.preventDefault(); \
513 var data = e.submitter ? new FormData(form, e.submitter) : new FormData(form); \513 var data = e.submitter ? new FormData(form, e.submitter) : new FormData(form); \
514 var multipart = (form.getAttribute('enctype') || '').indexOf('multipart') !== -1; \514 var multipart = (form.getAttribute('enctype') || '').indexOf('multipart') !== -1; \
515 if (multipart) { \515 if (multipart) { \
516- if (form.__izlekUploading) { return; } \516+ if (form.__izUploading) { return; } \
517- form.__izlekUploading = true; \517+ form.__izUploading = true; \
518 var n = navStep(); \518 var n = navStep(); \
519 var box = form.querySelector('.file-upload-box'); \519 var box = form.querySelector('.file-upload-box'); \
520 var input = form.querySelector('.file-upload-input'); \520 var input = form.querySelector('.file-upload-input'); \
@@ -525,7 +525,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
525 var fill = document.createElement('div'); \525 var fill = document.createElement('div'); \
526 fill.className = 'upload-progress-fill'; \526 fill.className = 'upload-progress-fill'; \
527 bar.appendChild(fill); \527 bar.appendChild(fill); \
528- box.appendChild(window.__izlekAdded(bar)); \528+ box.appendChild(window.__izAdded(bar)); \
529 drop = document.createElement('button'); \529 drop = document.createElement('button'); \
530 drop.type = 'button'; \530 drop.type = 'button'; \
531 drop.className = 'file-chip-drop upload-progress-drop'; \531 drop.className = 'file-chip-drop upload-progress-drop'; \
@@ -533,11 +533,11 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
533 if (cancelLabel) { drop.setAttribute('aria-label', cancelLabel); } \533 if (cancelLabel) { drop.setAttribute('aria-label', cancelLabel); } \
534 drop.innerHTML = '<svg class=\"glyph\" width=\"13\" height=\"13\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"></path></svg>'; \534 drop.innerHTML = '<svg class=\"glyph\" width=\"13\" height=\"13\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\"><path d=\"M4 4l8 8M12 4l-8 8\"></path></svg>'; \
535 drop.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); x.abort(); }); \535 drop.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); x.abort(); }); \
536- box.appendChild(window.__izlekAdded(drop)); \536+ box.appendChild(window.__izAdded(drop)); \
537 } \537 } \
538- if (input) { input.disabled = true; window.__izlekOwn(input, [], ['disabled']); } \538+ if (input) { input.disabled = true; window.__izOwn(input, [], ['disabled']); } \
539 var settle = function () { \539 var settle = function () { \
540- form.__izlekUploading = false; \540+ form.__izUploading = false; \
541 if (input) { input.disabled = false; } \541 if (input) { input.disabled = false; } \
542 if (bar && bar.parentNode) { bar.parentNode.removeChild(bar); } \542 if (bar && bar.parentNode) { bar.parentNode.removeChild(bar); } \
543 if (drop && drop.parentNode) { drop.parentNode.removeChild(drop); } \543 if (drop && drop.parentNode) { drop.parentNode.removeChild(drop); } \
@@ -590,21 +590,21 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
590 if (link) { \590 if (link) { \
591 if (link.classList.contains('viewer-close') || (link.classList.contains('detail-close') && link.closest('.viewer-scrim'))) { \591 if (link.classList.contains('viewer-close') || (link.classList.contains('detail-close') && link.closest('.viewer-scrim'))) { \
592 e.preventDefault(); \592 e.preventDefault(); \
593- window.__izlekCloseViewer(); \593+ window.__izCloseViewer(); \
594 return; \594 return; \
595 } \595 } \
596 if (link.getAttribute('href') === '/' && link.closest('.modal-scrim')) { \596 if (link.getAttribute('href') === '/' && link.closest('.modal-scrim')) { \
597 e.preventDefault(); \597 e.preventDefault(); \
598- window.__izlekCloseModal(); \598+ window.__izCloseModal(); \
599 return; \599 return; \
600 } \600 } \
601 } \601 } \
602 if (e.target.classList && e.target.classList.contains('modal-scrim')) { \602 if (e.target.classList && e.target.classList.contains('modal-scrim')) { \
603- if (e.target.classList.contains('viewer-scrim')) { window.__izlekCloseViewer(); } \603+ if (e.target.classList.contains('viewer-scrim')) { window.__izCloseViewer(); } \
604- else { window.__izlekCloseModal(); } \604+ else { window.__izCloseModal(); } \
605 } \605 } \
606 }, true); \606 }, true); \
607- window.addEventListener('popstate', function () { window.__izlekGo(window.location.href); }); \607+ window.addEventListener('popstate', function () { window.__izGo(window.location.href); }); \
608 document.addEventListener('click', function (e) { \608 document.addEventListener('click', function (e) { \
609 if (e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) { return; } \609 if (e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) { return; } \
610 var link = e.target.closest ? e.target.closest('a') : null; \610 var link = e.target.closest ? e.target.closest('a') : null; \
@@ -633,7 +633,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
633 /// The one document-level capture `keydown` listener for `Escape`, emitted633 /// The one document-level capture `keydown` listener for `Escape`, emitted
634 /// once from `root_layout` before every page's own scripts. Owners install634 /// once from `root_layout` before every page's own scripts. Owners install
635 /// no listeners of their own; their scripts call635 /// no listeners of their own; their scripts call
636-/// `window.__izlekEsc.register(priority, fn)` and on `Escape` the manager636+/// `window.__izEsc.register(priority, fn)` and on `Escape` the manager
637 /// runs the resolvers highest-priority first — the first to return true637 /// runs the resolvers highest-priority first — the first to return true
638 /// closes its surface and the manager stops the key. Every consuming press638 /// closes its surface and the manager stops the key. Every consuming press
639 /// gets `preventDefault()`: a real Escape's browser default is stop-loading639 /// gets `preventDefault()`: a real Escape's browser default is stop-loading
@@ -658,14 +658,14 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
658 /// tick that keeps clock-driven text honest.658 /// tick that keeps clock-driven text honest.
659 ///659 ///
660 /// Everything here is one script because both halves end in the same act —660 /// Everything here is one script because both halves end in the same act —
661-/// re-fetch the current URL through `__izlekGo` and let `swap()` do what it661+/// re-fetch the current URL through `__izGo` and let `swap()` do what it
662 /// already does after every form post. There is deliberately no second render662 /// already does after every form post. There is deliberately no second render
663 /// path: a partial-update mechanism would be a second way for the page to be663 /// path: a partial-update mechanism would be a second way for the page to be
664 /// wrong, and the full swap is the one the app exercises constantly.664 /// wrong, and the full swap is the one the app exercises constantly.
665 ///665 ///
666 /// Three things it must not get wrong:666 /// Three things it must not get wrong:
667 ///667 ///
668-/// The `__izlekLive` guard is not decoration. `swap()` re-executes every668+/// The `__izLive` guard is not decoration. `swap()` re-executes every
669 /// swapped-in script, so without it each soft navigation would open another669 /// swapped-in script, so without it each soft navigation would open another
670 /// `EventSource` and the tab would end up holding one connection per page it670 /// `EventSource` and the tab would end up holding one connection per page it
671 /// had ever visited.671 /// had ever visited.
@@ -686,7 +686,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
686 /// because nothing touched them.686 /// because nothing touched them.
687 ///687 ///
688 /// A `<script>` whose text is unchanged is left alone rather than re-created,688 /// A `<script>` whose text is unchanged is left alone rather than re-created,
689-/// so the live path stops re-running every script on the page; the `__izlek*`689+/// so the live path stops re-running every script on the page; the `__iz*`
690 /// guards remain the backstop for the full-swap path, which still re-runs them.690 /// guards remain the backstop for the full-swap path, which still re-runs them.
691 ///691 ///
692 /// ## The client declares what is its own692 /// ## The client declares what is its own
@@ -708,10 +708,10 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
708 /// So the morph knows no names at all. A node says what belongs to the708 /// So the morph knows no names at all. A node says what belongs to the
709 /// client, at the moment the client takes it:709 /// client, at the moment the client takes it:
710 ///710 ///
711-/// - `__izlekOwn(node, classes, attrs)` — the classes and attributes on this711+/// - `__izOwn(node, classes, attrs)` — the classes and attributes on this
712 /// server-rendered node are the client's. It adds the classes itself, so712 /// server-rendered node are the client's. It adds the classes itself, so
713 /// there is no way to apply one without registering it.713 /// there is no way to apply one without registering it.
714-/// - `__izlekAdded(node)` — this whole node is the client's; it is not a714+/// - `__izAdded(node)` — this whole node is the client's; it is not a
715 /// stray and must not be deleted.715 /// stray and must not be deleted.
716 ///716 ///
717 /// Both record on a DOM *property*, which no morph can strip, and both are717 /// Both record on a DOM *property*, which no morph can strip, and both are
@@ -723,7 +723,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
723 /// stale server bytes say nothing against it. Nothing in this file mentions723 /// stale server bytes say nothing against it. Nothing in this file mentions
724 /// a dropdown.724 /// a dropdown.
725 ///725 ///
726-/// The other half of the contract is `izlek:wire`: an enhancement re-derives726+/// The other half of the contract is `iz:wire`: an enhancement re-derives
727 /// whatever it draws from server data rather than assuming it is still true.727 /// whatever it draws from server data rather than assuming it is still true.
728 /// Ownership keeps the morph from breaking the enhancement; the wire pass is728 /// Ownership keeps the morph from breaking the enhancement; the wire pass is
729 /// how the enhancement follows the server when the data underneath it moves.729 /// how the enhancement follows the server when the data underneath it moves.
@@ -743,12 +743,12 @@ pub async fn soft_nav_script(cx: &Cx) -> Result {
743 pub async fn live_script(cx: &Cx) -> Result {743 pub async fn live_script(cx: &Cx) -> Result {
744 const JS: &str = "\744 const JS: &str = "\
745 (function () { \745 (function () { \
746- if (window.__izlekLive) { return; } \746+ if (window.__izLive) { return; } \
747- window.__izlekLive = true; \747+ window.__izLive = true; \
748 var timer = null; \748 var timer = null; \
749 function refresh() { \749 function refresh() { \
750- window.__izlekKeep = true; \750+ window.__izKeep = true; \
751- if (window.__izlekRefresh) { window.__izlekRefresh(); } \751+ if (window.__izRefresh) { window.__izRefresh(); } \
752 } \752 } \
753 function schedule() { \753 function schedule() { \
754 if (timer) { clearTimeout(timer); } \754 if (timer) { clearTimeout(timer); } \
@@ -783,18 +783,18 @@ pub async fn escape_manager_script(cx: &Cx) -> Result {
783 use topcoat::view::Unescaped;783 use topcoat::view::Unescaped;
784 const JS: &str = "\784 const JS: &str = "\
785 (function () { \785 (function () { \
786- if (window.__izlekEsc) { return; } \786+ if (window.__izEsc) { return; } \
787- window.__izlekEsc = { \787+ window.__izEsc = { \
788 resolvers: [], \788 resolvers: [], \
789 register: function (priority, fn) { \789 register: function (priority, fn) { \
790- window.__izlekEsc.resolvers.push({ priority: priority, fn: fn }); \790+ window.__izEsc.resolvers.push({ priority: priority, fn: fn }); \
791- window.__izlekEsc.resolvers.sort(function (a, b) { return b.priority - a.priority; }); \791+ window.__izEsc.resolvers.sort(function (a, b) { return b.priority - a.priority; }); \
792 } \792 } \
793 }; \793 }; \
794 document.addEventListener('keydown', function (e) { \794 document.addEventListener('keydown', function (e) { \
795 if (e.key !== 'Escape') { return; } \795 if (e.key !== 'Escape') { return; } \
796- for (var i = 0; i < window.__izlekEsc.resolvers.length; i++) { \796+ for (var i = 0; i < window.__izEsc.resolvers.length; i++) { \
797- if (window.__izlekEsc.resolvers[i].fn(e)) { \797+ if (window.__izEsc.resolvers[i].fn(e)) { \
798 e.preventDefault(); \798 e.preventDefault(); \
799 e.stopImmediatePropagation(); \799 e.stopImmediatePropagation(); \
800 return; \800 return; \
@@ -804,7 +804,7 @@ pub async fn escape_manager_script(cx: &Cx) -> Result {
804 })();";804 })();";
805 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }805 view! { cx => <script>(Unescaped::new_unchecked(JS))</script> }
806 }806 }
807-/// Registers the topbar/rules `Escape` resolvers on `window.__izlekEsc`807+/// Registers the topbar/rules `Escape` resolvers on `window.__izEsc`
808 /// (priority 40 — the table is on `escape_manager_script`): the topbar808 /// (priority 40 — the table is on `escape_manager_script`): the topbar
809 /// `.user-menu` panel — hover-open included, pinned shut by a809 /// `.user-menu` panel — hover-open included, pinned shut by a
810 /// `user-menu-esc` class that a `mouseenter` inside the menu clears — then810 /// `user-menu-esc` class that a `mouseenter` inside the menu clears — then
@@ -814,12 +814,12 @@ pub async fn escape_manager_script(cx: &Cx) -> Result {
814 pub async fn escape_script(cx: &Cx) -> Result {814 pub async fn escape_script(cx: &Cx) -> Result {
815 const JS: &str = "\815 const JS: &str = "\
816 (function () { \816 (function () { \
817- if (window.__izlekEscTop) { return; } \817+ if (window.__izEscTop) { return; } \
818- window.__izlekEscTop = true; \818+ window.__izEscTop = true; \
819- window.__izlekEsc.register(40, function () { \819+ window.__izEsc.register(40, function () { \
820 var menu = document.querySelector('.user-menu'); \820 var menu = document.querySelector('.user-menu'); \
821 if (menu && (menu.matches(':hover') || menu.contains(document.activeElement))) { \821 if (menu && (menu.matches(':hover') || menu.contains(document.activeElement))) { \
822- window.__izlekOwn(menu, ['user-menu-esc'], []); \822+ window.__izOwn(menu, ['user-menu-esc'], []); \
823 var focused = document.activeElement; \823 var focused = document.activeElement; \
824 if (focused && focused.closest('.user-menu')) { focused.blur(); } \824 if (focused && focused.closest('.user-menu')) { focused.blur(); } \
825 return true; \825 return true; \
@@ -827,7 +827,7 @@ pub async fn escape_script(cx: &Cx) -> Result {
827 var composer = document.querySelector('details.rule-new[open]'); \827 var composer = document.querySelector('details.rule-new[open]'); \
828 if (composer) { composer.removeAttribute('open'); return true; } \828 if (composer) { composer.removeAttribute('open'); return true; } \
829 if (document.querySelector('.rule-new-body[action=\"/api/update_rule\"]')) { \829 if (document.querySelector('.rule-new-body[action=\"/api/update_rule\"]')) { \
830- if (window.__izlekGo) { window.__izlekGo('/rules'); } else { window.location.href = '/rules'; } \830+ if (window.__izGo) { window.__izGo('/rules'); } else { window.location.href = '/rules'; } \
831 return true; \831 return true; \
832 } \832 } \
833 return false; \833 return false; \
@@ -893,7 +893,7 @@ async fn root_layout(cx: &Cx, slot: Result) -> Result {
893 rel="stylesheet"893 rel="stylesheet"
894 href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Newsreader:ital,wght@0,400;0,600;1,400;1,600&display=swap"894 href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Newsreader:ital,wght@0,400;0,600;1,400;1,600&display=swap"
895 >895 >
896- <title>"İzlek"</title>896+ <title>"İz"</title>
897 <link rel="icon" href=(FAVICON)>897 <link rel="icon" href=(FAVICON)>
898 <link rel="stylesheet" href=(STYLE)>898 <link rel="stylesheet" href=(STYLE)>
899 topcoat::runtime::script()899 topcoat::runtime::script()
crates/izlek-web/src/lib.rs → crates/iz-web/src/lib.rsrenamed+0 -0
crates/izlek-web/src/live.rs → crates/iz-web/src/live.rsrenamed+2 -2
@@ -13,7 +13,7 @@
13 13
14 use std::time::Duration;14 use std::time::Duration;
15 15
16-use izlek_core::{Change, Topic};16+use iz_core::{Change, Topic};
17 use serde::Serialize;17 use serde::Serialize;
18 use tokio::sync::broadcast::error::RecvError;18 use tokio::sync::broadcast::error::RecvError;
19 use tokio::time::Instant;19 use tokio::time::Instant;
@@ -25,7 +25,7 @@ use topcoat::router::{StatusCode, route};
25 use crate::server::{accounts, require_user};25 use crate::server::{accounts, require_user};
26 26
27 /// How long one connection is held before the server ends it and the browser27 /// How long one connection is held before the server ends it and the browser
28-/// opens another. Set from `config/izlek.toml`; absent — as in the test router28+/// opens another. Set from `config/iz.toml`; absent — as in the test router
29 /// — the default stands in.29 /// — the default stands in.
30 #[derive(Clone, Copy, Debug)]30 #[derive(Clone, Copy, Debug)]
31 pub struct LiveWindow(pub Duration);31 pub struct LiveWindow(pub Duration);
crates/izlek-web/src/logs.rs → crates/iz-web/src/logs.rsrenamed+26 -26
@@ -8,7 +8,7 @@
8 //! every request, so `snapshot` — the shared read — backs both the page and8 //! every request, so `snapshot` — the shared read — backs both the page and
9 //! the JSON route `tests/http.rs` polls.9 //! the JSON route `tests/http.rs` polls.
10 10
11-use izlek_core::store::{ActivityFilter, Dir, FeedCursor, FeedPage};11+use iz_core::store::{ActivityFilter, Dir, FeedCursor, FeedPage};
12 use serde::{Deserialize, Serialize};12 use serde::{Deserialize, Serialize};
13 use time::OffsetDateTime;13 use time::OffsetDateTime;
14 use time::format_description::well_known::Rfc3339;14 use time::format_description::well_known::Rfc3339;
@@ -137,8 +137,8 @@ const ACTIVITY_KINDS: &[&str] = &[
137 137
138 /// The word the decisions panel prints for an outcome. Terse: the panel is138 /// The word the decisions panel prints for an outcome. Terse: the panel is
139 /// read, not explained.139 /// read, not explained.
140-pub(crate) fn outcome_word(outcome: izlek_core::store::MailOutcome, lang: Lang) -> &'static str {140+pub(crate) fn outcome_word(outcome: iz_core::store::MailOutcome, lang: Lang) -> &'static str {
141- use izlek_core::store::MailOutcome;141+ use iz_core::store::MailOutcome;
142 match outcome {142 match outcome {
143 MailOutcome::Owed => t(lang, Key::OutcomeQueued),143 MailOutcome::Owed => t(lang, Key::OutcomeQueued),
144 MailOutcome::AlreadyOwed => t(lang, Key::OutcomeAlreadyQueued),144 MailOutcome::AlreadyOwed => t(lang, Key::OutcomeAlreadyQueued),
@@ -152,8 +152,8 @@ pub(crate) fn outcome_word(outcome: izlek_core::store::MailOutcome, lang: Lang)
152 /// The sentence after a task's name, mirroring `ActivityEntry::sentence` —152 /// The sentence after a task's name, mirroring `ActivityEntry::sentence` —
153 /// the per-task strip on the detail screen — since the workspace feed carries153 /// the per-task strip on the detail screen — since the workspace feed carries
154 /// the same kind and detail but no `Person` to build an `ActivityEntry` from.154 /// the same kind and detail but no `Person` to build an `ActivityEntry` from.
155-pub(crate) fn activity_sentence(kind: &izlek_core::detail::ActivityKind, detail: &str, lang: Lang) -> String {155+pub(crate) fn activity_sentence(kind: &iz_core::detail::ActivityKind, detail: &str, lang: Lang) -> String {
156- use izlek_core::detail::ActivityKind;156+ use iz_core::detail::ActivityKind;
157 let detail = detail.trim();157 let detail = detail.trim();
158 match kind {158 match kind {
159 ActivityKind::Created => t(lang, Key::ActCreated).to_string(),159 ActivityKind::Created => t(lang, Key::ActCreated).to_string(),
@@ -215,11 +215,11 @@ pub(crate) fn activity_sentence(kind: &izlek_core::detail::ActivityKind, detail:
215 /// Review" — or nothing when the event or its destination column is gone:215 /// Review" — or nothing when the event or its destination column is gone:
216 /// the panel names what it can still read, never a guess.216 /// the panel names what it can still read, never a guess.
217 pub(crate) async fn event_happened(217 pub(crate) async fn event_happened(
218- store: &std::sync::Arc<dyn izlek_core::store::Store>,218+ store: &std::sync::Arc<dyn iz_core::store::Store>,
219 event_id: &str,219 event_id: &str,
220 lang: Lang,220 lang: Lang,
221-) -> std::result::Result<Option<String>, izlek_core::store::StoreError> {221+) -> std::result::Result<Option<String>, iz_core::store::StoreError> {
222- use izlek_core::store::Event;222+ use iz_core::store::Event;
223 223
224 let Some(event) = store.event(event_id).await? else {224 let Some(event) = store.event(event_id).await? else {
225 return Ok(None);225 return Ok(None);
@@ -255,14 +255,14 @@ pub(crate) async fn event_happened(
255 /// is empty or does not parse as a known token — including every row a255 /// is empty or does not parse as a known token — including every row a
256 /// version before this scheme wrote — is shown exactly as stored.256 /// version before this scheme wrote — is shown exactly as stored.
257 pub(crate) async fn decision_detail(257 pub(crate) async fn decision_detail(
258- store: &std::sync::Arc<dyn izlek_core::store::Store>,258+ store: &std::sync::Arc<dyn iz_core::store::Store>,
259- columns_cache: &mut std::collections::HashMap<String, Vec<izlek_core::board::Column>>,259+ columns_cache: &mut std::collections::HashMap<String, Vec<iz_core::board::Column>>,
260 board_id: Option<&str>,260 board_id: Option<&str>,
261- outcome: izlek_core::store::MailOutcome,261+ outcome: iz_core::store::MailOutcome,
262 detail: &str,262 detail: &str,
263 lang: Lang,263 lang: Lang,
264-) -> std::result::Result<String, izlek_core::store::StoreError> {264+) -> std::result::Result<String, iz_core::store::StoreError> {
265- use izlek_core::store::MailOutcome;265+ use iz_core::store::MailOutcome;
266 266
267 if detail.is_empty() || !matches!(outcome, MailOutcome::NoRecipients | MailOutcome::NotMatched)267 if detail.is_empty() || !matches!(outcome, MailOutcome::NoRecipients | MailOutcome::NotMatched)
268 {268 {
@@ -350,13 +350,13 @@ fn feed_window(active: Section, target: Section, page: &FeedPage, limit: u32) ->
350 }350 }
351 }351 }
352 352
353-/// The active section's own page size: from `izlek_rows_<section>`, the353+/// The active section's own page size: from `iz_rows_<section>`, the
354 /// cookie the page's own fit script sets once it has measured the browser's354 /// cookie the page's own fit script sets once it has measured the browser's
355 /// real viewport, clamped so a stale or tampered cookie can't ask for an355 /// real viewport, clamped so a stale or tampered cookie can't ask for an
356 /// absurd window. `LIMIT` — the same default the unpaged JSON route reads —356 /// absurd window. `LIMIT` — the same default the unpaged JSON route reads —
357 /// when the cookie is absent or unparsable.357 /// when the cookie is absent or unparsable.
358 fn resolve_limit(cx: &Cx, section: Section) -> u32 {358 fn resolve_limit(cx: &Cx, section: Section) -> u32 {
359- crate::server::presented_cookie(cx, &format!("izlek_rows_{}", section_slug(section)))359+ crate::server::presented_cookie(cx, &format!("iz_rows_{}", section_slug(section)))
360 .and_then(|raw| raw.parse::<u32>().ok())360 .and_then(|raw| raw.parse::<u32>().ok())
361 .map(|rows| rows.clamp(10, 200))361 .map(|rows| rows.clamp(10, 200))
362 .unwrap_or(LIMIT)362 .unwrap_or(LIMIT)
@@ -513,14 +513,14 @@ async fn snapshot(
513 filter: &ActivityFilter,513 filter: &ActivityFilter,
514 limit: u32,514 limit: u32,
515 ) -> Result<std::result::Result<(LogsSnapshot, PageLinks), Refusal>> {515 ) -> Result<std::result::Result<(LogsSnapshot, PageLinks), Refusal>> {
516- use izlek_core::store::SendState;516+ use iz_core::store::SendState;
517 517
518 let user = match require_admin(cx).await {518 let user = match require_admin(cx).await {
519 Ok(user) => user,519 Ok(user) => user,
520 Err(refusal) => return Ok(Err(refusal)),520 Err(refusal) => return Ok(Err(refusal)),
521 };521 };
522 let lang = Lang::from_code(&user.language);522 let lang = Lang::from_code(&user.language);
523- let zone = izlek_core::detail::parse_zone(&user.timezone);523+ let zone = iz_core::detail::parse_zone(&user.timezone);
524 let now = OffsetDateTime::now_utc();524 let now = OffsetDateTime::now_utc();
525 let store = accounts(cx).store().clone();525 let store = accounts(cx).store().clone();
526 526
@@ -592,7 +592,7 @@ async fn snapshot(
592 format!(592 format!(
593 "{} {}",593 "{} {}",
594 t(lang, Key::NextTry),594 t(lang, Key::NextTry),
595- izlek_core::detail::moment_label_with_seconds_in(at, zone)595+ iz_core::detail::moment_label_with_seconds_in(at, zone)
596 )596 )
597 }597 }
598 }),598 }),
@@ -623,7 +623,7 @@ async fn snapshot(
623 }623 }
624 let decisions_shown = raw_decisions.len() as u64;624 let decisions_shown = raw_decisions.len() as u64;
625 let mut decisions: Vec<DecisionGroup> = Vec::new();625 let mut decisions: Vec<DecisionGroup> = Vec::new();
626- let mut columns_cache: std::collections::HashMap<String, Vec<izlek_core::board::Column>> =626+ let mut columns_cache: std::collections::HashMap<String, Vec<iz_core::board::Column>> =
627 std::collections::HashMap::new();627 std::collections::HashMap::new();
628 for decision in raw_decisions {628 for decision in raw_decisions {
629 let rule = store.mail_rule(&decision.rule_id).await?;629 let rule = store.mail_rule(&decision.rule_id).await?;
@@ -663,7 +663,7 @@ async fn snapshot(
663 event_id: decision.event_id,663 event_id: decision.event_id,
664 task,664 task,
665 happened,665 happened,
666- at: izlek_core::detail::moment_label_in(decision.at, zone),666+ at: iz_core::detail::moment_label_in(decision.at, zone),
667 verdicts: vec![verdict],667 verdicts: vec![verdict],
668 });668 });
669 }669 }
@@ -698,7 +698,7 @@ async fn snapshot(
698 let activity = raw_activity698 let activity = raw_activity
699 .into_iter()699 .into_iter()
700 .map(|line| ActivityRow {700 .map(|line| ActivityRow {
701- at: izlek_core::detail::moment_label_in(line.at, zone),701+ at: iz_core::detail::moment_label_in(line.at, zone),
702 actor: line702 actor: line
703 .actor_name703 .actor_name
704 .unwrap_or_else(|| t(lang, Key::TheSystem).to_string()),704 .unwrap_or_else(|| t(lang, Key::TheSystem).to_string()),
@@ -802,7 +802,7 @@ async fn retry_send(cx: &Cx, Form(input): Form<RetrySendForm>) -> Redirect {
802 let _ = store802 let _ = store
803 .record_event(803 .record_event(
804 Some(&admin.id),804 Some(&admin.id),
805- &izlek_core::detail::ActivityKind::Other("send_retried".to_string()),805+ &iz_core::detail::ActivityKind::Other("send_retried".to_string()),
806 "",806 "",
807 OffsetDateTime::now_utc(),807 OffsetDateTime::now_utc(),
808 )808 )
@@ -853,7 +853,7 @@ async fn logs_page(cx: &Cx) -> Result {
853 // `snapshot` itself, so a signed-out visitor still gets a clean refusal853 // `snapshot` itself, so a signed-out visitor still gets a clean refusal
854 // rather than a second, redundant lookup here.854 // rather than a second, redundant lookup here.
855 let zone = match require_admin(cx).await {855 let zone = match require_admin(cx).await {
856- Ok(user) => izlek_core::detail::parse_zone(&user.timezone),856+ Ok(user) => iz_core::detail::parse_zone(&user.timezone),
857 Err(_) => time::UtcOffset::UTC,857 Err(_) => time::UtcOffset::UTC,
858 };858 };
859 let filter = parse_activity_filter(&query, zone);859 let filter = parse_activity_filter(&query, zone);
@@ -1206,7 +1206,7 @@ async fn logs_screen(
1206 /// Fits the active tab's page size to the browser's own viewport: measured1206 /// Fits the active tab's page size to the browser's own viewport: measured
1207 /// once per load/swap against the first rendered row, never against a guess1207 /// once per load/swap against the first rendered row, never against a guess
1208 /// at the row height. A fit that would change the page size reloads once1208 /// at the row height. A fit that would change the page size reloads once
1209-/// through a fresh `izlek_rows_<section>` cookie; the `sessionStorage` guard,1209+/// through a fresh `iz_rows_<section>` cookie; the `sessionStorage` guard,
1210 /// keyed to the exact fit computed, stops a borderline measurement from1210 /// keyed to the exact fit computed, stops a borderline measurement from
1211 /// reloading forever. A container too short to measure (no rows yet, or a1211 /// reloading forever. A container too short to measure (no rows yet, or a
1212 /// stage not yet laid out) is left alone rather than guessed at.1212 /// stage not yet laid out) is left alone rather than guessed at.
@@ -1224,10 +1224,10 @@ async fn log_fit_script(cx: &Cx) -> Result {
1224 var avail = stage.getBoundingClientRect().bottom - list.getBoundingClientRect().top - 44;\1224 var avail = stage.getBoundingClientRect().bottom - list.getBoundingClientRect().top - 44;\
1225 var fit = Math.max(10, Math.floor(avail / row.offsetHeight));\1225 var fit = Math.max(10, Math.floor(avail / row.offsetHeight));\
1226 if (fit === current) { return; }\1226 if (fit === current) { return; }\
1227- var guard = 'izlekLogFit:' + section + ':' + fit;\1227+ var guard = 'izLogFit:' + section + ':' + fit;\
1228 if (window.sessionStorage.getItem(guard)) { return; }\1228 if (window.sessionStorage.getItem(guard)) { return; }\
1229 window.sessionStorage.setItem(guard, '1');\1229 window.sessionStorage.setItem(guard, '1');\
1230- document.cookie = 'izlek_rows_' + section + '=' + fit + ';path=/';\1230+ document.cookie = 'iz_rows_' + section + '=' + fit + ';path=/';\
1231 location.replace(location.href);\1231 location.replace(location.href);\
1232 })();";1232 })();";
1233 view! { cx => <script>(Unescaped::new_unchecked(js))</script> }1233 view! { cx => <script>(Unescaped::new_unchecked(js))</script> }
crates/izlek-web/src/main.rs → crates/iz-web/src/main.rsrenamed+37 -37
@@ -1,5 +1,5 @@
1-use izlek_core::accounts::Accounts;1+use iz_core::accounts::Accounts;
2-use izlek_core::store::TursoStore;2+use iz_core::store::TursoStore;
3 use std::sync::Arc;3 use std::sync::Arc;
4 use topcoat::Result;4 use topcoat::Result;
5 use topcoat::asset::{AssetBundle, RouterBuilderAssetExt};5 use topcoat::asset::{AssetBundle, RouterBuilderAssetExt};
@@ -22,22 +22,22 @@ async fn main() {
22 "--dry-run" => dry_run = true,22 "--dry-run" => dry_run = true,
23 "--yes" => yes = true,23 "--yes" => yes = true,
24 _ => {24 _ => {
25- eprintln!("izlek reconcile: unknown option {arg}");25+ eprintln!("iz reconcile: unknown option {arg}");
26 std::process::exit(2);26 std::process::exit(2);
27 }27 }
28 }28 }
29 }29 }
30- let config = match izlek_core::Config::load() {30+ let config = match iz_core::Config::load() {
31 Ok(config) => config,31 Ok(config) => config,
32 Err(problem) => {32 Err(problem) => {
33- eprintln!("izlek: {problem}");33+ eprintln!("iz: {problem}");
34 std::process::exit(2);34 std::process::exit(2);
35 }35 }
36 };36 };
37- if let Err(problem) = izlek_core::store::reconcile(37+ if let Err(problem) = iz_core::store::reconcile(
38 &config.database.to_string_lossy(),38 &config.database.to_string_lossy(),
39 Some(config.storage.as_path()),39 Some(config.storage.as_path()),
40- izlek_core::store::ReconcileOptions {40+ iz_core::store::ReconcileOptions {
41 dry_run,41 dry_run,
42 yes,42 yes,
43 auto: false,43 auto: false,
@@ -45,27 +45,27 @@ async fn main() {
45 )45 )
46 .await46 .await
47 {47 {
48- eprintln!("izlek reconcile: {problem}");48+ eprintln!("iz reconcile: {problem}");
49 std::process::exit(1);49 std::process::exit(1);
50 }50 }
51 return;51 return;
52 }52 }
53 53
54- // config/izlek.toml is read here, before anything is opened, and written with54+ // config/iz.toml is read here, before anything is opened, and written with
55 // development defaults if it is not there yet. A broken key stops the55 // development defaults if it is not there yet. A broken key stops the
56 // boot with its name in the message: the failure this prevents is not an56 // boot with its name in the message: the failure this prevents is not an
57- // empty database, it is a second İzlek writing a different file while57+ // empty database, it is a second İz writing a different file while
58 // everyone believes they share a board.58 // everyone believes they share a board.
59- let config = match izlek_core::Config::load() {59+ let config = match iz_core::Config::load() {
60 Ok(config) => config,60 Ok(config) => config,
61 Err(problem) => {61 Err(problem) => {
62- eprintln!("izlek: {problem}");62+ eprintln!("iz: {problem}");
63 std::process::exit(2);63 std::process::exit(2);
64 }64 }
65 };65 };
66 // Said once, so the answer to "which file are we on" lives in the log.66 // Said once, so the answer to "which file are we on" lives in the log.
67 for line in config.report() {67 for line in config.report() {
68- println!("izlek {line}");68+ println!("iz {line}");
69 }69 }
70 70
71 // The bundle beside the executable is the only stylesheet this process71 // The bundle beside the executable is the only stylesheet this process
@@ -77,17 +77,17 @@ async fn main() {
77 // checked against the bundle's bytes, and a foreign bundle refuses the77 // checked against the bundle's bytes, and a foreign bundle refuses the
78 // boot rather than serving under it.78 // boot rather than serving under it.
79 let bundle = AssetBundle::load().unwrap_or_else(|err| {79 let bundle = AssetBundle::load().unwrap_or_else(|err| {
80- eprintln!("izlek: the asset bundle beside the executable failed to load: {err}");80+ eprintln!("iz: the asset bundle beside the executable failed to load: {err}");
81 std::process::exit(2);81 std::process::exit(2);
82 });82 });
83- let stylesheet = match izlek_web::server::stylesheet_guard(&bundle) {83+ let stylesheet = match iz_web::server::stylesheet_guard(&bundle) {
84 Ok(line) => line,84 Ok(line) => line,
85 Err(problem) => {85 Err(problem) => {
86- eprintln!("izlek: {problem}");86+ eprintln!("iz: {problem}");
87 std::process::exit(2);87 std::process::exit(2);
88 }88 }
89 };89 };
90- println!("izlek {stylesheet}");90+ println!("iz {stylesheet}");
91 91
92 // Attachments and profile photos are files beside the database now, not92 // Attachments and profile photos are files beside the database now, not
93 // bytes in a table. The tree is made before the store opens, because the93 // bytes in a table. The tree is made before the store opens, because the
@@ -102,7 +102,7 @@ async fn main() {
102 let store = TursoStore::open(&config.database.to_string_lossy(), &config.storage)102 let store = TursoStore::open(&config.database.to_string_lossy(), &config.storage)
103 .await103 .await
104 .expect("failed to open the database");104 .expect("failed to open the database");
105- let store: Arc<dyn izlek_core::store::Store> = Arc::new(store);105+ let store: Arc<dyn iz_core::store::Store> = Arc::new(store);
106 // The address mail links carry when no admin has set one in Settings.106 // The address mail links carry when no admin has set one in Settings.
107 let accounts = Accounts::new(store.clone(), config.listen_url());107 let accounts = Accounts::new(store.clone(), config.listen_url());
108 108
@@ -110,40 +110,40 @@ async fn main() {
110 // an admin fills the panel in and the next sweep sends what was held. It110 // an admin fills the panel in and the next sweep sends what was held. It
111 // holds one connection pool, rebuilt only when the settings behind it111 // holds one connection pool, rebuilt only when the settings behind it
112 // change, and two things use it — every committed crossing, and the sweep.112 // change, and two things use it — every committed crossing, and the sweep.
113- let engine = Arc::new(izlek_core::MailEngine::new(113+ let engine = Arc::new(iz_core::MailEngine::new(
114 store.clone(),114 store.clone(),
115- Arc::new(izlek_web::smtp::WorkspaceSmtp::new(store.clone())),115+ Arc::new(iz_web::smtp::WorkspaceSmtp::new(store.clone())),
116 config.listen_url(),116 config.listen_url(),
117 ));117 ));
118 tokio::spawn(sweep(engine.clone(), store.clone()));118 tokio::spawn(sweep(engine.clone(), store.clone()));
119 119
120 // Told when the process is stopping, so the live streams end instead of120 // Told when the process is stopping, so the live streams end instead of
121- // being waited out. See `izlek_web::live::Shutdown`.121+ // being waited out. See `iz_web::live::Shutdown`.
122 let (stop, stopping) = tokio::sync::watch::channel(false);122 let (stop, stopping) = tokio::sync::watch::channel(false);
123 123
124 let router = Router::builder()124 let router = Router::builder()
125 .discover()125 .discover()
126 .layer(126 .layer(
127- BodyLimit::max(izlek_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)127+ BodyLimit::max(iz_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)
128 .at("/files"),128 .at("/files"),
129 )129 )
130 .layer(130 .layer(
131- BodyLimit::max(izlek_web::settings::WIDEST_PHOTO_MB as usize * 1024 * 1024)131+ BodyLimit::max(iz_web::settings::WIDEST_PHOTO_MB as usize * 1024 * 1024)
132 .at("/api/profile_photo"),132 .at("/api/profile_photo"),
133 )133 )
134 .cookies()134 .cookies()
135 .assets(bundle)135 .assets(bundle)
136 .app_context(accounts)136 .app_context(accounts)
137- .app_context(izlek_web::photo::PhotoStamps::default())137+ .app_context(iz_web::photo::PhotoStamps::default())
138- .app_context(izlek_web::live::LiveWindow(std::time::Duration::from_secs(138+ .app_context(iz_web::live::LiveWindow(std::time::Duration::from_secs(
139 config.live_seconds,139 config.live_seconds,
140 )))140 )))
141- .app_context(izlek_web::live::Shutdown(stopping))141+ .app_context(iz_web::live::Shutdown(stopping))
142- .app_context(izlek_web::server::Mail::sending(engine.clone()))142+ .app_context(iz_web::server::Mail::sending(engine.clone()))
143 .build();143 .build();
144 144
145 // `topcoat::start` binds HOST/PORT from the environment; the listen145 // `topcoat::start` binds HOST/PORT from the environment; the listen
146- // address is a config/izlek.toml decision, so the listener is bound146+ // address is a config/iz.toml decision, so the listener is bound
147 // explicitly against the same value the boot log just printed.147 // explicitly against the same value the boot log just printed.
148 let listener = tokio::net::TcpListener::bind(config.listen)148 let listener = tokio::net::TcpListener::bind(config.listen)
149 .await149 .await
@@ -170,7 +170,7 @@ async fn main() {
170 fn ensure_storage_tree(storage: &std::path::Path) {170 fn ensure_storage_tree(storage: &std::path::Path) {
171 let make = |dir: &std::path::Path| {171 let make = |dir: &std::path::Path| {
172 if let Err(err) = std::fs::create_dir_all(dir) {172 if let Err(err) = std::fs::create_dir_all(dir) {
173- eprintln!("izlek: could not create {}: {err}", dir.display());173+ eprintln!("iz: could not create {}: {err}", dir.display());
174 std::process::exit(2);174 std::process::exit(2);
175 }175 }
176 #[cfg(unix)]176 #[cfg(unix)]
@@ -178,7 +178,7 @@ fn ensure_storage_tree(storage: &std::path::Path) {
178 use std::os::unix::fs::PermissionsExt;178 use std::os::unix::fs::PermissionsExt;
179 if let Err(err) = std::fs::set_permissions(dir, std::fs::Permissions::from_mode(0o700))179 if let Err(err) = std::fs::set_permissions(dir, std::fs::Permissions::from_mode(0o700))
180 {180 {
181- eprintln!("izlek: could not restrict {}: {err}", dir.display());181+ eprintln!("iz: could not restrict {}: {err}", dir.display());
182 std::process::exit(2);182 std::process::exit(2);
183 }183 }
184 }184 }
@@ -224,8 +224,8 @@ async fn shutdown_signal() {
224 /// regardless, so a clock jump or a row written by something other than this224 /// regardless, so a clock jump or a row written by something other than this
225 /// process is picked up on its own.225 /// process is picked up on its own.
226 async fn sweep(226 async fn sweep(
227- engine: std::sync::Arc<izlek_core::MailEngine>,227+ engine: std::sync::Arc<iz_core::MailEngine>,
228- store: Arc<dyn izlek_core::store::Store>,228+ store: Arc<dyn iz_core::store::Store>,
229 ) {229 ) {
230 /// Enough that a morning's backlog clears in a few passes, few enough that230 /// Enough that a morning's backlog clears in a few passes, few enough that
231 /// one pass cannot sit on the mail server for minutes.231 /// one pass cannot sit on the mail server for minutes.
@@ -240,11 +240,11 @@ async fn sweep(
240 .await240 .await
241 {241 {
242 Ok(report) if report.sent + report.failed + report.abandoned > 0 => println!(242 Ok(report) if report.sent + report.failed + report.abandoned > 0 => println!(
243- "izlek mail sweep: {} sent, {} to retry, {} given up on",243+ "iz mail sweep: {} sent, {} to retry, {} given up on",
244 report.sent, report.failed, report.abandoned244 report.sent, report.failed, report.abandoned
245 ),245 ),
246 Ok(_) => {}246 Ok(_) => {}
247- Err(problem) => eprintln!("izlek mail sweep could not read the ledger: {problem}"),247+ Err(problem) => eprintln!("iz mail sweep could not read the ledger: {problem}"),
248 }248 }
249 249
250 // How long until the next mail is owed. A row already due means the250 // How long until the next mail is owed. A row already due means the
@@ -262,7 +262,7 @@ async fn sweep(
262 }262 }
263 Ok(None) => IDLE,263 Ok(None) => IDLE,
264 Err(problem) => {264 Err(problem) => {
265- eprintln!("izlek mail sweep could not read the ledger: {problem}");265+ eprintln!("iz mail sweep could not read the ledger: {problem}");
266 IDLE266 IDLE
267 }267 }
268 };268 };
@@ -289,12 +289,12 @@ async fn sweep(
289 /// when the channel is gone, which means the process is going with it.289 /// when the channel is gone, which means the process is going with it.
290 ///290 ///
291 /// Lagging means announcements were dropped — a reason to look, not to stop.291 /// Lagging means announcements were dropped — a reason to look, not to stop.
292-async fn queue_touched(rx: &mut tokio::sync::broadcast::Receiver<izlek_core::Change>) -> bool {292+async fn queue_touched(rx: &mut tokio::sync::broadcast::Receiver<iz_core::Change>) -> bool {
293 use tokio::sync::broadcast::error::RecvError;293 use tokio::sync::broadcast::error::RecvError;
294 loop {294 loop {
295 match rx.recv().await {295 match rx.recv().await {
296 Ok(change) => {296 Ok(change) => {
297- if change.topic == izlek_core::Topic::Queue {297+ if change.topic == iz_core::Topic::Queue {
298 return true;298 return true;
299 }299 }
300 }300 }
crates/izlek-web/src/pages.rs → crates/iz-web/src/pages.rsrenamed+6 -6
@@ -1,4 +1,4 @@
1-//! The account screens, ported from `izlek-web/src/pages.rs`'s FirstLogin1+//! The account screens, ported from `iz-web/src/pages.rs`'s FirstLogin
2 //! artboard: setting up the first account, an invited member picking a2 //! artboard: setting up the first account, an invited member picking a
3 //! password, and signing in.3 //! password, and signing in.
4 //!4 //!
@@ -8,7 +8,7 @@
8 //! whose query the page reads back (`refusal_of`), not by a client-side8 //! whose query the page reads back (`refusal_of`), not by a client-side
9 //! action value.9 //! action value.
10 10
11-use izlek_core::store::User;11+use iz_core::store::User;
12 use topcoat::Result;12 use topcoat::Result;
13 use topcoat::context::Cx;13 use topcoat::context::Cx;
14 use topcoat::router::{page, path_param};14 use topcoat::router::{page, path_param};
@@ -74,7 +74,7 @@ async fn topbar(cx: &Cx) -> Result {
74 }74 }
75 }75 }
76 76
77-/// "Set up İzlek" — the first account in an empty workspace.77+/// "Set up İz" — the first account in an empty workspace.
78 async fn setup_card(cx: &Cx) -> Result {78 async fn setup_card(cx: &Cx) -> Result {
79 let refusal = refusal_of(cx, "claim_workspace");79 let refusal = refusal_of(cx, "claim_workspace");
80 let lang = Lang::En;80 let lang = Lang::En;
@@ -117,7 +117,7 @@ async fn setup_card(cx: &Cx) -> Result {
117 type="password"117 type="password"
118 name="password"118 name="password"
119 autocomplete="new-password"119 autocomplete="new-password"
120- minlength=(izlek_core::auth::MIN_PASSWORD_CHARS.to_string())120+ minlength=(iz_core::auth::MIN_PASSWORD_CHARS.to_string())
121 required=""121 required=""
122 >122 >
123 </label>123 </label>
@@ -224,7 +224,7 @@ async fn join_card(cx: &Cx, token: &str, person: Invited) -> Result {
224 type="password"224 type="password"
225 name="password"225 name="password"
226 autocomplete="new-password"226 autocomplete="new-password"
227- minlength=(izlek_core::auth::MIN_PASSWORD_CHARS.to_string())227+ minlength=(iz_core::auth::MIN_PASSWORD_CHARS.to_string())
228 required=""228 required=""
229 >229 >
230 </label>230 </label>
@@ -350,7 +350,7 @@ async fn reset_card(cx: &Cx, token: &str, person: Invited) -> Result {
350 type="password"350 type="password"
351 name="password"351 name="password"
352 autocomplete="new-password"352 autocomplete="new-password"
353- minlength=(izlek_core::auth::MIN_PASSWORD_CHARS.to_string())353+ minlength=(iz_core::auth::MIN_PASSWORD_CHARS.to_string())
354 required=""354 required=""
355 >355 >
356 </label>356 </label>
crates/izlek-web/src/people.rs → crates/iz-web/src/people.rsrenamed+10 -10
@@ -11,8 +11,8 @@ use topcoat::router::error::not_found;
11 use topcoat::router::{page, path_param};11 use topcoat::router::{page, path_param};
12 use topcoat::view::view;12 use topcoat::view::view;
13 13
14-use izlek_core::detail::ActivityKind;14+use iz_core::detail::ActivityKind;
15-use izlek_core::store::{ActivityFilter, Dir, FeedPage};15+use iz_core::store::{ActivityFilter, Dir, FeedPage};
16 16
17 use crate::i18n::{Key, Lang, t};17 use crate::i18n::{Key, Lang, t};
18 use crate::server::{accounts, require_user};18 use crate::server::{accounts, require_user};
@@ -75,9 +75,9 @@ async fn people_page(cx: &Cx) -> Result {
75 return Err(not_found().into());75 return Err(not_found().into());
76 }76 }
77 77
78- let zone = izlek_core::detail::parse_zone(&user.timezone);78+ let zone = iz_core::detail::parse_zone(&user.timezone);
79 let mine = person.id == user.id;79 let mine = person.id == user.id;
80- let who = izlek_core::board::Person {80+ let who = iz_core::board::Person {
81 id: person.id.clone(),81 id: person.id.clone(),
82 display_name: person.display_name.clone(),82 display_name: person.display_name.clone(),
83 has_photo: person.has_photo,83 has_photo: person.has_photo,
@@ -86,13 +86,13 @@ async fn people_page(cx: &Cx) -> Result {
86 .owner()86 .owner()
87 .await?87 .await?
88 .is_some_and(|owner| owner.id == person.id);88 .is_some_and(|owner| owner.id == person.id);
89- let joined = izlek_core::board::day_label(person.created_at.to_offset(zone).date());89+ let joined = iz_core::board::day_label(person.created_at.to_offset(zone).date());
90 let seen = last_seen(90 let seen = last_seen(
91 lang,91 lang,
92 person.has_signed_in(),92 person.has_signed_in(),
93 person93 person
94 .last_signed_in_at94 .last_signed_in_at
95- .map(|at| izlek_core::board::day_label(at.to_offset(zone).date())),95+ .map(|at| iz_core::board::day_label(at.to_offset(zone).date())),
96 );96 );
97 // Who let them in, as a name that leads to that person's own page. The97 // Who let them in, as a name that leads to that person's own page. The
98 // first account was invited by nobody.98 // first account was invited by nobody.
@@ -101,9 +101,9 @@ async fn people_page(cx: &Cx) -> Result {
101 None => None,101 None => None,
102 };102 };
103 let role_key = match person.role {103 let role_key = match person.role {
104- izlek_core::Role::Admin => Key::RoleAdminOption,104+ iz_core::Role::Admin => Key::RoleAdminOption,
105- izlek_core::Role::Member => Key::RoleMemberOption,105+ iz_core::Role::Member => Key::RoleMemberOption,
106- izlek_core::Role::Viewer => Key::RoleViewerOption,106+ iz_core::Role::Viewer => Key::RoleViewerOption,
107 };107 };
108 let stats = store.user_stats(&person.id).await?;108 let stats = store.user_stats(&person.id).await?;
109 // A short list, not the feed: the newest few lines are enough to see what109 // A short list, not the feed: the newest few lines are enough to see what
@@ -207,7 +207,7 @@ async fn people_page(cx: &Cx) -> Result {
207 } else {207 } else {
208 <span class="person-title">(line.title.clone().unwrap_or_default())</span>208 <span class="person-title">(line.title.clone().unwrap_or_default())</span>
209 }209 }
210- <span class="person-day">(izlek_core::board::day_label(line.at.to_offset(zone).date()))</span>210+ <span class="person-day">(iz_core::board::day_label(line.at.to_offset(zone).date()))</span>
211 </li>211 </li>
212 }212 }
213 </ul>213 </ul>
crates/izlek-web/src/photo.rs → crates/iz-web/src/photo.rsrenamed+3 -3
@@ -10,7 +10,7 @@ use topcoat::router::content::multipart::Multipart;
10 use topcoat::router::request::headers as request_headers;10 use topcoat::router::request::headers as request_headers;
11 use topcoat::router::{HeaderMap, HeaderValue, StatusCode, header, path_param, route};11 use topcoat::router::{HeaderMap, HeaderValue, StatusCode, header, path_param, route};
12 12
13-use izlek_core::store::sniff::sniff;13+use iz_core::store::sniff::sniff;
14 use crate::server::{Refusal, accounts, require_user};14 use crate::server::{Refusal, accounts, require_user};
15 use crate::settings::saved_or_refused;15 use crate::settings::saved_or_refused;
16 16
@@ -80,7 +80,7 @@ async fn upload(
80 let _ = store80 let _ = store
81 .record_event(81 .record_event(
82 Some(&user.id),82 Some(&user.id),
83- &izlek_core::detail::ActivityKind::Other("photo_saved".to_string()),83+ &iz_core::detail::ActivityKind::Other("photo_saved".to_string()),
84 "",84 "",
85 OffsetDateTime::now_utc(),85 OffsetDateTime::now_utc(),
86 )86 )
@@ -105,7 +105,7 @@ async fn delete(cx: &Cx) -> topcoat::Result<(StatusCode, HeaderMap, Vec<u8>)> {
105 let _ = store105 let _ = store
106 .record_event(106 .record_event(
107 Some(&user.id),107 Some(&user.id),
108- &izlek_core::detail::ActivityKind::Other("photo_removed".to_string()),108+ &iz_core::detail::ActivityKind::Other("photo_removed".to_string()),
109 "",109 "",
110 OffsetDateTime::now_utc(),110 OffsetDateTime::now_utc(),
111 )111 )
crates/izlek-web/src/rules.rs → crates/iz-web/src/rules.rsrenamed+13 -13
@@ -1,4 +1,4 @@
1-//! Mail rules, ported from `izlek-web/src/rules.rs` onto topcoat's1+//! Mail rules, ported from `iz-web/src/rules.rs` onto topcoat's
2 //! server-rendered pages.2 //! server-rendered pages.
3 //!3 //!
4 //! The screen is the admin's, and so is every call behind it: a rule sends mail4 //! The screen is the admin's, and so is every call behind it: a rule sends mail
@@ -23,8 +23,8 @@ use topcoat::router::content::{Form, Json};
23 use topcoat::router::{HeaderName, StatusCode, header, page, query_params, route};23 use topcoat::router::{HeaderName, StatusCode, header, page, query_params, route};
24 use topcoat::view::view;24 use topcoat::view::view;
25 25
26-use izlek_core::board::Column;26+use iz_core::board::Column;
27-use izlek_core::store::{Audience, Store, Trigger, User, Workspace};27+use iz_core::store::{Audience, Store, Trigger, User, Workspace};
28 28
29 use crate::i18n::{Key, Lang, t};29 use crate::i18n::{Key, Lang, t};
30 use crate::server::{Refusal, accounts, back_to, refusal_of, require_admin};30 use crate::server::{Refusal, accounts, back_to, refusal_of, require_admin};
@@ -165,7 +165,7 @@ fn sender_connected(workspace: &Workspace) -> bool {
165 }165 }
166 166
167 /// Splits a trigger into the sentence halves the screen prints, ported167 /// Splits a trigger into the sentence halves the screen prints, ported
168-/// verbatim from `current_rules`'s match in `izlek-web/src/rules.rs`.168+/// verbatim from `current_rules`'s match in `iz-web/src/rules.rs`.
169 fn sentence_of(169 fn sentence_of(
170 trigger: &Trigger,170 trigger: &Trigger,
171 columns: &[Column],171 columns: &[Column],
@@ -272,7 +272,7 @@ async fn snapshot_of(
272 user: &User,272 user: &User,
273 ) -> std::result::Result<RulesSnapshot, Refusal> {273 ) -> std::result::Result<RulesSnapshot, Refusal> {
274 let lang = Lang::from_code(&user.language);274 let lang = Lang::from_code(&user.language);
275- let zone = izlek_core::detail::parse_zone(&user.timezone);275+ let zone = iz_core::detail::parse_zone(&user.timezone);
276 let Some(board) = store276 let Some(board) = store
277 .board(&user.workspace_id)277 .board(&user.workspace_id)
278 .await278 .await
@@ -320,11 +320,11 @@ async fn snapshot_of(
320 last_sent: last_sent320 last_sent: last_sent
321 .iter()321 .iter()
322 .find(|(id, _)| id == &rule.id)322 .find(|(id, _)| id == &rule.id)
323- .map(|(_, at)| izlek_core::detail::moment_label_in(*at, zone)),323+ .map(|(_, at)| iz_core::detail::moment_label_in(*at, zone)),
324 last_fired: last_decision324 last_fired: last_decision
325 .iter()325 .iter()
326 .find(|(id, _)| id == &rule.id)326 .find(|(id, _)| id == &rule.id)
327- .map(|(_, at)| izlek_core::detail::moment_label_in(*at, zone)),327+ .map(|(_, at)| iz_core::detail::moment_label_in(*at, zone)),
328 id: rule.id,328 id: rule.id,
329 }329 }
330 })330 })
@@ -352,7 +352,7 @@ async fn snapshot_of(
352 async fn rule_of_this_workspace(352 async fn rule_of_this_workspace(
353 cx: &Cx,353 cx: &Cx,
354 rule_id: &str,354 rule_id: &str,
355-) -> std::result::Result<(Arc<dyn Store>, User, izlek_core::store::MailRule), Refusal> {355+) -> std::result::Result<(Arc<dyn Store>, User, iz_core::store::MailRule), Refusal> {
356 let user = require_admin(cx).await?;356 let user = require_admin(cx).await?;
357 let store = accounts(cx).store().clone();357 let store = accounts(cx).store().clone();
358 let board = store358 let board = store
@@ -470,7 +470,7 @@ async fn create_rule(cx: &Cx, Form(input): Form<CreateRuleForm>) -> Redirect {
470 let _ = store470 let _ = store
471 .record_event(471 .record_event(
472 Some(&user.id),472 Some(&user.id),
473- &izlek_core::detail::ActivityKind::RuleCreated,473+ &iz_core::detail::ActivityKind::RuleCreated,
474 &subject,474 &subject,
475 time::OffsetDateTime::now_utc(),475 time::OffsetDateTime::now_utc(),
476 )476 )
@@ -557,7 +557,7 @@ async fn update_rule(cx: &Cx, Form(input): Form<UpdateRuleForm>) -> Redirect {
557 let _ = store557 let _ = store
558 .record_event(558 .record_event(
559 Some(&user.id),559 Some(&user.id),
560- &izlek_core::detail::ActivityKind::RuleEdited,560+ &iz_core::detail::ActivityKind::RuleEdited,
561 &subject,561 &subject,
562 time::OffsetDateTime::now_utc(),562 time::OffsetDateTime::now_utc(),
563 )563 )
@@ -589,7 +589,7 @@ async fn set_rule_enabled(cx: &Cx, Form(input): Form<SetRuleEnabledForm>) -> Red
589 let _ = store589 let _ = store
590 .record_event(590 .record_event(
591 Some(&user.id),591 Some(&user.id),
592- &izlek_core::detail::ActivityKind::RuleToggled,592+ &iz_core::detail::ActivityKind::RuleToggled,
593 &rule.subject,593 &rule.subject,
594 time::OffsetDateTime::now_utc(),594 time::OffsetDateTime::now_utc(),
595 )595 )
@@ -616,7 +616,7 @@ async fn delete_rule(cx: &Cx, Form(input): Form<DeleteRuleForm>) -> Redirect {
616 let _ = store616 let _ = store
617 .record_event(617 .record_event(
618 Some(&user.id),618 Some(&user.id),
619- &izlek_core::detail::ActivityKind::RuleDeleted,619+ &iz_core::detail::ActivityKind::RuleDeleted,
620 &rule.subject,620 &rule.subject,
621 time::OffsetDateTime::now_utc(),621 time::OffsetDateTime::now_utc(),
622 )622 )
@@ -636,7 +636,7 @@ struct RulesQuery {
636 /// `existing` is `None` for a fresh rule and `Some` to edit one in place. The636 /// `existing` is `None` for a fresh rule and `Some` to edit one in place. The
637 /// column select only shows for the status trigger; every other trigger637 /// column select only shows for the status trigger; every other trigger
638 /// carries `column_id` as a hidden field instead, the same trick638 /// carries `column_id` as a hidden field instead, the same trick
639-/// `izlek-web/src/rules.rs` used to hide it live — here it is decided once,639+/// `iz-web/src/rules.rs` used to hide it live — here it is decided once,
640 /// server-side, from whichever trigger the form starts on (the existing640 /// server-side, from whichever trigger the form starts on (the existing
641 /// rule's, or "status" for a fresh one), since there is no script to flip it641 /// rule's, or "status" for a fresh one), since there is no script to flip it
642 /// as the admin changes the select.642 /// as the admin changes the select.
crates/izlek-web/src/server.rs → crates/iz-web/src/server.rsrenamed+37 -37
@@ -4,14 +4,14 @@
4 //! Every guard here is the real one. The UI hides what a role may not do, but4 //! Every guard here is the real one. The UI hides what a role may not do, but
5 //! the answer that matters is the one given in this module, on the server.5 //! the answer that matters is the one given in this module, on the server.
6 //!6 //!
7-//! Ported from `izlek-web/src/server.rs` and the `Refusal`/`call_id` pieces of7+//! Ported from `iz-web/src/server.rs` and the `Refusal`/`call_id` pieces of
8-//! `izlek-web/src/auth.rs`, onto topcoat's context/cookie/layer primitives.8+//! `iz-web/src/auth.rs`, onto topcoat's context/cookie/layer primitives.
9-9+
10-use izlek_core::accounts::{AccountError, Accounts};10+use iz_core::accounts::{AccountError, Accounts};
11-use izlek_core::auth::PasswordProblem;11+use iz_core::auth::PasswordProblem;
12-use izlek_core::board::Transition;12+use iz_core::board::Transition;
13-use izlek_core::mail::Engine;13+use iz_core::mail::Engine;
14-use izlek_core::store::{Freeing, User};14+use iz_core::store::{Freeing, User};
15 use serde::{Deserialize, Serialize};15 use serde::{Deserialize, Serialize};
16 use sha2::Digest;16 use sha2::Digest;
17 use topcoat::asset::AssetBundle;17 use topcoat::asset::AssetBundle;
@@ -21,7 +21,7 @@ use topcoat::router::request::headers;
21 use topcoat::router::{Body, HeaderValue, Next, StatusCode, header, response::Response, to_bytes};21 use topcoat::router::{Body, HeaderValue, Next, StatusCode, header, response::Response, to_bytes};
22 22
23 /// The session cookie's name. One cookie, one browser, one session row.23 /// The session cookie's name. One cookie, one browser, one session row.
24-pub const SESSION_COOKIE: &str = "izlek_session";24+pub const SESSION_COOKIE: &str = "iz_session";
25 25
26 /// The workspace's account service, put into context by the router.26 /// The workspace's account service, put into context by the router.
27 pub fn accounts(cx: &Cx) -> Accounts {27 pub fn accounts(cx: &Cx) -> Accounts {
@@ -91,7 +91,7 @@ impl Mail {
91 /// engine has no public handle back to it, so the caller carries it.91 /// engine has no public handle back to it, so the caller carries it.
92 pub fn after_activity(92 pub fn after_activity(
93 &self,93 &self,
94- store: std::sync::Arc<dyn izlek_core::store::Store>,94+ store: std::sync::Arc<dyn iz_core::store::Store>,
95 activity_id: String,95 activity_id: String,
96 ) {96 ) {
97 let Some(engine) = self.0.clone() else {97 let Some(engine) = self.0.clone() else {
@@ -100,7 +100,7 @@ impl Mail {
100 tokio::spawn(async move {100 tokio::spawn(async move {
101 let ev = store.event(&activity_id).await;101 let ev = store.event(&activity_id).await;
102 let report = match ev {102 let report = match ev {
103- Ok(Some(izlek_core::store::Event::Happened(ev))) => {103+ Ok(Some(iz_core::store::Event::Happened(ev))) => {
104 eprintln!("AFTER_ACTIVITY happened kind={:?}", ev.kind);104 eprintln!("AFTER_ACTIVITY happened kind={:?}", ev.kind);
105 match engine.on_activity(&ev).await {105 match engine.on_activity(&ev).await {
106 Ok(_) => {106 Ok(_) => {
@@ -136,27 +136,27 @@ impl Mail {
136 /// Sends one test mail and waits for the answer, because the answer is the136 /// Sends one test mail and waits for the answer, because the answer is the
137 /// whole point of pressing the button. `None` means this process has no137 /// whole point of pressing the button. `None` means this process has no
138 /// engine at all, which happens only in tests.138 /// engine at all, which happens only in tests.
139- pub async fn test(&self, to: &str) -> Option<Result<time::Duration, izlek_core::MailError>> {139+ pub async fn test(&self, to: &str) -> Option<Result<time::Duration, iz_core::MailError>> {
140 let engine = self.0.clone()?;140 let engine = self.0.clone()?;
141 Some(engine.send_test(to).await)141 Some(engine.send_test(to).await)
142 }142 }
143 143
144 /// Asks the mail server whether it would have us, sending nothing.144 /// Asks the mail server whether it would have us, sending nothing.
145- pub async fn check(&self) -> Option<Result<time::Duration, izlek_core::MailError>> {145+ pub async fn check(&self) -> Option<Result<time::Duration, iz_core::MailError>> {
146 let engine = self.0.clone()?;146 let engine = self.0.clone()?;
147 Some(engine.check_sender().await)147 Some(engine.check_sender().await)
148 }148 }
149 149
150- fn log(report: izlek_core::store::Result<izlek_core::mail::Report>) {150+ fn log(report: iz_core::store::Result<iz_core::mail::Report>) {
151 match report {151 match report {
152 Ok(report) if report.sent + report.failed + report.abandoned > 0 => {152 Ok(report) if report.sent + report.failed + report.abandoned > 0 => {
153 println!(153 println!(
154- "izlek mail {} sent, {} to retry, {} given up on",154+ "iz mail {} sent, {} to retry, {} given up on",
155 report.sent, report.failed, report.abandoned155 report.sent, report.failed, report.abandoned
156 );156 );
157 }157 }
158 Ok(_) => {}158 Ok(_) => {}
159- Err(problem) => eprintln!("izlek mail the ledger could not be read: {problem}"),159+ Err(problem) => eprintln!("iz mail the ledger could not be read: {problem}"),
160 }160 }
161 }161 }
162 }162 }
@@ -169,7 +169,7 @@ pub fn mail(cx: &Cx) -> Mail {
169 .unwrap_or_else(Mail::silent)169 .unwrap_or_else(Mail::silent)
170 }170 }
171 171
172-/// The application cookie jar, with the attributes every İzlek cookie wants.172+/// The application cookie jar, with the attributes every İz cookie wants.
173 fn app_cookies(cx: &Cx) -> impl Cookies {173 fn app_cookies(cx: &Cx) -> impl Cookies {
174 cookies(cx)174 cookies(cx)
175 .default_secure(true)175 .default_secure(true)
@@ -186,14 +186,14 @@ pub fn presented_session(cx: &Cx) -> Option<String> {
186 }186 }
187 187
188 /// Any other cookie the request presented, by name — the client-set,188 /// Any other cookie the request presented, by name — the client-set,
189-/// non-`HttpOnly` ones (e.g. `izlek_rows_<section>`) that JS reads and189+/// non-`HttpOnly` ones (e.g. `iz_rows_<section>`) that JS reads and
190 /// writes on its own.190 /// writes on its own.
191 pub fn presented_cookie(cx: &Cx, name: &str) -> Option<String> {191 pub fn presented_cookie(cx: &Cx, name: &str) -> Option<String> {
192 cookies(cx).get(name).map(|c| c.value().to_string())192 cookies(cx).get(name).map(|c| c.value().to_string())
193 }193 }
194 194
195 /// A stable-enough label for the client, for rate limiting. A proxy header is195 /// A stable-enough label for the client, for rate limiting. A proxy header is
196-/// only trusted because İzlek is meant to sit behind one; the address bucket is196+/// only trusted because İz is meant to sit behind one; the address bucket is
197 /// the limit that actually protects the Argon2 work either way.197 /// the limit that actually protects the Argon2 work either way.
198 ///198 ///
199 /// topcoat 0.6.2 exposes no peer address; x-forwarded-for or nothing.199 /// topcoat 0.6.2 exposes no peer address; x-forwarded-for or nothing.
@@ -225,7 +225,7 @@ pub fn client_label(cx: &Cx) -> String {
225 /// Returns the startup log line naming the served fingerprint, or the225 /// Returns the startup log line naming the served fingerprint, or the
226 /// reason the boot must not proceed.226 /// reason the boot must not proceed.
227 pub fn stylesheet_guard(bundle: &AssetBundle) -> Result<String, String> {227 pub fn stylesheet_guard(bundle: &AssetBundle) -> Result<String, String> {
228- let expected = env!("IZLEK_STYLE_FINGERPRINT");228+ let expected = env!("IZ_STYLE_FINGERPRINT");
229 let stylesheet = bundle229 let stylesheet = bundle
230 .catalog()230 .catalog()
231 .assets()231 .assets()
@@ -357,7 +357,7 @@ impl From<AccountError> for Refusal {
357 357
358 /// Everything a refused call is allowed to say.358 /// Everything a refused call is allowed to say.
359 ///359 ///
360-/// Ported from `izlek-web/src/auth.rs`; the auth pages that construct most of360+/// Ported from `iz-web/src/auth.rs`; the auth pages that construct most of
361 /// these variants land in a later slice, but the server plumbing above needs361 /// these variants land in a later slice, but the server plumbing above needs
362 /// the type now.362 /// the type now.
363 #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]363 #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
@@ -447,7 +447,7 @@ pub enum Refusal {
447 }447 }
448 448
449 impl Refusal {449 impl Refusal {
450- /// The refusal in words, ported verbatim from `izlek-web/src/auth.rs`.450+ /// The refusal in words, ported verbatim from `iz-web/src/auth.rs`.
451 pub fn message(&self) -> String {451 pub fn message(&self) -> String {
452 match self {452 match self {
453 Refusal::Rejected => "That did not work.".to_string(),453 Refusal::Rejected => "That did not work.".to_string(),
@@ -749,7 +749,7 @@ pub fn back_to(cx: &Cx, nowhere: &str) -> String {
749 /// function handler answers with a redirect back to the page it came from, and749 /// function handler answers with a redirect back to the page it came from, and
750 /// the value — the whole refusal — sits in a body nobody will ever look at.750 /// the value — the whole refusal — sits in a body nobody will ever look at.
751 /// The click then looks like nothing happening, which is the worst answer751 /// The click then looks like nothing happening, which is the worst answer
752-/// İzlek can give.752+/// İz can give.
753 ///753 ///
754 /// So the refusal is copied onto the `Location`, as `?refusal=<code>&on=<call>`,754 /// So the refusal is copied onto the `Location`, as `?refusal=<code>&on=<call>`,
755 /// and the page renders it from the query. This is one place rather than755 /// and the page renders it from the query. This is one place rather than
@@ -827,7 +827,7 @@ fn carrying(location: &str, code: &str, called: &str) -> Option<String> {
827 }827 }
828 // The Location we are rewriting came from the form post's Referer, and on a828 // The Location we are rewriting came from the form post's Referer, and on a
829 // cross-origin post the Referer is whatever the other site is. Sending the829 // cross-origin post the Referer is whatever the other site is. Sending the
830- // browser back there would make İzlek an open redirect, so the address is830+ // browser back there would make İz an open redirect, so the address is
831 // rebuilt from its path and query alone and anything that is not a plain831 // rebuilt from its path and query alone and anything that is not a plain
832 // absolute path is answered with the board.832 // absolute path is answered with the board.
833 let here = same_origin(location);833 let here = same_origin(location);
@@ -903,7 +903,7 @@ mod refusal_redirect_tests {
903 #[test]903 #[test]
904 fn a_bare_address_gains_a_query() {904 fn a_bare_address_gains_a_query() {
905 assert_eq!(905 assert_eq!(
906- carrying("http://izlek.sh/", "cycle", "link_tasks").as_deref(),906+ carrying("http://iz.sh/", "cycle", "link_tasks").as_deref(),
907 Some("/?refusal=cycle&on=link_tasks")907 Some("/?refusal=cycle&on=link_tasks")
908 );908 );
909 }909 }
@@ -911,7 +911,7 @@ mod refusal_redirect_tests {
911 #[test]911 #[test]
912 fn an_open_modal_stays_open() {912 fn an_open_modal_stays_open() {
913 assert_eq!(913 assert_eq!(
914- carrying("http://izlek.sh/?task=DZ-01", "cycle", "link_tasks").as_deref(),914+ carrying("http://iz.sh/?task=DZ-01", "cycle", "link_tasks").as_deref(),
915 Some("/?task=DZ-01&refusal=cycle&on=link_tasks")915 Some("/?task=DZ-01&refusal=cycle&on=link_tasks")
916 );916 );
917 }917 }
@@ -920,7 +920,7 @@ mod refusal_redirect_tests {
920 fn a_second_refusal_replaces_the_first() {920 fn a_second_refusal_replaces_the_first() {
921 assert_eq!(921 assert_eq!(
922 carrying(922 carrying(
923- "http://izlek.sh/?task=DZ-01&refusal=cycle&on=link_tasks",923+ "http://iz.sh/?task=DZ-01&refusal=cycle&on=link_tasks",
924 "not-found",924 "not-found",
925 "link_tasks"925 "link_tasks"
926 )926 )
@@ -930,7 +930,7 @@ mod refusal_redirect_tests {
930 }930 }
931 931
932 // The Referer of a cross-origin post is the other site's address, and it932 // The Referer of a cross-origin post is the other site's address, and it
933- // reaches this function as the Location. İzlek answers on its own ground or933+ // reaches this function as the Location. İz answers on its own ground or
934 // not at all.934 // not at all.
935 #[test]935 #[test]
936 fn another_site_cannot_be_redirected_to() {936 fn another_site_cannot_be_redirected_to() {
@@ -949,7 +949,7 @@ mod refusal_redirect_tests {
949 }949 }
950 // An address with a path keeps the path — it is read as a path on this950 // An address with a path keeps the path — it is read as a path on this
951 // site, which is the point: whatever the Referer claimed, the browser951 // site, which is the point: whatever the Referer claimed, the browser
952- // is sent somewhere on İzlek.952+ // is sent somewhere on İz.
953 let carried = carrying(953 let carried = carrying(
954 "http://elsewhere.example/steal?task=DZ-01",954 "http://elsewhere.example/steal?task=DZ-01",
955 "cycle",955 "cycle",
@@ -971,14 +971,14 @@ mod refusal_redirect_tests {
971 971
972 #[test]972 #[test]
973 fn a_call_with_no_name_carries_nothing() {973 fn a_call_with_no_name_carries_nothing() {
974- assert_eq!(carrying("http://izlek.sh/", "cycle", ""), None);974+ assert_eq!(carrying("http://iz.sh/", "cycle", ""), None);
975 }975 }
976 }976 }
977 977
978 #[cfg(test)]978 #[cfg(test)]
979 mod refusal_message_tests {979 mod refusal_message_tests {
980 use super::Refusal;980 use super::Refusal;
981- use izlek_core::auth::PasswordProblem;981+ use iz_core::auth::PasswordProblem;
982 982
983 #[test]983 #[test]
984 fn every_refusal_survives_the_address_bar() {984 fn every_refusal_survives_the_address_bar() {
@@ -1106,11 +1106,11 @@ mod session_cookie_tests {
1106 }1106 }
1107 1107
1108 /// The cookie name is a wire contract: every existing browser's `Cookie`1108 /// The cookie name is a wire contract: every existing browser's `Cookie`
1109- /// header still says "izlek_session", and it must stay byte-identical or1109+ /// header still says "iz_session", and it must stay byte-identical or
1110 /// every one of them is signed out at once.1110 /// every one of them is signed out at once.
1111 #[test]1111 #[test]
1112 fn the_cookie_name_stayed_byte_identical() {1112 fn the_cookie_name_stayed_byte_identical() {
1113- assert_eq!(SESSION_COOKIE, "izlek_session");1113+ assert_eq!(SESSION_COOKIE, "iz_session");
1114 }1114 }
1115 1115
1116 #[test]1116 #[test]
@@ -1120,7 +1120,7 @@ mod session_cookie_tests {
1120 1120
1121 let set = set_cookie_headers(&cx);1121 let set = set_cookie_headers(&cx);
1122 assert_eq!(set.len(), 1);1122 assert_eq!(set.len(), 1);
1123- assert!(set[0].starts_with("izlek_session=tok123;"), "{}", set[0]);1123+ assert!(set[0].starts_with("iz_session=tok123;"), "{}", set[0]);
1124 for attr in [1124 for attr in [
1125 "Path=/",1125 "Path=/",
1126 "Secure",1126 "Secure",
@@ -1134,7 +1134,7 @@ mod session_cookie_tests {
1134 1134
1135 #[test]1135 #[test]
1136 fn presented_session_reads_the_cookie_the_browser_sent() {1136 fn presented_session_reads_the_cookie_the_browser_sent() {
1137- let cx = cx_with(Some("izlek_session=tok123"));1137+ let cx = cx_with(Some("iz_session=tok123"));
1138 assert_eq!(presented_session(&cx).as_deref(), Some("tok123"));1138 assert_eq!(presented_session(&cx).as_deref(), Some("tok123"));
1139 }1139 }
1140 1140
@@ -1146,12 +1146,12 @@ mod session_cookie_tests {
1146 1146
1147 #[test]1147 #[test]
1148 fn clearing_expires_the_cookie_at_the_same_path() {1148 fn clearing_expires_the_cookie_at_the_same_path() {
1149- let cx = cx_with(Some("izlek_session=tok123"));1149+ let cx = cx_with(Some("iz_session=tok123"));
1150 clear_session_cookie(&cx);1150 clear_session_cookie(&cx);
1151 1151
1152 let set = set_cookie_headers(&cx);1152 let set = set_cookie_headers(&cx);
1153 assert_eq!(set.len(), 1);1153 assert_eq!(set.len(), 1);
1154- assert!(set[0].starts_with("izlek_session="), "{}", set[0]);1154+ assert!(set[0].starts_with("iz_session="), "{}", set[0]);
1155 assert!(set[0].contains("Max-Age=0"), "{}", set[0]);1155 assert!(set[0].contains("Max-Age=0"), "{}", set[0]);
1156 assert!(set[0].contains("Path=/"), "{}", set[0]);1156 assert!(set[0].contains("Path=/"), "{}", set[0]);
1157 }1157 }
crates/izlek-web/src/settings.rs → crates/iz-web/src/settings.rsrenamed+25 -25
@@ -14,7 +14,7 @@
14 //! upload already does: appended to the redirect's query, in the same14 //! upload already does: appended to the redirect's query, in the same
15 //! `?refusal=<code>&on=<call>` shape `Refusal::code` was built for.15 //! `?refusal=<code>&on=<call>` shape `Refusal::code` was built for.
16 //!16 //!
17-//! `resend_link` differs from `izlek-web`'s in one respect: there it answered17+//! `resend_link` differs from `iz-web`'s in one respect: there it answered
18 //! a hydrated `ActionForm` with the mailed address directly. There is no18 //! a hydrated `ActionForm` with the mailed address directly. There is no
19 //! hydration here, so it redirects instead, carrying the address on the19 //! hydration here, so it redirects instead, carrying the address on the
20 //! query the same way a refusal does.20 //! query the same way a refusal does.
@@ -25,9 +25,9 @@ use topcoat::router::content::Form;
25 use topcoat::router::{HeaderMap, HeaderValue, StatusCode, header, page, route};25 use topcoat::router::{HeaderMap, HeaderValue, StatusCode, header, page, route};
26 use topcoat::view::view;26 use topcoat::view::view;
27 27
28-use izlek_core::auth::PasswordProblem;28+use iz_core::auth::PasswordProblem;
29-use izlek_core::detail::ActivityKind;29+use iz_core::detail::ActivityKind;
30-use izlek_core::store::{NewSender, SenderCheck, SenderTest, Store, User};30+use iz_core::store::{NewSender, SenderCheck, SenderTest, Store, User};
31 31
32 use crate::i18n::{Key, Lang, t};32 use crate::i18n::{Key, Lang, t};
33 use crate::server::{Refusal, accounts, mail, require_admin, require_user};33 use crate::server::{Refusal, accounts, mail, require_admin, require_user};
@@ -36,7 +36,7 @@ use crate::server::{Refusal, accounts, mail, require_admin, require_user};
36 /// the disk has to keep, and a limit typed with one extra zero is a mistake36 /// the disk has to keep, and a limit typed with one extra zero is a mistake
37 /// nobody notices until the disk is full.37 /// nobody notices until the disk is full.
38 ///38 ///
39-/// `izlek-topcoat::files` carries its own copy until that lane imports this39+/// `iz-topcoat::files` carries its own copy until that lane imports this
40 /// one (per the settings lane's note there).40 /// one (per the settings lane's note there).
41 pub const WIDEST_ATTACHMENT_MB: u64 = 500;41 pub const WIDEST_ATTACHMENT_MB: u64 = 500;
42 pub const WIDEST_PHOTO_MB: u64 = 20;42 pub const WIDEST_PHOTO_MB: u64 = 20;
@@ -402,7 +402,7 @@ async fn save_sender(
402 let from_name = input.from_name.trim().to_string();402 let from_name = input.from_name.trim().to_string();
403 let from_address = input.from_address.trim().to_string();403 let from_address = input.from_address.trim().to_string();
404 // Trailing slashes go: every link built from this appends its own path,404 // Trailing slashes go: every link built from this appends its own path,
405- // and `https://izlek.sh//?task=X` is a link that works by luck.405+ // and `https://iz.sh//?task=X` is a link that works by luck.
406 let public_url = input.public_url.trim().trim_end_matches('/').to_string();406 let public_url = input.public_url.trim().trim_end_matches('/').to_string();
407 // Not typed is not the same as blanked. Nothing here can clear a stored407 // Not typed is not the same as blanked. Nothing here can clear a stored
408 // password; replacing it means typing a new one.408 // password; replacing it means typing a new one.
@@ -498,7 +498,7 @@ async fn save_sender(
498 /// went so the answer survives a reload.498 /// went so the answer survives a reload.
499 ///499 ///
500 /// It goes to their own address and nowhere else. A test that could be500 /// It goes to their own address and nowhere else. A test that could be
501-/// pointed at an address somebody typed would be a way to make İzlek mail a501+/// pointed at an address somebody typed would be a way to make İz mail a
502 /// stranger on demand, which is a thing worth not building.502 /// stranger on demand, which is a thing worth not building.
503 /// How long to wait for a mail server before writing the attempt off.503 /// How long to wait for a mail server before writing the attempt off.
504 ///504 ///
@@ -529,7 +529,7 @@ fn probe_sender(
529 let dialled = tokio::time::timeout(PROBE_TIMEOUT, engine.check()).await;529 let dialled = tokio::time::timeout(PROBE_TIMEOUT, engine.check()).await;
530 let outcome = match dialled {530 let outcome = match dialled {
531 Ok(outcome) => outcome,531 Ok(outcome) => outcome,
532- Err(_) => Some(Err(izlek_core::MailError::retryable(532+ Err(_) => Some(Err(iz_core::MailError::retryable(
533 "the mail server did not answer",533 "the mail server did not answer",
534 ))),534 ))),
535 };535 };
@@ -769,7 +769,7 @@ async fn save_profile(
769 .await;769 .await;
770 None770 None
771 }771 }
772- Err(izlek_core::store::StoreError::Conflict("account")) => Some(Refusal::AddressTaken),772+ Err(iz_core::store::StoreError::Conflict("account")) => Some(Refusal::AddressTaken),
773 Err(problem) => {773 Err(problem) => {
774 eprintln!("store error: {problem}");774 eprintln!("store error: {problem}");
775 Some(Refusal::Unavailable)775 Some(Refusal::Unavailable)
@@ -822,7 +822,7 @@ async fn resend_link(
822 #[derive(serde::Deserialize)]822 #[derive(serde::Deserialize)]
823 struct SetRoleForm {823 struct SetRoleForm {
824 user_id: String,824 user_id: String,
825- role: izlek_core::Role,825+ role: iz_core::Role,
826 }826 }
827 827
828 /// Changes a member's role. Admin-only; the owner's row and the caller's own828 /// Changes a member's role. Admin-only; the owner's row and the caller's own
@@ -925,7 +925,7 @@ struct Member {
925 display_name: String,925 display_name: String,
926 has_photo: bool,926 has_photo: bool,
927 email: String,927 email: String,
928- role: izlek_core::Role,928+ role: iz_core::Role,
929 has_password: bool,929 has_password: bool,
930 /// The day they last signed in, as the list writes it, or nothing.930 /// The day they last signed in, as the list writes it, or nothing.
931 last_signed_in: Option<String>,931 last_signed_in: Option<String>,
@@ -939,14 +939,14 @@ async fn members_now(cx: &Cx, asking: &User) -> Result<Vec<Member>> {
939 let store = accounts(cx).store().clone();939 let store = accounts(cx).store().clone();
940 let owner = store.owner().await?.map(|owner| owner.id);940 let owner = store.owner().await?.map(|owner| owner.id);
941 let users = store.users(&asking.workspace_id).await?;941 let users = store.users(&asking.workspace_id).await?;
942- let zone = izlek_core::detail::parse_zone(&asking.timezone);942+ let zone = iz_core::detail::parse_zone(&asking.timezone);
943 Ok(users943 Ok(users
944 .into_iter()944 .into_iter()
945 .map(|user| Member {945 .map(|user| Member {
946 has_password: user.password_hash.is_some(),946 has_password: user.password_hash.is_some(),
947 last_signed_in: user947 last_signed_in: user
948 .last_signed_in_at948 .last_signed_in_at
949- .map(|at| izlek_core::board::day_label(at.to_offset(zone).date())),949+ .map(|at| iz_core::board::day_label(at.to_offset(zone).date())),
950 is_you: user.id == asking.id,950 is_you: user.id == asking.id,
951 is_owner: owner.as_deref() == Some(user.id.as_str()),951 is_owner: owner.as_deref() == Some(user.id.as_str()),
952 id: user.id,952 id: user.id,
@@ -1074,12 +1074,12 @@ async fn sender_now(cx: &Cx, zone: time::UtcOffset) -> Result<Sender> {
1074 from_address: workspace.smtp_from_address.unwrap_or_default(),1074 from_address: workspace.smtp_from_address.unwrap_or_default(),
1075 password_set: workspace.smtp_password_set,1075 password_set: workspace.smtp_password_set,
1076 test: workspace.sender_test.map(|test| TestResult {1076 test: workspace.sender_test.map(|test| TestResult {
1077- moment: izlek_core::detail::moment_label_in(test.at, zone),1077+ moment: iz_core::detail::moment_label_in(test.at, zone),
1078 took: test.error.is_none().then(|| took_label(test.took_ms)),1078 took: test.error.is_none().then(|| took_label(test.took_ms)),
1079 error: test.error,1079 error: test.error,
1080 }),1080 }),
1081 check: workspace.sender_check.map(|check| CheckResult {1081 check: workspace.sender_check.map(|check| CheckResult {
1082- moment: izlek_core::detail::moment_label_in(check.at, zone),1082+ moment: iz_core::detail::moment_label_in(check.at, zone),
1083 error: check.error,1083 error: check.error,
1084 }),1084 }),
1085 public_url: workspace.public_url.unwrap_or_default(),1085 public_url: workspace.public_url.unwrap_or_default(),
@@ -1089,7 +1089,7 @@ async fn sender_now(cx: &Cx, zone: time::UtcOffset) -> Result<Sender> {
1089 1089
1090 /// Whether a typed address is an origin a link can be built on: an http or1090 /// Whether a typed address is an origin a link can be built on: an http or
1091 /// https scheme, a host after it, and no whitespace anywhere. A path is1091 /// https scheme, a host after it, and no whitespace anywhere. A path is
1092-/// allowed — İzlek behind `example.com/izlek` is a real deployment — but a1092+/// allowed — İz behind `example.com/iz` is a real deployment — but a
1093 /// bare host or a mail address is not.1093 /// bare host or a mail address is not.
1094 fn is_origin(value: &str) -> bool {1094 fn is_origin(value: &str) -> bool {
1095 let Some(rest) = value1095 let Some(rest) = value
@@ -1210,7 +1210,7 @@ async fn settings_page(cx: &Cx) -> Result {
1210 _ => Section::Profile,1210 _ => Section::Profile,
1211 };1211 };
1212 1212
1213- let zone = izlek_core::detail::parse_zone(&user.timezone);1213+ let zone = iz_core::detail::parse_zone(&user.timezone);
1214 // What a link falls back to when the field is empty — the placeholder1214 // What a link falls back to when the field is empty — the placeholder
1215 // shows it rather than an invented example.1215 // shows it rather than an invented example.
1216 let configured_url = accounts(cx).fallback_url().to_string();1216 let configured_url = accounts(cx).fallback_url().to_string();
@@ -1274,7 +1274,7 @@ async fn settings_page(cx: &Cx) -> Result {
1274 <form method="post" action="/api/save_profile" class="panel-body">1274 <form method="post" action="/api/save_profile" class="panel-body">
1275 <div class="identity-row">1275 <div class="identity-row">
1276 <label class="avatar-upload">1276 <label class="avatar-upload">
1277- (crate::layout::avatar(cx, &izlek_core::board::Person {1277+ (crate::layout::avatar(cx, &iz_core::board::Person {
1278 id: user.id.clone(),1278 id: user.id.clone(),
1279 display_name: user.display_name.clone(),1279 display_name: user.display_name.clone(),
1280 has_photo: user.has_photo,1280 has_photo: user.has_photo,
@@ -1360,7 +1360,7 @@ async fn settings_page(cx: &Cx) -> Result {
1360 </label>1360 </label>
1361 <label class="field">1361 <label class="field">
1362 <span class="field-label">(t(lang, Key::NewPasswordLabel))</span>1362 <span class="field-label">(t(lang, Key::NewPasswordLabel))</span>
1363- <input class="field-input" type="password" name="new" autocomplete="new-password" minlength=(izlek_core::auth::MIN_PASSWORD_CHARS.to_string()) required="">1363+ <input class="field-input" type="password" name="new" autocomplete="new-password" minlength=(iz_core::auth::MIN_PASSWORD_CHARS.to_string()) required="">
1364 </label>1364 </label>
1365 <div class="panel-foot">1365 <div class="panel-foot">
1366 if let Some(refusal) = &password_refusal {1366 if let Some(refusal) = &password_refusal {
@@ -1459,7 +1459,7 @@ async fn settings_page(cx: &Cx) -> Result {
1459 type="text"1459 type="text"
1460 name="from_name"1460 name="from_name"
1461 value=(sender.from_name.clone())1461 value=(sender.from_name.clone())
1462- placeholder="İzlek"1462+ placeholder="İz"
1463 >1463 >
1464 </label>1464 </label>
1465 <label class="field">1465 <label class="field">
@@ -1469,7 +1469,7 @@ async fn settings_page(cx: &Cx) -> Result {
1469 type="text"1469 type="text"
1470 name="from_address"1470 name="from_address"
1471 value=(sender.from_address.clone())1471 value=(sender.from_address.clone())
1472- placeholder="board@izlek.sh"1472+ placeholder="board@iz.sh"
1473 >1473 >
1474 </label>1474 </label>
1475 </div>1475 </div>
@@ -1631,7 +1631,7 @@ async fn settings_page(cx: &Cx) -> Result {
1631 } else {1631 } else {
1632 t(lang, Key::ActiveStatus).to_string()1632 t(lang, Key::ActiveStatus).to_string()
1633 };1633 };
1634- let member_person = izlek_core::board::Person {1634+ let member_person = iz_core::board::Person {
1635 id: member.id.clone(),1635 id: member.id.clone(),
1636 display_name: member.display_name.clone(),1636 display_name: member.display_name.clone(),
1637 has_photo: member.has_photo,1637 has_photo: member.has_photo,
@@ -1654,9 +1654,9 @@ async fn settings_page(cx: &Cx) -> Result {
1654 <form method="post" action="/api/set_role" class="member-role status-form">1654 <form method="post" action="/api/set_role" class="member-role status-form">
1655 <input type="hidden" name="user_id" value=(member.id.clone())>1655 <input type="hidden" name="user_id" value=(member.id.clone())>
1656 <select class="status-select" name="role" data-autosubmit="">1656 <select class="status-select" name="role" data-autosubmit="">
1657- <option value="member" selected=(member.role == izlek_core::Role::Member)>(t(lang, Key::RoleMemberOption))</option>1657+ <option value="member" selected=(member.role == iz_core::Role::Member)>(t(lang, Key::RoleMemberOption))</option>
1658- <option value="viewer" selected=(member.role == izlek_core::Role::Viewer)>(t(lang, Key::RoleViewerOption))</option>1658+ <option value="viewer" selected=(member.role == iz_core::Role::Viewer)>(t(lang, Key::RoleViewerOption))</option>
1659- <option value="admin" selected=(member.role == izlek_core::Role::Admin)>(t(lang, Key::RoleAdminOption))</option>1659+ <option value="admin" selected=(member.role == iz_core::Role::Admin)>(t(lang, Key::RoleAdminOption))</option>
1660 </select>1660 </select>
1661 (crate::detail::glyph::chevron(cx).await?)1661 (crate::detail::glyph::chevron(cx).await?)
1662 </form>1662 </form>
crates/izlek-web/src/sheet.rs → crates/iz-web/src/sheet.rsrenamed+0 -0
crates/izlek-web/src/slides.rs → crates/iz-web/src/slides.rsrenamed+0 -0
crates/izlek-web/src/smtp.rs → crates/iz-web/src/smtp.rsrenamed+2 -2
@@ -19,8 +19,8 @@
19 19
20 use std::sync::Arc;20 use std::sync::Arc;
21 21
22-use izlek_core::mail::{MailError, Mailer, Outgoing};22+use iz_core::mail::{MailError, Mailer, Outgoing};
23-use izlek_core::store::Store;23+use iz_core::store::Store;
24 use lettre::message::header::ContentType;24 use lettre::message::header::ContentType;
25 use lettre::transport::smtp::authentication::Credentials;25 use lettre::transport::smtp::authentication::Credentials;
26 use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};26 use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};
crates/izlek-web/src/tags.rs → crates/iz-web/src/tags.rsrenamed+4 -4
@@ -1,4 +1,4 @@
1-//! Task tags, ported from `izlek-web/src/rules.rs` onto topcoat's1+//! Task tags, ported from `iz-web/src/rules.rs` onto topcoat's
2 //! server-rendered pages.2 //! server-rendered pages.
3 //!3 //!
4 //! The screen is the admin's, and so is every call behind it: a tag renames4 //! The screen is the admin's, and so is every call behind it: a tag renames
@@ -25,7 +25,7 @@ use topcoat::router::content::{Form, Json};
25 use topcoat::router::{HeaderName, StatusCode, header, page, query_params, route};25 use topcoat::router::{HeaderName, StatusCode, header, page, query_params, route};
26 use topcoat::view::view;26 use topcoat::view::view;
27 27
28-use izlek_core::store::{Store, Tag, User};28+use iz_core::store::{Store, Tag, User};
29 29
30 use crate::i18n::{Key, Lang, t};30 use crate::i18n::{Key, Lang, t};
31 use crate::server::{Refusal, accounts, back_to, refusal_of, require_admin};31 use crate::server::{Refusal, accounts, back_to, refusal_of, require_admin};
@@ -129,7 +129,7 @@ async fn tag_event(store: &Arc<dyn Store>, actor: &User, kind: &str, detail: &st
129 let _ = store129 let _ = store
130 .record_event(130 .record_event(
131 Some(&actor.id),131 Some(&actor.id),
132- &izlek_core::detail::ActivityKind::Other(kind.to_string()),132+ &iz_core::detail::ActivityKind::Other(kind.to_string()),
133 detail,133 detail,
134 time::OffsetDateTime::now_utc(),134 time::OffsetDateTime::now_utc(),
135 )135 )
@@ -218,7 +218,7 @@ async fn delete_tag(cx: &Cx, Form(input): Form<DeleteTagForm>) -> Redirect {
218 tag_event(&store, &user, "tag_deleted", &tag.name).await;218 tag_event(&store, &user, "tag_deleted", &tag.name).await;
219 redirect(cx, None)219 redirect(cx, None)
220 }220 }
221- Err(izlek_core::store::StoreError::Conflict("tag_in_use")) => {221+ Err(iz_core::store::StoreError::Conflict("tag_in_use")) => {
222 redirect(cx, Some(Refusal::TagInUse))222 redirect(cx, Some(Refusal::TagInUse))
223 }223 }
224 Err(_) => redirect(cx, Some(Refusal::Unavailable)),224 Err(_) => redirect(cx, Some(Refusal::Unavailable)),
crates/izlek-web/tests/browser/moment.mjs → crates/iz-web/tests/browser/moment.mjsrenamed+4 -4
@@ -14,10 +14,10 @@
14 // (soft-nav claims it), so this signs in — but it claims too, so the14 // (soft-nav claims it), so this signs in — but it claims too, so the
15 // script runs standalone as well:15 // script runs standalone as well:
16 //16 //
17-// node crates/izlek-web/tests/browser/moment.mjs http://127.0.0.1:779117+// node crates/iz-web/tests/browser/moment.mjs http://127.0.0.1:7791
18 //18 //
19 // Playwright lives outside the repo, exactly as soft-nav.mjs says.19 // Playwright lives outside the repo, exactly as soft-nav.mjs says.
20-const { chromium } = await import(process.env.IZLEK_PLAYWRIGHT || 'playwright');20+const { chromium } = await import(process.env.IZ_PLAYWRIGHT || 'playwright');
21 21
22 const base = process.argv[2] || 'http://127.0.0.1:7791';22 const base = process.argv[2] || 'http://127.0.0.1:7791';
23 const shots = process.env.SHOT_DIR || '.';23 const shots = process.env.SHOT_DIR || '.';
@@ -42,14 +42,14 @@ page.on('console', (m) => {
42 await page.goto(base + '/', { waitUntil: 'networkidle' });42 await page.goto(base + '/', { waitUntil: 'networkidle' });
43 if (await page.locator('input[name="display_name"]').count()) {43 if (await page.locator('input[name="display_name"]').count()) {
44 await page.fill('input[name="display_name"]', 'Ada Lovelace');44 await page.fill('input[name="display_name"]', 'Ada Lovelace');
45- await page.fill('input[name="email"]', 'ada@izlek.sh');45+ await page.fill('input[name="email"]', 'ada@iz.sh');
46 await page.fill('input[name="password"]', 'correct horse battery staple');46 await page.fill('input[name="password"]', 'correct horse battery staple');
47 await Promise.all([47 await Promise.all([
48 page.waitForLoadState('networkidle'),48 page.waitForLoadState('networkidle'),
49 page.click('button[type="submit"]'),49 page.click('button[type="submit"]'),
50 ]);50 ]);
51 } else {51 } else {
52- await page.fill('input[name="email"]', 'ada@izlek.sh');52+ await page.fill('input[name="email"]', 'ada@iz.sh');
53 await page.fill('input[name="password"]', 'correct horse battery staple');53 await page.fill('input[name="password"]', 'correct horse battery staple');
54 await Promise.all([54 await Promise.all([
55 page.waitForLoadState('networkidle'),55 page.waitForLoadState('networkidle'),
crates/izlek-web/tests/browser/run.sh → crates/iz-web/tests/browser/run.shrenamed+15 -15
@@ -1,20 +1,20 @@
1 #!/usr/bin/env bash1 #!/usr/bin/env bash
2-# Runs the browser checks against a throwaway İzlek: its own database, its2+# Runs the browser checks against a throwaway İz: its own database, its
3-# own port, torn down after. Never touches config/izlek.toml or izlek.db —3+# own port, torn down after. Never touches config/iz.toml or iz.db —
4 # the server reads its config from the working directory, so it is given a4 # the server reads its config from the working directory, so it is given a
5 # directory of its own.5 # directory of its own.
6 #6 #
7-# crates/izlek-web/tests/browser/run.sh7+# crates/iz-web/tests/browser/run.sh
8 #8 #
9-# Playwright is not a dependency of this repo and never will be: İzlek has9+# Playwright is not a dependency of this repo and never will be: İz has
10-# no node in it. It is installed once into ~/.cache/izlek/browser-tests10+# no node in it. It is installed once into ~/.cache/iz/browser-tests
11 # (Chromium included, ~120MB) the first time this runs, and found there11 # (Chromium included, ~120MB) the first time this runs, and found there
12-# every time after. IZLEK_PLAYWRIGHT and PLAYWRIGHT_BROWSERS_PATH override12+# every time after. IZ_PLAYWRIGHT and PLAYWRIGHT_BROWSERS_PATH override
13 # that if the install belongs somewhere else.13 # that if the install belongs somewhere else.
14 set -euo pipefail14 set -euo pipefail
15 15
16 repo=$(cd "$(dirname "$0")/../../../.." && pwd)16 repo=$(cd "$(dirname "$0")/../../../.." && pwd)
17-port=${IZLEK_BROWSER_PORT:-7791}17+port=${IZ_BROWSER_PORT:-7791}
18 work=$(mktemp -d)18 work=$(mktemp -d)
19 shots=${SHOT_DIR:-$work}19 shots=${SHOT_DIR:-$work}
20 20
@@ -26,10 +26,10 @@ trap cleanup EXIT
26 26
27 # The one-time Playwright install, kept out of the repo and out of the27 # The one-time Playwright install, kept out of the repo and out of the
28 # session scratchpad so it survives both.28 # session scratchpad so it survives both.
29-home=${IZLEK_BROWSER_HOME:-${XDG_CACHE_HOME:-$HOME/.cache}/izlek/browser-tests}29+home=${IZ_BROWSER_HOME:-${XDG_CACHE_HOME:-$HOME/.cache}/iz/browser-tests}
30 export PLAYWRIGHT_BROWSERS_PATH=${PLAYWRIGHT_BROWSERS_PATH:-$home/browsers}30 export PLAYWRIGHT_BROWSERS_PATH=${PLAYWRIGHT_BROWSERS_PATH:-$home/browsers}
31-export IZLEK_PLAYWRIGHT=${IZLEK_PLAYWRIGHT:-$home/node_modules/playwright/index.mjs}31+export IZ_PLAYWRIGHT=${IZ_PLAYWRIGHT:-$home/node_modules/playwright/index.mjs}
32-if [[ ! -f $IZLEK_PLAYWRIGHT ]]; then32+if [[ ! -f $IZ_PLAYWRIGHT ]]; then
33 echo "installing playwright into $home (once)"33 echo "installing playwright into $home (once)"
34 mkdir -p "$home"34 mkdir -p "$home"
35 # npm's own postinstall would drag in headed Chromium and ffmpeg — 390MB35 # npm's own postinstall would drag in headed Chromium and ffmpeg — 390MB
@@ -43,16 +43,16 @@ fi
43 # target/<profile>/assets. A plain `cargo build` leaves the previous bundle43 # target/<profile>/assets. A plain `cargo build` leaves the previous bundle
44 # in place, and the server would serve the old css from it — a css change44 # in place, and the server would serve the old css from it — a css change
45 # would pass every check here while the page shows the last build.45 # would pass every check here while the page shows the last build.
46-(cd "$repo" && topcoat asset bundle -p izlek-web)46+(cd "$repo" && topcoat asset bundle -p iz-web)
47 47
48 mkdir -p "$work/config"48 mkdir -p "$work/config"
49-printf 'database = "izlek.db"\nlisten = "127.0.0.1:%s"\n' "$port" > "$work/config/izlek.toml"49+printf 'database = "iz.db"\nlisten = "127.0.0.1:%s"\n' "$port" > "$work/config/iz.toml"
50 50
51 # Started from $work so it claims that directory's config and database, and51 # Started from $work so it claims that directory's config and database, and
52 # backgrounded here rather than down a pipeline so $! is the server itself —52 # backgrounded here rather than down a pipeline so $! is the server itself —
53 # a stale pid leaves the port bound and the next run silently talks to the53 # a stale pid leaves the port bound and the next run silently talks to the
54 # old process.54 # old process.
55-(cd "$work" && exec "$repo/target/debug/izlek-web" > "$work/server.log" 2>&1) &55+(cd "$work" && exec "$repo/target/debug/iz-web" > "$work/server.log" 2>&1) &
56 server=$!56 server=$!
57 57
58 for _ in $(seq 1 60); do58 for _ in $(seq 1 60); do
@@ -65,9 +65,9 @@ if ! curl -sf "http://127.0.0.1:$port/healthz" > /dev/null; then
65 exit 165 exit 1
66 fi66 fi
67 67
68-SHOT_DIR="$shots" node "$repo/crates/izlek-web/tests/browser/soft-nav.mjs" "http://127.0.0.1:$port"68+SHOT_DIR="$shots" node "$repo/crates/iz-web/tests/browser/soft-nav.mjs" "http://127.0.0.1:$port"
69 69
70 # The moment field's own pass. soft-nav ran first and claimed the70 # The moment field's own pass. soft-nav ran first and claimed the
71 # workspace, so this one signs the same admin in; it claims too when it71 # workspace, so this one signs the same admin in; it claims too when it
72 # runs standalone. Either script failing fails the run.72 # runs standalone. Either script failing fails the run.
73-SHOT_DIR="$shots" node "$repo/crates/izlek-web/tests/browser/moment.mjs" "http://127.0.0.1:$port"73+SHOT_DIR="$shots" node "$repo/crates/iz-web/tests/browser/moment.mjs" "http://127.0.0.1:$port"
crates/izlek-web/tests/browser/soft-nav.mjs → crates/iz-web/tests/browser/soft-nav.mjsrenamed+6 -6
@@ -1,5 +1,5 @@
1 // The one check `cargo test` cannot make: that the soft swap actually holds1 // The one check `cargo test` cannot make: that the soft swap actually holds
2-// in a browser. `tests/http.rs` asserts the shape of the script İzlek serves;2+// in a browser. `tests/http.rs` asserts the shape of the script İz serves;
3 // only a real engine runs it.3 // only a real engine runs it.
4 //4 //
5 // Guards the URL-lag class. `swap()` (`src/layout.rs`) replaces the body,5 // Guards the URL-lag class. `swap()` (`src/layout.rs`) replaces the body,
@@ -11,13 +11,13 @@
11 //11 //
12 // Wants a server on a throwaway database with the workspace unclaimed:12 // Wants a server on a throwaway database with the workspace unclaimed:
13 //13 //
14-// node crates/izlek-web/tests/browser/soft-nav.mjs http://127.0.0.1:779114+// node crates/iz-web/tests/browser/soft-nav.mjs http://127.0.0.1:7791
15 //15 //
16-// Playwright lives outside the repo — İzlek has no node dependency and16+// Playwright lives outside the repo — İz has no node dependency and
17 // gains none here. Point PLAYWRIGHT_BROWSERS_PATH at the browser download17 // gains none here. Point PLAYWRIGHT_BROWSERS_PATH at the browser download
18-// and IZLEK_PLAYWRIGHT at the installed package (ESM resolves imports from18+// and IZ_PLAYWRIGHT at the installed package (ESM resolves imports from
19 // this file's directory, not the working one, so a bare name will not do).19 // this file's directory, not the working one, so a bare name will not do).
20-const { chromium } = await import(process.env.IZLEK_PLAYWRIGHT || 'playwright');20+const { chromium } = await import(process.env.IZ_PLAYWRIGHT || 'playwright');
21 21
22 const base = process.argv[2] || 'http://127.0.0.1:7791';22 const base = process.argv[2] || 'http://127.0.0.1:7791';
23 const shots = process.env.SHOT_DIR || '.';23 const shots = process.env.SHOT_DIR || '.';
@@ -41,7 +41,7 @@ page.on('load', () => loads.push(page.url()));
41 // filling it signs the admin in.41 // filling it signs the admin in.
42 await page.goto(base + '/', { waitUntil: 'networkidle' });42 await page.goto(base + '/', { waitUntil: 'networkidle' });
43 await page.fill('input[name="display_name"]', 'Ada Lovelace');43 await page.fill('input[name="display_name"]', 'Ada Lovelace');
44-await page.fill('input[name="email"]', 'ada@izlek.sh');44+await page.fill('input[name="email"]', 'ada@iz.sh');
45 await page.fill('input[name="password"]', 'correct horse battery staple');45 await page.fill('input[name="password"]', 'correct horse battery staple');
46 await Promise.all([46 await Promise.all([
47 page.waitForLoadState('networkidle'),47 page.waitForLoadState('networkidle'),
crates/izlek-web/tests/fixtures/book.xlsx → crates/iz-web/tests/fixtures/book.xlsxrenamed+0 -0
crates/izlek-web/tests/fixtures/tall.xlsx → crates/iz-web/tests/fixtures/tall.xlsxrenamed+0 -0
crates/izlek-web/tests/fixtures/wide.xlsx → crates/iz-web/tests/fixtures/wide.xlsxrenamed+0 -0
crates/izlek-web/tests/http.rs → crates/iz-web/tests/http.rsrenamed+318 -318

Diff too large; view file

@@ -8,7 +8,7 @@
8 //! New HTTP tests belong in this file rather than a new `tests/*.rs`: one test8 //! New HTTP tests belong in this file rather than a new `tests/*.rs`: one test
9 //! binary links and runs once.9 //! binary links and runs once.
10 //!10 //!
11-//! Ported from the Leptos-era `izlek-web`'s `tests/http.rs`. That app answered11+//! Ported from the Leptos-era `iz-web`'s `tests/http.rs`. That app answered
12 //! a hydrated caller with `200` and a JSON body; this one is server-rendered12 //! a hydrated caller with `200` and a JSON body; this one is server-rendered
13 //! and every mutating `/api/*` route always answers `303 See Other` (topcoat's13 //! and every mutating `/api/*` route always answers `303 See Other` (topcoat's
14 //! `see_other`, not the old stack's `302 Found`), carrying the same JSON body14 //! `see_other`, not the old stack's `302 Found`), carrying the same JSON body
@@ -22,18 +22,18 @@ use std::path::PathBuf;
22 use std::sync::Arc;22 use std::sync::Arc;
23 23
24 use http::{HeaderValue, Request, StatusCode, header};24 use http::{HeaderValue, Request, StatusCode, header};
25-use izlek_core::Role;25+use iz_core::Role;
26-use izlek_core::accounts::Accounts;26+use iz_core::accounts::Accounts;
27-use izlek_core::board::Moved;27+use iz_core::board::Moved;
28-use izlek_core::store::{Audience, MailOutcome, SendKind, SendState, Store, Trigger, TursoStore};28+use iz_core::store::{Audience, MailOutcome, SendKind, SendState, Store, Trigger, TursoStore};
29-use izlek_web::server::{Mail, SESSION_COOKIE};29+use iz_web::server::{Mail, SESSION_COOKIE};
30 use topcoat::asset::{AssetBundle, RouterBuilderAssetExt};30 use topcoat::asset::{AssetBundle, RouterBuilderAssetExt};
31 use topcoat::cookie::RouterBuilderCookieExt;31 use topcoat::cookie::RouterBuilderCookieExt;
32 use topcoat::router::{Body, BodyLimit, Router, RouterBuilderDiscoverExt, to_bytes};32 use topcoat::router::{Body, BodyLimit, Router, RouterBuilderDiscoverExt, to_bytes};
33 use ulid::Ulid;33 use ulid::Ulid;
34 34
35-/// The bundle `cargo build -p izlek-web` + `topcoat asset bundle --bin35+/// The bundle `cargo build -p iz-web` + `topcoat asset bundle --bin
36-/// izlek-web` write next to the crate's own `target/debug`, not next to the36+/// iz-web` write next to the crate's own `target/debug`, not next to the
37 /// test binary (which lives in `target/debug/deps`) — `AssetBundle::load`37 /// test binary (which lives in `target/debug/deps`) — `AssetBundle::load`
38 /// looks beside `current_exe` and would miss it, so the path is given38 /// looks beside `current_exe` and would miss it, so the path is given
39 /// explicitly instead.39 /// explicitly instead.
@@ -49,8 +49,8 @@ fn asset_dir() -> PathBuf {
49 /// expects — not this window: a window short enough to end the stream promptly49 /// expects — not this window: a window short enough to end the stream promptly
50 /// is also short enough to lose the race on a loaded machine, which is a50 /// is also short enough to lose the race on a loaded machine, which is a
51 /// flaky test rather than a fast one.51 /// flaky test rather than a fast one.
52-const TEST_LIVE_WINDOW: izlek_web::live::LiveWindow =52+const TEST_LIVE_WINDOW: iz_web::live::LiveWindow =
53- izlek_web::live::LiveWindow(std::time::Duration::from_secs(10));53+ iz_web::live::LiveWindow(std::time::Duration::from_secs(10));
54 54
55 /// A throwaway workspace: its own database file and its own router.55 /// A throwaway workspace: its own database file and its own router.
56 struct App {56 struct App {
@@ -64,10 +64,10 @@ struct App {
64 64
65 impl App {65 impl App {
66 async fn build(base_url: &str, mail: Mail) -> Self {66 async fn build(base_url: &str, mail: Mail) -> Self {
67- let dir = std::env::temp_dir().join(format!("izlek-http-{}", Ulid::new()));67+ let dir = std::env::temp_dir().join(format!("iz-http-{}", Ulid::new()));
68 std::fs::create_dir_all(&dir).unwrap();68 std::fs::create_dir_all(&dir).unwrap();
69 let store: Arc<dyn Store> = Arc::new(69 let store: Arc<dyn Store> = Arc::new(
70- TursoStore::open(dir.join("izlek.db").to_str().unwrap(), &dir.join("storage"))70+ TursoStore::open(dir.join("iz.db").to_str().unwrap(), &dir.join("storage"))
71 .await71 .await
72 .unwrap(),72 .unwrap(),
73 );73 );
@@ -76,7 +76,7 @@ impl App {
76 let router = Router::builder()76 let router = Router::builder()
77 .discover()77 .discover()
78 .layer(78 .layer(
79- BodyLimit::max(izlek_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)79+ BodyLimit::max(iz_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)
80 .at("/files"),80 .at("/files"),
81 )81 )
82 .cookies()82 .cookies()
@@ -85,9 +85,9 @@ impl App {
85 .expect("run `topcoat asset bundle` before the http suite"),85 .expect("run `topcoat asset bundle` before the http suite"),
86 )86 )
87 .app_context(accounts)87 .app_context(accounts)
88- .app_context(izlek_web::photo::PhotoStamps::default())88+ .app_context(iz_web::photo::PhotoStamps::default())
89 .app_context(TEST_LIVE_WINDOW)89 .app_context(TEST_LIVE_WINDOW)
90- .app_context(izlek_web::live::Shutdown(stop.subscribe()))90+ .app_context(iz_web::live::Shutdown(stop.subscribe()))
91 .app_context(mail)91 .app_context(mail)
92 .build();92 .build();
93 Self {93 Self {
@@ -106,24 +106,24 @@ impl App {
106 /// settings, so a transition actually reaches the ledger instead of the106 /// settings, so a transition actually reaches the ledger instead of the
107 /// silent no-op `open`'s router hands every crossing.107 /// silent no-op `open`'s router hands every crossing.
108 async fn open_with_mail() -> Self {108 async fn open_with_mail() -> Self {
109- let dir = std::env::temp_dir().join(format!("izlek-http-{}", Ulid::new()));109+ let dir = std::env::temp_dir().join(format!("iz-http-{}", Ulid::new()));
110 std::fs::create_dir_all(&dir).unwrap();110 std::fs::create_dir_all(&dir).unwrap();
111 let store: Arc<dyn Store> = Arc::new(111 let store: Arc<dyn Store> = Arc::new(
112- TursoStore::open(dir.join("izlek.db").to_str().unwrap(), &dir.join("storage"))112+ TursoStore::open(dir.join("iz.db").to_str().unwrap(), &dir.join("storage"))
113 .await113 .await
114 .unwrap(),114 .unwrap(),
115 );115 );
116- let engine = Arc::new(izlek_core::MailEngine::new(116+ let engine = Arc::new(iz_core::MailEngine::new(
117 store.clone(),117 store.clone(),
118- Arc::new(izlek_web::smtp::WorkspaceSmtp::new(store.clone())),118+ Arc::new(iz_web::smtp::WorkspaceSmtp::new(store.clone())),
119- "https://izlek.sh",119+ "https://iz.sh",
120 ));120 ));
121- let accounts = Accounts::new(store.clone(), "https://izlek.sh");121+ let accounts = Accounts::new(store.clone(), "https://iz.sh");
122 let (stop, _) = tokio::sync::watch::channel(false);122 let (stop, _) = tokio::sync::watch::channel(false);
123 let router = Router::builder()123 let router = Router::builder()
124 .discover()124 .discover()
125 .layer(125 .layer(
126- BodyLimit::max(izlek_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)126+ BodyLimit::max(iz_web::settings::WIDEST_ATTACHMENT_MB as usize * 1024 * 1024)
127 .at("/files"),127 .at("/files"),
128 )128 )
129 .cookies()129 .cookies()
@@ -132,9 +132,9 @@ impl App {
132 .expect("run `topcoat asset bundle` before the http suite"),132 .expect("run `topcoat asset bundle` before the http suite"),
133 )133 )
134 .app_context(accounts)134 .app_context(accounts)
135- .app_context(izlek_web::photo::PhotoStamps::default())135+ .app_context(iz_web::photo::PhotoStamps::default())
136 .app_context(TEST_LIVE_WINDOW)136 .app_context(TEST_LIVE_WINDOW)
137- .app_context(izlek_web::live::Shutdown(stop.subscribe()))137+ .app_context(iz_web::live::Shutdown(stop.subscribe()))
138 .app_context(Mail::sending(engine))138 .app_context(Mail::sending(engine))
139 .build();139 .build();
140 Self {140 Self {
@@ -182,7 +182,7 @@ impl App {
182 }182 }
183 183
184 /// Like `post`, but with a second `Cookie` header of the caller's own184 /// Like `post`, but with a second `Cookie` header of the caller's own
185- /// naming — for the `izlek_rows_<section>` page-size cookie, which lives185+ /// naming — for the `iz_rows_<section>` page-size cookie, which lives
186 /// beside the session cookie rather than replacing it.186 /// beside the session cookie rather than replacing it.
187 async fn post_with_extra_cookie(187 async fn post_with_extra_cookie(
188 &self,188 &self,
@@ -265,7 +265,7 @@ impl App {
265 fields: &[(&str, &str)],265 fields: &[(&str, &str)],
266 file: Option<(&str, &str, &[u8])>,266 file: Option<(&str, &str, &[u8])>,
267 ) -> Answer {267 ) -> Answer {
268- const BOUNDARY: &str = "izlek-test-boundary";268+ const BOUNDARY: &str = "iz-test-boundary";
269 let mut body = Vec::new();269 let mut body = Vec::new();
270 for (name, value) in fields {270 for (name, value) in fields {
271 body.extend_from_slice(271 body.extend_from_slice(
@@ -314,7 +314,7 @@ impl App {
314 }314 }
315 315
316 /// Like `get`, but with a second `Cookie` header of the caller's own316 /// Like `get`, but with a second `Cookie` header of the caller's own
317- /// naming — for the `izlek_rows_<section>` page-size cookie, which317+ /// naming — for the `iz_rows_<section>` page-size cookie, which
318 /// lives beside the session cookie rather than replacing it.318 /// lives beside the session cookie rather than replacing it.
319 async fn get_with_extra_cookie(&self, path: &str, cookie: Option<&str>, extra: &str) -> Raw {319 async fn get_with_extra_cookie(&self, path: &str, cookie: Option<&str>, extra: &str) -> Raw {
320 self.get_with(path, cookie, None, None, Some(extra)).await320 self.get_with(path, cookie, None, None, Some(extra)).await
@@ -493,10 +493,10 @@ async fn sender_saved(app: &App, admin: &str) -> bool {
493 &[493 &[
494 ("host", "smtp.fastmail.com"),494 ("host", "smtp.fastmail.com"),
495 ("port", "465"),495 ("port", "465"),
496- ("username", "izlek"),496+ ("username", "iz"),
497 ("password", SENDER_PASSWORD),497 ("password", SENDER_PASSWORD),
498- ("from_name", "İzlek"),498+ ("from_name", "İz"),
499- ("from_address", "izlek@izlek.sh"),499+ ("from_address", "iz@iz.sh"),
500 ],500 ],
501 )501 )
502 .await;502 .await;
@@ -515,7 +515,7 @@ async fn admin(app: &App) -> String {
515 None,515 None,
516 &[516 &[
517 ("display_name", "Ada Lovelace"),517 ("display_name", "Ada Lovelace"),
518- ("email", "ada@izlek.sh"),518+ ("email", "ada@iz.sh"),
519 ("password", "correct horse battery staple"),519 ("password", "correct horse battery staple"),
520 ],520 ],
521 )521 )
@@ -531,7 +531,7 @@ async fn admin(app: &App) -> String {
531 async fn queued_join_token(app: &App, email: &str) -> String {531 async fn queued_join_token(app: &App, email: &str) -> String {
532 let sends = app532 let sends = app
533 .store533 .store
534- .mail_queue(10, izlek_core::store::FeedPage::Newest)534+ .mail_queue(10, iz_core::store::FeedPage::Newest)
535 .await535 .await
536 .unwrap();536 .unwrap();
537 let body = sends537 let body = sends
@@ -559,7 +559,7 @@ async fn an_admin_can_send_a_signin_link_to_somebody_who_already_has_a_password(
559 let app = App::open().await;559 let app = App::open().await;
560 let admin_cookie = admin(&app).await;560 let admin_cookie = admin(&app).await;
561 // `invited` redeems the link, so this member has a password.561 // `invited` redeems the link, so this member has a password.
562- let _member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;562+ let _member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
563 563
564 let page = app564 let page = app
565 .get("/settings?section=members", Some(&admin_cookie))565 .get("/settings?section=members", Some(&admin_cookie))
@@ -575,7 +575,7 @@ async fn an_admin_can_send_a_signin_link_to_somebody_who_already_has_a_password(
575 let workspace_id = app.workspace_id().await;575 let workspace_id = app.workspace_id().await;
576 let member_id = app576 let member_id = app
577 .store577 .store
578- .user_by_email(&workspace_id, "emre@izlek.sh")578+ .user_by_email(&workspace_id, "emre@iz.sh")
579 .await579 .await
580 .unwrap()580 .unwrap()
581 .expect("the member is not in the store")581 .expect("the member is not in the store")
@@ -589,7 +589,7 @@ async fn an_admin_can_send_a_signin_link_to_somebody_who_already_has_a_password(
589 .await;589 .await;
590 assert_eq!(answer.status, StatusCode::SEE_OTHER, "{}", answer.body);590 assert_eq!(answer.status, StatusCode::SEE_OTHER, "{}", answer.body);
591 591
592- let token = queued_join_token(&app, "emre@izlek.sh").await;592+ let token = queued_join_token(&app, "emre@iz.sh").await;
593 let answer = app593 let answer = app
594 .post(594 .post(
595 "/api/redeem_link",595 "/api/redeem_link",
@@ -608,7 +608,7 @@ async fn an_admin_can_send_a_signin_link_to_somebody_who_already_has_a_password(
608 "/api/sign_in",608 "/api/sign_in",
609 None,609 None,
610 &[610 &[
611- ("email", "emre@izlek.sh"),611+ ("email", "emre@iz.sh"),
612 ("password", "second thoughts about oats"),612 ("password", "second thoughts about oats"),
613 ],613 ],
614 )614 )
@@ -629,7 +629,7 @@ async fn a_password_may_be_made_of_punctuation() {
629 // in a test is a password that survives it in a browser.629 // in a test is a password that survives it in a browser.
630 let app = App::open().await;630 let app = App::open().await;
631 let admin_cookie = admin(&app).await;631 let admin_cookie = admin(&app).await;
632- let email = "punct@izlek.sh";632+ let email = "punct@iz.sh";
633 let answer = app633 let answer = app
634 .post(634 .post(
635 "/api/invite_member",635 "/api/invite_member",
@@ -749,7 +749,7 @@ async fn a_task(app: &App, cookie: &str, column: &str, title: &str) -> String {
749 assert_eq!(answer.body, "", "the task was refused: {}", answer.body);749 assert_eq!(answer.body, "", "the task was refused: {}", answer.body);
750 750
751 let workspace_id = app.workspace_id().await;751 let workspace_id = app.workspace_id().await;
752- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)752+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
753 .await753 .await
754 .unwrap()754 .unwrap()
755 .unwrap();755 .unwrap();
@@ -773,19 +773,19 @@ async fn adding_a_member_mails_them_the_link() {
773 "/api/invite_member",773 "/api/invite_member",
774 Some(&admin_cookie),774 Some(&admin_cookie),
775 &[775 &[
776- ("email", "nour@izlek.sh"),776+ ("email", "nour@iz.sh"),
777 ("display_name", "Nour"),777 ("display_name", "Nour"),
778 ("role", "member"),778 ("role", "member"),
779 ],779 ],
780 )780 )
781 .await;781 .await;
782 assert_eq!(answer.status, StatusCode::OK, "{}", answer.body);782 assert_eq!(answer.status, StatusCode::OK, "{}", answer.body);
783- assert!(answer.body.contains("nour@izlek.sh"), "{}", answer.body);783+ assert!(answer.body.contains("nour@iz.sh"), "{}", answer.body);
784 assert!(!answer.body.contains("/join/"), "{}", answer.body);784 assert!(!answer.body.contains("/join/"), "{}", answer.body);
785 785
786 let sends = app786 let sends = app
787 .store787 .store
788- .mail_queue(10, izlek_core::store::FeedPage::Newest)788+ .mail_queue(10, iz_core::store::FeedPage::Newest)
789 .await789 .await
790 .unwrap();790 .unwrap();
791 let invites: Vec<_> = sends791 let invites: Vec<_> = sends
@@ -793,7 +793,7 @@ async fn adding_a_member_mails_them_the_link() {
793 .filter(|send| {793 .filter(|send| {
794 send.kind == SendKind::Invite794 send.kind == SendKind::Invite
795 && send.rule_id.is_none()795 && send.rule_id.is_none()
796- && send.recipient == "nour@izlek.sh"796+ && send.recipient == "nour@iz.sh"
797 })797 })
798 .collect();798 .collect();
799 assert_eq!(invites.len(), 1, "{invites:?}");799 assert_eq!(invites.len(), 1, "{invites:?}");
@@ -820,7 +820,7 @@ async fn a_resend_queues_another_mail() {
820 "/api/invite_member",820 "/api/invite_member",
821 Some(&admin_cookie),821 Some(&admin_cookie),
822 &[822 &[
823- ("email", "sena@izlek.sh"),823+ ("email", "sena@iz.sh"),
824 ("display_name", "Sena"),824 ("display_name", "Sena"),
825 ("role", "member"),825 ("role", "member"),
826 ],826 ],
@@ -835,23 +835,23 @@ async fn a_resend_queues_another_mail() {
835 .await835 .await
836 .unwrap()836 .unwrap()
837 .into_iter()837 .into_iter()
838- .find(|user| user.email == "sena@izlek.sh")838+ .find(|user| user.email == "sena@iz.sh")
839 .expect("no member row for sena")839 .expect("no member row for sena")
840 .id;840 .id;
841 841
842- let count = |sends: &[izlek_core::store::MailSend]| {842+ let count = |sends: &[iz_core::store::MailSend]| {
843 sends843 sends
844 .iter()844 .iter()
845 .filter(|send| {845 .filter(|send| {
846 send.kind == SendKind::Invite846 send.kind == SendKind::Invite
847 && send.rule_id.is_none()847 && send.rule_id.is_none()
848- && send.recipient == "sena@izlek.sh"848+ && send.recipient == "sena@iz.sh"
849 })849 })
850 .count()850 .count()
851 };851 };
852 let before = count(852 let before = count(
853 &app.store853 &app.store
854- .mail_queue(10, izlek_core::store::FeedPage::Newest)854+ .mail_queue(10, iz_core::store::FeedPage::Newest)
855 .await855 .await
856 .unwrap(),856 .unwrap(),
857 );857 );
@@ -868,11 +868,11 @@ async fn a_resend_queues_another_mail() {
868 .await;868 .await;
869 assert_eq!(resent.status, StatusCode::SEE_OTHER, "{}", resent.body);869 assert_eq!(resent.status, StatusCode::SEE_OTHER, "{}", resent.body);
870 let location = resent.location.expect("resend did not redirect");870 let location = resent.location.expect("resend did not redirect");
871- assert!(location.contains("mailed=sena%40izlek.sh"), "{location}");871+ assert!(location.contains("mailed=sena%40iz.sh"), "{location}");
872 872
873 let after = count(873 let after = count(
874 &app.store874 &app.store
875- .mail_queue(10, izlek_core::store::FeedPage::Newest)875+ .mail_queue(10, iz_core::store::FeedPage::Newest)
876 .await876 .await
877 .unwrap(),877 .unwrap(),
878 );878 );
@@ -883,7 +883,7 @@ async fn a_resend_queues_another_mail() {
883 async fn a_viewer_who_posts_to_create_task_anyway_is_refused() {883 async fn a_viewer_who_posts_to_create_task_anyway_is_refused() {
884 let app = App::open().await;884 let app = App::open().await;
885 let admin = admin(&app).await;885 let admin = admin(&app).await;
886- let viewer = invited(&app, &admin, "quiet@izlek.sh", "Quiet Reader", Role::Viewer).await;886+ let viewer = invited(&app, &admin, "quiet@iz.sh", "Quiet Reader", Role::Viewer).await;
887 let column = first_column(&app).await;887 let column = first_column(&app).await;
888 888
889 let answer = app889 let answer = app
@@ -911,7 +911,7 @@ async fn a_viewer_who_posts_to_create_task_anyway_is_refused() {
911 911
912 // And the refusal is not cosmetic: the board is still empty.912 // And the refusal is not cosmetic: the board is still empty.
913 let workspace_id = app.workspace_id().await;913 let workspace_id = app.workspace_id().await;
914- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)914+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
915 .await915 .await
916 .unwrap()916 .unwrap()
917 .unwrap();917 .unwrap();
@@ -929,7 +929,7 @@ async fn a_viewer_who_posts_to_create_task_anyway_is_refused() {
929 async fn a_member_may_create_a_task() {929 async fn a_member_may_create_a_task() {
930 let app = App::open().await;930 let app = App::open().await;
931 let admin = admin(&app).await;931 let admin = admin(&app).await;
932- let member = invited(&app, &admin, "mo@izlek.sh", "Mo Dubois", Role::Member).await;932+ let member = invited(&app, &admin, "mo@iz.sh", "Mo Dubois", Role::Member).await;
933 let column = first_column(&app).await;933 let column = first_column(&app).await;
934 934
935 let answer = app935 let answer = app
@@ -951,7 +951,7 @@ async fn a_member_may_create_a_task() {
951 );951 );
952 952
953 let workspace_id = app.workspace_id().await;953 let workspace_id = app.workspace_id().await;
954- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)954+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
955 .await955 .await
956 .unwrap()956 .unwrap()
957 .unwrap();957 .unwrap();
@@ -1028,7 +1028,7 @@ async fn a_task_cannot_be_dropped_into_another_workspaces_column() {
1028 answer.location1028 answer.location
1029 );1029 );
1030 let workspace_id = app.workspace_id().await;1030 let workspace_id = app.workspace_id().await;
1031- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1031+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1032 .await1032 .await
1033 .unwrap()1033 .unwrap()
1034 .unwrap();1034 .unwrap();
@@ -1066,7 +1066,7 @@ async fn a_card_needs_a_title() {
1066 answer.location1066 answer.location
1067 );1067 );
1068 let workspace_id = app.workspace_id().await;1068 let workspace_id = app.workspace_id().await;
1069- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1069+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1070 .await1070 .await
1071 .unwrap()1071 .unwrap()
1072 .unwrap();1072 .unwrap();
@@ -1118,11 +1118,11 @@ async fn the_board_sort_control_keeps_its_hidden_select_and_gets_a_dropdown_trig
1118 // registration below is proof the topbar `.user-menu` gets its close1118 // registration below is proof the topbar `.user-menu` gets its close
1119 // path on the board page too.1119 // path on the board page too.
1120 assert!(1120 assert!(
1121- html.contains("window.__izlekEsc"),1121+ html.contains("window.__izEsc"),
1122 "no escape manager on the board page: {html}"1122 "no escape manager on the board page: {html}"
1123 );1123 );
1124 assert!(1124 assert!(
1125- html.contains("__izlekEsc.register(40"),1125+ html.contains("__izEsc.register(40"),
1126 "no escape script on the board page: {html}"1126 "no escape script on the board page: {html}"
1127 );1127 );
1128 assert!(1128 assert!(
@@ -1135,7 +1135,7 @@ async fn the_board_sort_control_keeps_its_hidden_select_and_gets_a_dropdown_trig
1135 async fn a_viewer_who_posts_a_comment_anyway_is_refused() {1135 async fn a_viewer_who_posts_a_comment_anyway_is_refused() {
1136 let app = App::open().await;1136 let app = App::open().await;
1137 let admin = admin(&app).await;1137 let admin = admin(&app).await;
1138- let viewer = invited(&app, &admin, "eyes@izlek.sh", "Ida Eyes", Role::Viewer).await;1138+ let viewer = invited(&app, &admin, "eyes@iz.sh", "Ida Eyes", Role::Viewer).await;
1139 let column = first_column(&app).await;1139 let column = first_column(&app).await;
1140 let task = a_task(&app, &admin, &column, "Ship the detail modal").await;1140 let task = a_task(&app, &admin, &column, "Ship the detail modal").await;
1141 1141
@@ -1164,7 +1164,7 @@ async fn a_viewer_who_posts_a_comment_anyway_is_refused() {
1164 async fn a_member_may_comment_and_the_author_is_the_session() {1164 async fn a_member_may_comment_and_the_author_is_the_session() {
1165 let app = App::open().await;1165 let app = App::open().await;
1166 let admin = admin(&app).await;1166 let admin = admin(&app).await;
1167- let member = invited(&app, &admin, "kai@izlek.sh", "Kai Renner", Role::Member).await;1167+ let member = invited(&app, &admin, "kai@iz.sh", "Kai Renner", Role::Member).await;
1168 let column = first_column(&app).await;1168 let column = first_column(&app).await;
1169 let task = a_task(&app, &admin, &column, "Wire the picker").await;1169 let task = a_task(&app, &admin, &column, "Wire the picker").await;
1170 1170
@@ -1252,7 +1252,7 @@ async fn a_refusal_reaches_a_browser_with_no_script() {
1252 .post_without_script(1252 .post_without_script(
1253 "/api/link_tasks",1253 "/api/link_tasks",
1254 Some(&admin),1254 Some(&admin),
1255- &format!("http://izlek.test/?task={first}"),1255+ &format!("http://iz.test/?task={first}"),
1256 &[1256 &[
1257 ("task_id", &first),1257 ("task_id", &first),
1258 ("other_id", &second),1258 ("other_id", &second),
@@ -1284,7 +1284,7 @@ async fn a_call_that_was_not_refused_carries_nothing_back() {
1284 .post_without_script(1284 .post_without_script(
1285 "/api/link_tasks",1285 "/api/link_tasks",
1286 Some(&admin),1286 Some(&admin),
1287- "http://izlek.test/",1287+ "http://iz.test/",
1288 &[1288 &[
1289 ("task_id", &second),1289 ("task_id", &second),
1290 ("other_id", &first),1290 ("other_id", &first),
@@ -1319,7 +1319,7 @@ async fn a_task_id_from_nowhere_is_not_found() {
1319 async fn a_viewer_who_posts_a_delete_anyway_is_refused() {1319 async fn a_viewer_who_posts_a_delete_anyway_is_refused() {
1320 let app = App::open().await;1320 let app = App::open().await;
1321 let admin = admin(&app).await;1321 let admin = admin(&app).await;
1322- let viewer = invited(&app, &admin, "wren@izlek.sh", "Wren Ash", Role::Viewer).await;1322+ let viewer = invited(&app, &admin, "wren@iz.sh", "Wren Ash", Role::Viewer).await;
1323 let column = first_column(&app).await;1323 let column = first_column(&app).await;
1324 let task = a_task(&app, &admin, &column, "Viewers cannot remove this").await;1324 let task = a_task(&app, &admin, &column, "Viewers cannot remove this").await;
1325 1325
@@ -1329,7 +1329,7 @@ async fn a_viewer_who_posts_a_delete_anyway_is_refused() {
1329 assert_eq!(answer.body, "\"Forbidden\"");1329 assert_eq!(answer.body, "\"Forbidden\"");
1330 1330
1331 let workspace_id = app.workspace_id().await;1331 let workspace_id = app.workspace_id().await;
1332- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1332+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1333 .await1333 .await
1334 .unwrap()1334 .unwrap()
1335 .unwrap();1335 .unwrap();
@@ -1354,7 +1354,7 @@ async fn deleting_the_task_the_modal_came_from_lands_on_the_board_not_the_dead_m
1354 .post_without_script(1354 .post_without_script(
1355 "/api/delete_task",1355 "/api/delete_task",
1356 Some(&admin),1356 Some(&admin),
1357- &format!("http://izlek.test/?task={task}"),1357+ &format!("http://iz.test/?task={task}"),
1358 &[("task_id", &task)],1358 &[("task_id", &task)],
1359 )1359 )
1360 .await;1360 .await;
@@ -1370,7 +1370,7 @@ async fn deleting_the_task_the_modal_came_from_lands_on_the_board_not_the_dead_m
1370 async fn a_member_may_delete_and_the_delete_is_soft() {1370 async fn a_member_may_delete_and_the_delete_is_soft() {
1371 let app = App::open().await;1371 let app = App::open().await;
1372 let admin = admin(&app).await;1372 let admin = admin(&app).await;
1373- let member = invited(&app, &admin, "rae@izlek.sh", "Rae Okonkwo", Role::Member).await;1373+ let member = invited(&app, &admin, "rae@iz.sh", "Rae Okonkwo", Role::Member).await;
1374 let column = first_column(&app).await;1374 let column = first_column(&app).await;
1375 let task = a_task(&app, &admin, &column, "Mistyped in a hurry").await;1375 let task = a_task(&app, &admin, &column, "Mistyped in a hurry").await;
1376 1376
@@ -1388,7 +1388,7 @@ async fn a_member_may_delete_and_the_delete_is_soft() {
1388 answer.body1388 answer.body
1389 );1389 );
1390 let workspace_id = app.workspace_id().await;1390 let workspace_id = app.workspace_id().await;
1391- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1391+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1392 .await1392 .await
1393 .unwrap()1393 .unwrap()
1394 .unwrap();1394 .unwrap();
@@ -1407,7 +1407,7 @@ async fn a_member_may_delete_and_the_delete_is_soft() {
1407 assert_eq!(answer.body, "null", "a member was refused: {}", answer.body);1407 assert_eq!(answer.body, "null", "a member was refused: {}", answer.body);
1408 1408
1409 // Gone from the board, and gone from the detail: soft is not visible.1409 // Gone from the board, and gone from the detail: soft is not visible.
1410- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1410+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1411 .await1411 .await
1412 .unwrap()1412 .unwrap()
1413 .unwrap();1413 .unwrap();
@@ -1429,7 +1429,7 @@ async fn a_member_may_delete_and_the_delete_is_soft() {
1429 async fn a_viewer_who_posts_a_move_anyway_is_refused() {1429 async fn a_viewer_who_posts_a_move_anyway_is_refused() {
1430 let app = App::open().await;1430 let app = App::open().await;
1431 let admin = admin(&app).await;1431 let admin = admin(&app).await;
1432- let viewer = invited(&app, &admin, "quiet@izlek.sh", "Quiet Reader", Role::Viewer).await;1432+ let viewer = invited(&app, &admin, "quiet@iz.sh", "Quiet Reader", Role::Viewer).await;
1433 let columns = columns_of(&app).await;1433 let columns = columns_of(&app).await;
1434 let task = a_task(&app, &admin, &columns[0], "Stays in Backlog").await;1434 let task = a_task(&app, &admin, &columns[0], "Stays in Backlog").await;
1435 1435
@@ -1472,7 +1472,7 @@ async fn a_viewer_who_posts_a_move_anyway_is_refused() {
1472 async fn a_member_may_move_a_card() {1472 async fn a_member_may_move_a_card() {
1473 let app = App::open().await;1473 let app = App::open().await;
1474 let admin = admin(&app).await;1474 let admin = admin(&app).await;
1475- let member = invited(&app, &admin, "mo@izlek.sh", "Mo Dubois", Role::Member).await;1475+ let member = invited(&app, &admin, "mo@iz.sh", "Mo Dubois", Role::Member).await;
1476 let columns = columns_of(&app).await;1476 let columns = columns_of(&app).await;
1477 let task = a_task(&app, &admin, &columns[0], "Gets picked up").await;1477 let task = a_task(&app, &admin, &columns[0], "Gets picked up").await;
1478 1478
@@ -1567,7 +1567,7 @@ async fn a_card_with_open_subtasks_is_refused_the_done_column() {
1567 1567
1568 // The card did not move, so the board still shows it where it was.1568 // The card did not move, so the board still shows it where it was.
1569 let workspace_id = app.workspace_id().await;1569 let workspace_id = app.workspace_id().await;
1570- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1570+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1571 .await1571 .await
1572 .unwrap()1572 .unwrap()
1573 .unwrap();1573 .unwrap();
@@ -1643,7 +1643,7 @@ async fn a_subtask_is_opened_from_its_parents_page_and_shows_up_there() {
1643 );1643 );
1644 1644
1645 let workspace_id = app.workspace_id().await;1645 let workspace_id = app.workspace_id().await;
1646- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1646+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1647 .await1647 .await
1648 .unwrap()1648 .unwrap()
1649 .unwrap();1649 .unwrap();
@@ -1665,7 +1665,7 @@ async fn a_subtask_with_nothing_in_its_title_is_refused() {
1665 .post_without_script(1665 .post_without_script(
1666 "/api/create_subtask",1666 "/api/create_subtask",
1667 Some(&admin),1667 Some(&admin),
1668- &format!("http://izlek.sh/?task={parent}"),1668+ &format!("http://iz.sh/?task={parent}"),
1669 &[("parent_id", &parent), ("title", " ")],1669 &[("parent_id", &parent), ("title", " ")],
1670 )1670 )
1671 .await;1671 .await;
@@ -1701,7 +1701,7 @@ async fn taking_a_task_in_and_letting_it_out_are_the_same_form() {
1701 taken.body1701 taken.body
1702 );1702 );
1703 let workspace_id = app.workspace_id().await;1703 let workspace_id = app.workspace_id().await;
1704- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1704+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1705 .await1705 .await
1706 .unwrap()1706 .unwrap()
1707 .unwrap();1707 .unwrap();
@@ -1732,7 +1732,7 @@ async fn taking_a_task_in_and_letting_it_out_are_the_same_form() {
1732 "letting it out was refused: {}",1732 "letting it out was refused: {}",
1733 released.body1733 released.body
1734 );1734 );
1735- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)1735+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
1736 .await1736 .await
1737 .unwrap()1737 .unwrap()
1738 .unwrap();1738 .unwrap();
@@ -1757,7 +1757,7 @@ async fn a_second_level_of_subtask_is_refused_at_the_door() {
1757 .post_without_script(1757 .post_without_script(
1758 "/api/create_subtask",1758 "/api/create_subtask",
1759 Some(&admin),1759 Some(&admin),
1760- &format!("http://izlek.sh/?task={child}"),1760+ &format!("http://iz.sh/?task={child}"),
1761 &[("parent_id", &child), ("title", "Deeper")],1761 &[("parent_id", &child), ("title", "Deeper")],
1762 )1762 )
1763 .await;1763 .await;
@@ -1775,7 +1775,7 @@ async fn a_second_level_of_subtask_is_refused_at_the_door() {
1775 .post_without_script(1775 .post_without_script(
1776 "/api/set_parent",1776 "/api/set_parent",
1777 Some(&admin),1777 Some(&admin),
1778- &format!("http://izlek.sh/?task={child}"),1778+ &format!("http://iz.sh/?task={child}"),
1779 &[("task_id", &loose), ("parent_id", &child)],1779 &[("task_id", &loose), ("parent_id", &child)],
1780 )1780 )
1781 .await;1781 .await;
@@ -1794,7 +1794,7 @@ async fn a_second_level_of_subtask_is_refused_at_the_door() {
1794 async fn a_viewer_may_not_open_or_move_a_subtask() {1794 async fn a_viewer_may_not_open_or_move_a_subtask() {
1795 let app = App::open().await;1795 let app = App::open().await;
1796 let admin = admin(&app).await;1796 let admin = admin(&app).await;
1797- let watcher = invited(&app, &admin, "kay@izlek.sh", "Kay Watcher", Role::Viewer).await;1797+ let watcher = invited(&app, &admin, "kay@iz.sh", "Kay Watcher", Role::Viewer).await;
1798 let columns = columns_of(&app).await;1798 let columns = columns_of(&app).await;
1799 let parent = a_task(&app, &admin, &columns[0], "Ship the exporter").await;1799 let parent = a_task(&app, &admin, &columns[0], "Ship the exporter").await;
1800 1800
@@ -1802,7 +1802,7 @@ async fn a_viewer_may_not_open_or_move_a_subtask() {
1802 .post_without_script(1802 .post_without_script(
1803 "/api/create_subtask",1803 "/api/create_subtask",
1804 Some(&watcher),1804 Some(&watcher),
1805- &format!("http://izlek.sh/?task={parent}"),1805+ &format!("http://iz.sh/?task={parent}"),
1806 &[("parent_id", &parent), ("title", "Not yours")],1806 &[("parent_id", &parent), ("title", "Not yours")],
1807 )1807 )
1808 .await;1808 .await;
@@ -1820,7 +1820,7 @@ async fn a_viewer_may_not_open_or_move_a_subtask() {
1820 .post_without_script(1820 .post_without_script(
1821 "/api/set_parent",1821 "/api/set_parent",
1822 Some(&watcher),1822 Some(&watcher),
1823- &format!("http://izlek.sh/?task={parent}"),1823+ &format!("http://iz.sh/?task={parent}"),
1824 &[("task_id", &parent), ("parent_id", "")],1824 &[("task_id", &parent), ("parent_id", "")],
1825 )1825 )
1826 .await;1826 .await;
@@ -1979,20 +1979,20 @@ async fn the_morph_keeps_what_the_client_owns_and_names_none_of_it() {
1979 let page = String::from_utf8_lossy(&page.bytes);1979 let page = String::from_utf8_lossy(&page.bytes);
1980 1980
1981 assert!(1981 assert!(
1982- page.contains("window.__izlekOwn = function (node, classes, attrs)"),1982+ page.contains("window.__izOwn = function (node, classes, attrs)"),
1983 "there is no way left for an enhancement to declare what it owns"1983 "there is no way left for an enhancement to declare what it owns"
1984 );1984 );
1985 assert!(1985 assert!(
1986- page.contains("window.__izlekAdded = function (node)"),1986+ page.contains("window.__izAdded = function (node)"),
1987 "a client-built node can no longer say it is not a stray"1987 "a client-built node can no longer say it is not a stray"
1988 );1988 );
1989 // The morph asks the node, never a list of names it was told to remember.1989 // The morph asks the node, never a list of names it was told to remember.
1990 assert!(1990 assert!(
1991- page.contains("function clientMade(node) { return node.__izlekAdded === true; }"),1991+ page.contains("function clientMade(node) { return node.__izAdded === true; }"),
1992 "the stray test is back to sniffing class names"1992 "the stray test is back to sniffing class names"
1993 );1993 );
1994 assert!(1994 assert!(
1995- page.contains("var own = from.__izlekMine"),1995+ page.contains("var own = from.__izMine"),
1996 "the attribute sweep no longer reads what the node owns"1996 "the attribute sweep no longer reads what the node owns"
1997 );1997 );
1998 // class is merged, not overwritten. This is the exact line the bug was.1998 // class is merged, not overwritten. This is the exact line the bug was.
@@ -2003,12 +2003,12 @@ async fn the_morph_keeps_what_the_client_owns_and_names_none_of_it() {
2003 2003
2004 // And the dropdown declares, rather than relying on the morph to know.2004 // And the dropdown declares, rather than relying on the morph to know.
2005 assert!(2005 assert!(
2006- page.contains("window.__izlekOwn(select, ['dd-native'], [])"),2006+ page.contains("window.__izOwn(select, ['dd-native'], [])"),
2007 "the select's hidden state is no longer declared as the client's"2007 "the select's hidden state is no longer declared as the client's"
2008 );2008 );
2009 assert!(2009 assert!(
2010- page.contains("window.__izlekAdded(trigger)")2010+ page.contains("window.__izAdded(trigger)")
2011- && page.contains("window.__izlekAdded(panel)"),2011+ && page.contains("window.__izAdded(panel)"),
2012 "the trigger and panel no longer say they are the client's"2012 "the trigger and panel no longer say they are the client's"
2013 );2013 );
2014 }2014 }
@@ -2019,7 +2019,7 @@ async fn a_rewired_dropdown_repairs_itself_instead_of_being_skipped() {
2019 // make the enhancement follow the data: the trigger's label is drawn from2019 // make the enhancement follow the data: the trigger's label is drawn from
2020 // the select, so when a live refresh moves the selection the trigger has2020 // the select, so when a live refresh moves the selection the trigger has
2021 // to re-read it. An already-enhanced select is therefore repaired on2021 // to re-read it. An already-enhanced select is therefore repaired on
2022- // `izlek:wire`, not skipped.2022+ // `iz:wire`, not skipped.
2023 let app = App::open().await;2023 let app = App::open().await;
2024 let admin = admin(&app).await;2024 let admin = admin(&app).await;
2025 let page = app.get("/settings", Some(&admin)).await;2025 let page = app.get("/settings", Some(&admin)).await;
@@ -2092,7 +2092,7 @@ async fn the_parts_have_a_tab_and_a_subtask_is_not_offered_one() {
2092 async fn a_drop_decided_against_a_stale_board_is_refused() {2092 async fn a_drop_decided_against_a_stale_board_is_refused() {
2093 let app = App::open().await;2093 let app = App::open().await;
2094 let admin = admin(&app).await;2094 let admin = admin(&app).await;
2095- let member = invited(&app, &admin, "mo@izlek.sh", "Mo Dubois", Role::Member).await;2095+ let member = invited(&app, &admin, "mo@iz.sh", "Mo Dubois", Role::Member).await;
2096 let columns = columns_of(&app).await;2096 let columns = columns_of(&app).await;
2097 let task = a_task(&app, &admin, &columns[0], "Contested").await;2097 let task = a_task(&app, &admin, &columns[0], "Contested").await;
2098 2098
@@ -2206,7 +2206,7 @@ async fn settings_selects_keep_their_hidden_form_fields_and_get_a_dropdown_trigg
2206 "no dropdown script on the settings page: {html}"2206 "no dropdown script on the settings page: {html}"
2207 );2207 );
2208 assert!(2208 assert!(
2209- html.contains("__izlekEsc.register(40"),2209+ html.contains("__izEsc.register(40"),
2210 "no escape script on the settings page: {html}"2210 "no escape script on the settings page: {html}"
2211 );2211 );
2212 assert!(2212 assert!(
@@ -2226,7 +2226,7 @@ async fn the_rules_and_logs_pages_get_the_shared_escape_script() {
2226 let rules_page = app.get("/rules", Some(&cookie)).await;2226 let rules_page = app.get("/rules", Some(&cookie)).await;
2227 let rules_html = String::from_utf8_lossy(&rules_page.bytes);2227 let rules_html = String::from_utf8_lossy(&rules_page.bytes);
2228 assert!(2228 assert!(
2229- rules_html.contains("__izlekEsc.register(40"),2229+ rules_html.contains("__izEsc.register(40"),
2230 "no escape script on the rules page: {rules_html}"2230 "no escape script on the rules page: {rules_html}"
2231 );2231 );
2232 assert!(2232 assert!(
@@ -2237,7 +2237,7 @@ async fn the_rules_and_logs_pages_get_the_shared_escape_script() {
2237 let logs_page = app.get("/logs", Some(&cookie)).await;2237 let logs_page = app.get("/logs", Some(&cookie)).await;
2238 let logs_html = String::from_utf8_lossy(&logs_page.bytes);2238 let logs_html = String::from_utf8_lossy(&logs_page.bytes);
2239 assert!(2239 assert!(
2240- logs_html.contains("__izlekEsc.register(40"),2240+ logs_html.contains("__izEsc.register(40"),
2241 "no escape script on the logs page: {logs_html}"2241 "no escape script on the logs page: {logs_html}"
2242 );2242 );
2243 }2243 }
@@ -2261,7 +2261,7 @@ async fn the_soft_swap_rewrites_the_url_before_the_new_pages_scripts_run() {
2261 .split_once("function swap(html, url, fresh, push, morphing)")2261 .split_once("function swap(html, url, fresh, push, morphing)")
2262 .unwrap_or_else(|| panic!("no soft-nav swap on the board page: {html}"));2262 .unwrap_or_else(|| panic!("no soft-nav swap on the board page: {html}"));
2263 let body = after2263 let body = after
2264- .split_once("window.__izlekGo")2264+ .split_once("window.__izGo")
2265 .unwrap_or_else(|| panic!("swap runs past the end of the script: {after}"))2265 .unwrap_or_else(|| panic!("swap runs past the end of the script: {after}"))
2266 .0;2266 .0;
2267 let rewrite = body2267 let rewrite = body
@@ -2327,7 +2327,7 @@ async fn signing_out_without_script_lands_on_the_sign_in_page() {
2327 .post_without_script(2327 .post_without_script(
2328 "/api/sign_out",2328 "/api/sign_out",
2329 Some(&cookie),2329 Some(&cookie),
2330- "http://izlek.test/settings",2330+ "http://iz.test/settings",
2331 &[],2331 &[],
2332 )2332 )
2333 .await;2333 .await;
@@ -2340,7 +2340,7 @@ async fn signing_out_without_script_lands_on_the_sign_in_page() {
2340 async fn signing_out_leaves_every_other_session_alone() {2340 async fn signing_out_leaves_every_other_session_alone() {
2341 let app = App::open().await;2341 let app = App::open().await;
2342 let admin_cookie = admin(&app).await;2342 let admin_cookie = admin(&app).await;
2343- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2343+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2344 2344
2345 let out = app.post("/api/sign_out", Some(&member), &[]).await;2345 let out = app.post("/api/sign_out", Some(&member), &[]).await;
2346 assert_eq!(out.status, StatusCode::SEE_OTHER, "{}", out.body);2346 assert_eq!(out.status, StatusCode::SEE_OTHER, "{}", out.body);
@@ -2354,7 +2354,7 @@ async fn signing_out_leaves_every_other_session_alone() {
2354 async fn saving_a_profile_renames_the_person_asking_and_nobody_else() {2354 async fn saving_a_profile_renames_the_person_asking_and_nobody_else() {
2355 let app = App::open().await;2355 let app = App::open().await;
2356 let admin_cookie = admin(&app).await;2356 let admin_cookie = admin(&app).await;
2357- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2357+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2358 2358
2359 let answer = app2359 let answer = app
2360 .post(2360 .post(
@@ -2411,13 +2411,13 @@ async fn a_profile_cannot_be_saved_without_a_name() {
2411 async fn a_profile_can_change_its_own_email_and_stays_signed_in() {2411 async fn a_profile_can_change_its_own_email_and_stays_signed_in() {
2412 let app = App::open().await;2412 let app = App::open().await;
2413 let admin_cookie = admin(&app).await;2413 let admin_cookie = admin(&app).await;
2414- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2414+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2415 2415
2416 let answer = app2416 let answer = app
2417 .post(2417 .post(
2418 "/api/save_profile",2418 "/api/save_profile",
2419 Some(&member),2419 Some(&member),
2420- &[("display_name", "Emre Y"), ("email", "emre.new@izlek.sh")],2420+ &[("display_name", "Emre Y"), ("email", "emre.new@iz.sh")],
2421 )2421 )
2422 .await;2422 .await;
2423 assert_eq!(answer.status, StatusCode::SEE_OTHER, "{}", answer.body);2423 assert_eq!(answer.status, StatusCode::SEE_OTHER, "{}", answer.body);
@@ -2435,20 +2435,20 @@ async fn a_profile_can_change_its_own_email_and_stays_signed_in() {
2435 let mine = app.get("/settings", Some(&member)).await;2435 let mine = app.get("/settings", Some(&member)).await;
2436 assert_eq!(mine.status, StatusCode::OK, "{}", mine.status);2436 assert_eq!(mine.status, StatusCode::OK, "{}", mine.status);
2437 let html = String::from_utf8_lossy(&mine.bytes);2437 let html = String::from_utf8_lossy(&mine.bytes);
2438- assert!(html.contains("emre.new@izlek.sh"), "{html}");2438+ assert!(html.contains("emre.new@iz.sh"), "{html}");
2439 }2439 }
2440 2440
2441 #[tokio::test]2441 #[tokio::test]
2442 async fn a_profile_email_cannot_take_somebody_elses_address() {2442 async fn a_profile_email_cannot_take_somebody_elses_address() {
2443 let app = App::open().await;2443 let app = App::open().await;
2444 let admin_cookie = admin(&app).await;2444 let admin_cookie = admin(&app).await;
2445- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2445+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2446 2446
2447 let answer = app2447 let answer = app
2448 .post(2448 .post(
2449 "/api/save_profile",2449 "/api/save_profile",
2450 Some(&member),2450 Some(&member),
2451- &[("display_name", "Emre"), ("email", "ada@izlek.sh")],2451+ &[("display_name", "Emre"), ("email", "ada@iz.sh")],
2452 )2452 )
2453 .await;2453 .await;
2454 let location = answer.location.as_deref().unwrap_or_default();2454 let location = answer.location.as_deref().unwrap_or_default();
@@ -2468,7 +2468,7 @@ async fn a_profile_email_cannot_take_somebody_elses_address() {
2468 async fn a_taken_email_refuses_the_whole_save_not_only_the_email() {2468 async fn a_taken_email_refuses_the_whole_save_not_only_the_email() {
2469 let app = App::open().await;2469 let app = App::open().await;
2470 let admin_cookie = admin(&app).await;2470 let admin_cookie = admin(&app).await;
2471- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2471+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2472 2472
2473 let answer = app2473 let answer = app
2474 .post(2474 .post(
@@ -2476,7 +2476,7 @@ async fn a_taken_email_refuses_the_whole_save_not_only_the_email() {
2476 Some(&member),2476 Some(&member),
2477 &[2477 &[
2478 ("display_name", "Emre Renamed"),2478 ("display_name", "Emre Renamed"),
2479- ("email", "ada@izlek.sh"),2479+ ("email", "ada@iz.sh"),
2480 ("theme", "dark"),2480 ("theme", "dark"),
2481 ],2481 ],
2482 )2482 )
@@ -2519,7 +2519,7 @@ async fn a_signed_out_browser_cannot_rename_anybody() {
2519 async fn a_member_who_posts_new_limits_anyway_is_refused() {2519 async fn a_member_who_posts_new_limits_anyway_is_refused() {
2520 let app = App::open().await;2520 let app = App::open().await;
2521 let admin_cookie = admin(&app).await;2521 let admin_cookie = admin(&app).await;
2522- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2522+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2523 2523
2524 let answer = app2524 let answer = app
2525 .post(2525 .post(
@@ -2649,7 +2649,7 @@ async fn a_file_type_that_is_not_an_extension_is_refused() {
2649 async fn only_an_admin_may_write_the_sender() {2649 async fn only_an_admin_may_write_the_sender() {
2650 let app = App::open().await;2650 let app = App::open().await;
2651 let admin_cookie = admin(&app).await;2651 let admin_cookie = admin(&app).await;
2652- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2652+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2653 2653
2654 let answer = app2654 let answer = app
2655 .post(2655 .post(
@@ -2660,8 +2660,8 @@ async fn only_an_admin_may_write_the_sender() {
2660 ("port", "587"),2660 ("port", "587"),
2661 ("username", "emre"),2661 ("username", "emre"),
2662 ("password", "let-me-in"),2662 ("password", "let-me-in"),
2663- ("from_name", "İzlek"),2663+ ("from_name", "İz"),
2664- ("from_address", "emre@izlek.sh"),2664+ ("from_address", "emre@iz.sh"),
2665 ],2665 ],
2666 )2666 )
2667 .await;2667 .await;
@@ -2697,8 +2697,8 @@ async fn a_signed_out_browser_may_not_write_the_sender() {
2697 ("port", "587"),2697 ("port", "587"),
2698 ("username", "nobody"),2698 ("username", "nobody"),
2699 ("password", "let-me-in"),2699 ("password", "let-me-in"),
2700- ("from_name", "İzlek"),2700+ ("from_name", "İz"),
2701- ("from_address", "nobody@izlek.sh"),2701+ ("from_address", "nobody@iz.sh"),
2702 ],2702 ],
2703 )2703 )
2704 .await;2704 .await;
@@ -2729,10 +2729,10 @@ async fn an_edit_with_no_password_typed_keeps_the_stored_one() {
2729 &[2729 &[
2730 ("host", "smtp.fastmail.com"),2730 ("host", "smtp.fastmail.com"),
2731 ("port", "587"),2731 ("port", "587"),
2732- ("username", "izlek"),2732+ ("username", "iz"),
2733 ("password", ""),2733 ("password", ""),
2734- ("from_name", "İzlek"),2734+ ("from_name", "İz"),
2735- ("from_address", "izlek@izlek.sh"),2735+ ("from_address", "iz@iz.sh"),
2736 ],2736 ],
2737 )2737 )
2738 .await;2738 .await;
@@ -2766,10 +2766,10 @@ async fn a_first_sender_with_no_password_is_refused_and_says_why() {
2766 &[2766 &[
2767 ("host", "smtp.fastmail.com"),2767 ("host", "smtp.fastmail.com"),
2768 ("port", "587"),2768 ("port", "587"),
2769- ("username", "izlek"),2769+ ("username", "iz"),
2770 ("password", ""),2770 ("password", ""),
2771- ("from_name", "İzlek"),2771+ ("from_name", "İz"),
2772- ("from_address", "izlek@izlek.sh"),2772+ ("from_address", "iz@iz.sh"),
2773 ],2773 ],
2774 )2774 )
2775 .await;2775 .await;
@@ -2812,12 +2812,12 @@ async fn a_sender_field_that_cannot_work_is_refused_by_name() {
2812 ("username", &[("username", "")], "Give the SMTP username."),2812 ("username", &[("username", "")], "Give the SMTP username."),
2813 (2813 (
2814 "from_address",2814 "from_address",
2815- &[("from_address", "board-at-izlek")],2815+ &[("from_address", "board-at-iz")],
2816 "That is not a from-address.",2816 "That is not a from-address.",
2817 ),2817 ),
2818 (2818 (
2819 "from_address",2819 "from_address",
2820- &[("from_address", "board@izlek")],2820+ &[("from_address", "board@iz")],
2821 "That is not a from-address.",2821 "That is not a from-address.",
2822 ),2822 ),
2823 ];2823 ];
@@ -2825,10 +2825,10 @@ async fn a_sender_field_that_cannot_work_is_refused_by_name() {
2825 let mut form: Vec<(&str, &str)> = vec![2825 let mut form: Vec<(&str, &str)> = vec![
2826 ("host", "smtp.fastmail.com"),2826 ("host", "smtp.fastmail.com"),
2827 ("port", "587"),2827 ("port", "587"),
2828- ("username", "izlek"),2828+ ("username", "iz"),
2829 ("password", SENDER_PASSWORD),2829 ("password", SENDER_PASSWORD),
2830- ("from_name", "İzlek"),2830+ ("from_name", "İz"),
2831- ("from_address", "izlek@izlek.sh"),2831+ ("from_address", "iz@iz.sh"),
2832 ];2832 ];
2833 for (key, value) in *overrides {2833 for (key, value) in *overrides {
2834 for slot in form.iter_mut() {2834 for slot in form.iter_mut() {
@@ -2856,7 +2856,7 @@ async fn a_sender_field_that_cannot_work_is_refused_by_name() {
2856 async fn a_member_may_not_press_the_test_button() {2856 async fn a_member_may_not_press_the_test_button() {
2857 let app = App::open().await;2857 let app = App::open().await;
2858 let admin_cookie = admin(&app).await;2858 let admin_cookie = admin(&app).await;
2859- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2859+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2860 2860
2861 let answer = app.post("/api/send_test_mail", Some(&member), &[]).await;2861 let answer = app.post("/api/send_test_mail", Some(&member), &[]).await;
2862 assert!(2862 assert!(
@@ -2874,7 +2874,7 @@ async fn a_member_may_not_press_the_test_button() {
2874 async fn a_viewer_may_not_press_the_test_button() {2874 async fn a_viewer_may_not_press_the_test_button() {
2875 let app = App::open().await;2875 let app = App::open().await;
2876 let admin_cookie = admin(&app).await;2876 let admin_cookie = admin(&app).await;
2877- let viewer = invited(&app, &admin_cookie, "pinar@izlek.sh", "Pinar", Role::Viewer).await;2877+ let viewer = invited(&app, &admin_cookie, "pinar@iz.sh", "Pinar", Role::Viewer).await;
2878 2878
2879 let answer = app.post("/api/send_test_mail", Some(&viewer), &[]).await;2879 let answer = app.post("/api/send_test_mail", Some(&viewer), &[]).await;
2880 assert!(2880 assert!(
@@ -2934,13 +2934,13 @@ async fn testing_a_sender_that_was_never_filled_in_says_so_rather_than_sending()
2934 async fn a_member_who_posts_a_resend_anyway_is_refused() {2934 async fn a_member_who_posts_a_resend_anyway_is_refused() {
2935 let app = App::open().await;2935 let app = App::open().await;
2936 let admin_cookie = admin(&app).await;2936 let admin_cookie = admin(&app).await;
2937- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;2937+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
2938 let mert = app2938 let mert = app
2939 .post(2939 .post(
2940 "/api/invite_member",2940 "/api/invite_member",
2941 Some(&admin_cookie),2941 Some(&admin_cookie),
2942 &[2942 &[
2943- ("email", "mert@izlek.sh"),2943+ ("email", "mert@iz.sh"),
2944 ("display_name", "Mert"),2944 ("display_name", "Mert"),
2945 ("role", "member"),2945 ("role", "member"),
2946 ],2946 ],
@@ -2954,7 +2954,7 @@ async fn a_member_who_posts_a_resend_anyway_is_refused() {
2954 .await2954 .await
2955 .unwrap()2955 .unwrap()
2956 .into_iter()2956 .into_iter()
2957- .find(|user| user.email == "mert@izlek.sh")2957+ .find(|user| user.email == "mert@iz.sh")
2958 .expect("no member row for mert")2958 .expect("no member row for mert")
2959 .id;2959 .id;
2960 2960
@@ -2990,7 +2990,7 @@ async fn a_resent_link_opens_the_same_account() {
2990 "/api/invite_member",2990 "/api/invite_member",
2991 Some(&admin_cookie),2991 Some(&admin_cookie),
2992 &[2992 &[
2993- ("email", "mert@izlek.sh"),2993+ ("email", "mert@iz.sh"),
2994 ("display_name", "Mert"),2994 ("display_name", "Mert"),
2995 ("role", "member"),2995 ("role", "member"),
2996 ],2996 ],
@@ -3004,7 +3004,7 @@ async fn a_resent_link_opens_the_same_account() {
3004 .await3004 .await
3005 .unwrap()3005 .unwrap()
3006 .into_iter()3006 .into_iter()
3007- .find(|user| user.email == "mert@izlek.sh")3007+ .find(|user| user.email == "mert@iz.sh")
3008 .expect("no member row for mert")3008 .expect("no member row for mert")
3009 .id;3009 .id;
3010 3010
@@ -3020,11 +3020,11 @@ async fn a_resent_link_opens_the_same_account() {
3020 .location3020 .location
3021 .as_deref()3021 .as_deref()
3022 .unwrap_or_default()3022 .unwrap_or_default()
3023- .contains("mailed=mert%40izlek.sh"),3023+ .contains("mailed=mert%40iz.sh"),
3024 "{:?}",3024 "{:?}",
3025 answer.location3025 answer.location
3026 );3026 );
3027- let token = queued_join_token(&app, "mert@izlek.sh").await;3027+ let token = queued_join_token(&app, "mert@iz.sh").await;
3028 3028
3029 let redeemed = app3029 let redeemed = app
3030 .post(3030 .post(
@@ -3053,7 +3053,7 @@ async fn an_admin_may_change_a_members_role_over_http() {
3053 "/api/invite_member",3053 "/api/invite_member",
3054 Some(&admin_cookie),3054 Some(&admin_cookie),
3055 &[3055 &[
3056- ("email", "mert@izlek.sh"),3056+ ("email", "mert@iz.sh"),
3057 ("display_name", "Mert"),3057 ("display_name", "Mert"),
3058 ("role", "member"),3058 ("role", "member"),
3059 ],3059 ],
@@ -3067,7 +3067,7 @@ async fn an_admin_may_change_a_members_role_over_http() {
3067 .await3067 .await
3068 .unwrap()3068 .unwrap()
3069 .into_iter()3069 .into_iter()
3070- .find(|user| user.email == "mert@izlek.sh")3070+ .find(|user| user.email == "mert@iz.sh")
3071 .expect("no member row for mert")3071 .expect("no member row for mert")
3072 .id;3072 .id;
3073 3073
@@ -3133,13 +3133,13 @@ async fn the_owner_cannot_be_retargeted_over_http() {
3133 async fn a_non_admin_may_not_set_roles_over_http() {3133 async fn a_non_admin_may_not_set_roles_over_http() {
3134 let app = App::open().await;3134 let app = App::open().await;
3135 let admin_cookie = admin(&app).await;3135 let admin_cookie = admin(&app).await;
3136- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;3136+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
3137 let mert = app3137 let mert = app
3138 .post(3138 .post(
3139 "/api/invite_member",3139 "/api/invite_member",
3140 Some(&admin_cookie),3140 Some(&admin_cookie),
3141 &[3141 &[
3142- ("email", "mert@izlek.sh"),3142+ ("email", "mert@iz.sh"),
3143 ("display_name", "Mert"),3143 ("display_name", "Mert"),
3144 ("role", "member"),3144 ("role", "member"),
3145 ],3145 ],
@@ -3153,7 +3153,7 @@ async fn a_non_admin_may_not_set_roles_over_http() {
3153 .await3153 .await
3154 .unwrap()3154 .unwrap()
3155 .into_iter()3155 .into_iter()
3156- .find(|user| user.email == "mert@izlek.sh")3156+ .find(|user| user.email == "mert@iz.sh")
3157 .expect("no member row for mert")3157 .expect("no member row for mert")
3158 .id;3158 .id;
3159 3159
@@ -3190,19 +3190,19 @@ async fn redeeming_a_link_lands_on_the_board_not_the_spent_join_page() {
3190 "/api/invite_member",3190 "/api/invite_member",
3191 Some(&admin_cookie),3191 Some(&admin_cookie),
3192 &[3192 &[
3193- ("email", "asli@izlek.sh"),3193+ ("email", "asli@iz.sh"),
3194 ("display_name", "Asli"),3194 ("display_name", "Asli"),
3195 ("role", "member"),3195 ("role", "member"),
3196 ],3196 ],
3197 )3197 )
3198 .await;3198 .await;
3199- let token = queued_join_token(&app, "asli@izlek.sh").await;3199+ let token = queued_join_token(&app, "asli@iz.sh").await;
3200 3200
3201 let answer = app3201 let answer = app
3202 .post_without_script(3202 .post_without_script(
3203 "/api/redeem_link",3203 "/api/redeem_link",
3204 None,3204 None,
3205- &format!("http://izlek.test/join/{token}"),3205+ &format!("http://iz.test/join/{token}"),
3206 &[3206 &[
3207 ("token", &token),3207 ("token", &token),
3208 ("password", "lantern gravel spoon meadow"),3208 ("password", "lantern gravel spoon meadow"),
@@ -3227,14 +3227,14 @@ async fn an_invitation_names_the_admin_who_made_it_and_not_the_invitee() {
3227 "/api/invite_member",3227 "/api/invite_member",
3228 Some(&admin_cookie),3228 Some(&admin_cookie),
3229 &[3229 &[
3230- ("email", "grace@izlek.sh"),3230+ ("email", "grace@iz.sh"),
3231 ("display_name", "Grace Hopper"),3231 ("display_name", "Grace Hopper"),
3232 ("role", "member"),3232 ("role", "member"),
3233 ],3233 ],
3234 )3234 )
3235 .await;3235 .await;
3236 assert_eq!(answer.status, StatusCode::OK, "{}", answer.body);3236 assert_eq!(answer.status, StatusCode::OK, "{}", answer.body);
3237- let token = queued_join_token(&app, "grace@izlek.sh").await;3237+ let token = queued_join_token(&app, "grace@iz.sh").await;
3238 3238
3239 let answer = app3239 let answer = app
3240 .post("/api/invitation", None, &[("token", token.as_str())])3240 .post("/api/invitation", None, &[("token", token.as_str())])
@@ -3274,7 +3274,7 @@ async fn a_member_is_told_nothing_about_the_sender() {
3274 let app = App::open().await;3274 let app = App::open().await;
3275 let admin_cookie = admin(&app).await;3275 let admin_cookie = admin(&app).await;
3276 assert!(sender_saved(&app, &admin_cookie).await);3276 assert!(sender_saved(&app, &admin_cookie).await);
3277- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;3277+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
3278 3278
3279 let page = app.get("/settings", Some(&member)).await;3279 let page = app.get("/settings", Some(&member)).await;
3280 assert_eq!(page.status, StatusCode::OK);3280 assert_eq!(page.status, StatusCode::OK);
@@ -3295,7 +3295,7 @@ async fn an_admin_sees_the_sender_and_never_a_password() {
3295 assert_eq!(page.status, StatusCode::OK);3295 assert_eq!(page.status, StatusCode::OK);
3296 let html = String::from_utf8_lossy(&page.bytes);3296 let html = String::from_utf8_lossy(&page.bytes);
3297 assert!(html.contains("smtp.fastmail.com"), "{html}");3297 assert!(html.contains("smtp.fastmail.com"), "{html}");
3298- assert!(html.contains("izlek@izlek.sh"), "{html}");3298+ assert!(html.contains("iz@iz.sh"), "{html}");
3299 // Saved in full, and nobody has dialled the server — this router has no3299 // Saved in full, and nobody has dialled the server — this router has no
3300 // mail engine at all. "Connected" would be a claim about a handshake that3300 // mail engine at all. "Connected" would be a claim about a handshake that
3301 // never happened, which is the whole reason the chip has four states.3301 // never happened, which is the whole reason the chip has four states.
@@ -3311,27 +3311,27 @@ async fn an_admin_sees_the_sender_and_never_a_password() {
3311 async fn a_member_is_not_sent_the_member_list() {3311 async fn a_member_is_not_sent_the_member_list() {
3312 let app = App::open().await;3312 let app = App::open().await;
3313 let admin_cookie = admin(&app).await;3313 let admin_cookie = admin(&app).await;
3314- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;3314+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
3315- let _ = invited(&app, &admin_cookie, "quiet@izlek.sh", "Quiet", Role::Viewer).await;3315+ let _ = invited(&app, &admin_cookie, "quiet@iz.sh", "Quiet", Role::Viewer).await;
3316 3316
3317 let page = app.get("/settings", Some(&member)).await;3317 let page = app.get("/settings", Some(&member)).await;
3318 let html = String::from_utf8_lossy(&page.bytes);3318 let html = String::from_utf8_lossy(&page.bytes);
3319 assert!(!html.contains("member-table"), "{html}");3319 assert!(!html.contains("member-table"), "{html}");
3320- assert!(!html.contains("quiet@izlek.sh"), "{html}");3320+ assert!(!html.contains("quiet@iz.sh"), "{html}");
3321 }3321 }
3322 3322
3323 #[tokio::test]3323 #[tokio::test]
3324 async fn an_admin_sees_who_has_a_password_and_never_a_hash() {3324 async fn an_admin_sees_who_has_a_password_and_never_a_hash() {
3325 let app = App::open().await;3325 let app = App::open().await;
3326 let admin_cookie = admin(&app).await;3326 let admin_cookie = admin(&app).await;
3327- let _ = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;3327+ let _ = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
3328 // Invited and never signed in: the account exists, the password does not.3328 // Invited and never signed in: the account exists, the password does not.
3329 let answer = app3329 let answer = app
3330 .post(3330 .post(
3331 "/api/invite_member",3331 "/api/invite_member",
3332 Some(&admin_cookie),3332 Some(&admin_cookie),
3333 &[3333 &[
3334- ("email", "mert@izlek.sh"),3334+ ("email", "mert@iz.sh"),
3335 ("display_name", "Mert"),3335 ("display_name", "Mert"),
3336 ("role", "member"),3336 ("role", "member"),
3337 ],3337 ],
@@ -3343,7 +3343,7 @@ async fn an_admin_sees_who_has_a_password_and_never_a_hash() {
3343 .get("/settings?section=members", Some(&admin_cookie))3343 .get("/settings?section=members", Some(&admin_cookie))
3344 .await;3344 .await;
3345 let html = String::from_utf8_lossy(&page.bytes);3345 let html = String::from_utf8_lossy(&page.bytes);
3346- assert!(html.contains("mert@izlek.sh"), "{html}");3346+ assert!(html.contains("mert@iz.sh"), "{html}");
3347 assert!(3347 assert!(
3348 html.contains("Resend mail"),3348 html.contains("Resend mail"),
3349 "the un-signed-in member has no resend control: {html}"3349 "the un-signed-in member has no resend control: {html}"
@@ -3618,8 +3618,8 @@ async fn only_an_admin_may_read_or_write_the_rules() {
3618 assert!(rule_written(&app, &admin_cookie, &column, "Task completed").await);3618 assert!(rule_written(&app, &admin_cookie, &column, "Task completed").await);
3619 let rule = only_rule(&app, &admin_cookie).await;3619 let rule = only_rule(&app, &admin_cookie).await;
3620 3620
3621- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;3621+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
3622- let viewer = invited(&app, &admin_cookie, "pinar@izlek.sh", "Pinar", Role::Viewer).await;3622+ let viewer = invited(&app, &admin_cookie, "pinar@iz.sh", "Pinar", Role::Viewer).await;
3623 3623
3624 for who in [&member, &viewer] {3624 for who in [&member, &viewer] {
3625 let read = app.post("/api/current_rules", Some(who), &[]).await;3625 let read = app.post("/api/current_rules", Some(who), &[]).await;
@@ -3796,7 +3796,7 @@ async fn a_viewer_who_posts_an_upload_anyway_is_refused() {
3796 let viewer = invited(3796 let viewer = invited(
3797 &app,3797 &app,
3798 &admin_cookie,3798 &admin_cookie,
3799- "quiet@izlek.sh",3799+ "quiet@iz.sh",
3800 "Quiet Reader",3800 "Quiet Reader",
3801 Role::Viewer,3801 Role::Viewer,
3802 )3802 )
@@ -3826,7 +3826,7 @@ async fn a_member_uploads_a_file_and_the_chip_comes_back() {
3826 let member = invited(3826 let member = invited(
3827 &app,3827 &app,
3828 &admin_cookie,3828 &admin_cookie,
3829- "mo@izlek.sh",3829+ "mo@iz.sh",
3830 "Mo Dubois",3830 "Mo Dubois",
3831 Role::Member,3831 Role::Member,
3832 )3832 )
@@ -4087,7 +4087,7 @@ async fn the_viewer_renders_in_page_for_a_renderable_file_and_ignores_a_foreign_
4087 "no viewer overlay in the page: {html}"4087 "no viewer overlay in the page: {html}"
4088 );4088 );
4089 assert!(4089 assert!(
4090- html.contains("__izlekEsc.register(90"),4090+ html.contains("__izEsc.register(90"),
4091 "no viewer escape resolver in the page: {html}"4091 "no viewer escape resolver in the page: {html}"
4092 );4092 );
4093 assert!(4093 assert!(
@@ -4419,8 +4419,8 @@ async fn an_upload_without_a_file_is_refused() {
4419 async fn only_the_uploader_or_an_admin_may_delete_a_file() {4419 async fn only_the_uploader_or_an_admin_may_delete_a_file() {
4420 let app = App::open().await;4420 let app = App::open().await;
4421 let admin_cookie = admin(&app).await;4421 let admin_cookie = admin(&app).await;
4422- let member_a = invited(&app, &admin_cookie, "asha@izlek.sh", "Asha", Role::Member).await;4422+ let member_a = invited(&app, &admin_cookie, "asha@iz.sh", "Asha", Role::Member).await;
4423- let member_b = invited(&app, &admin_cookie, "beau@izlek.sh", "Beau", Role::Member).await;4423+ let member_b = invited(&app, &admin_cookie, "beau@iz.sh", "Beau", Role::Member).await;
4424 let column = first_column(&app).await;4424 let column = first_column(&app).await;
4425 let task = a_task(&app, &admin_cookie, &column, "Two uploaders, one task").await;4425 let task = a_task(&app, &admin_cookie, &column, "Two uploaders, one task").await;
4426 4426
@@ -4530,8 +4530,8 @@ async fn until_logs_contains(app: &App, admin: &str, needle: &str) -> String {
4530 async fn only_an_admin_may_read_the_logs() {4530 async fn only_an_admin_may_read_the_logs() {
4531 let app = App::open().await;4531 let app = App::open().await;
4532 let admin_cookie = admin(&app).await;4532 let admin_cookie = admin(&app).await;
4533- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;4533+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
4534- let viewer = invited(&app, &admin_cookie, "pinar@izlek.sh", "Pinar", Role::Viewer).await;4534+ let viewer = invited(&app, &admin_cookie, "pinar@iz.sh", "Pinar", Role::Viewer).await;
4535 4535
4536 for who in [&member, &viewer] {4536 for who in [&member, &viewer] {
4537 let read = app.post("/api/current_logs", Some(who), &[]).await;4537 let read = app.post("/api/current_logs", Some(who), &[]).await;
@@ -4546,7 +4546,7 @@ async fn only_an_admin_may_read_the_logs() {
4546 async fn an_admin_reads_the_logs() {4546 async fn an_admin_reads_the_logs() {
4547 let app = App::open_with_mail().await;4547 let app = App::open_with_mail().await;
4548 let admin_cookie = admin(&app).await;4548 let admin_cookie = admin(&app).await;
4549- let mate = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;4549+ let mate = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
4550 let columns = columns_of(&app).await;4550 let columns = columns_of(&app).await;
4551 let task = a_task(&app, &admin_cookie, &columns[0], "Ship it").await;4551 let task = a_task(&app, &admin_cookie, &columns[0], "Ship it").await;
4552 let mate_id = person_id(&app, &admin_cookie, &task, "Emre").await;4552 let mate_id = person_id(&app, &admin_cookie, &task, "Emre").await;
@@ -4617,7 +4617,7 @@ async fn an_admin_reads_the_logs() {
4617 // No sender means the send is held, not sent — the ledger stores that as4617 // No sender means the send is held, not sent — the ledger stores that as
4618 // a failure with nothing spent, and the queue names the truth: held.4618 // a failure with nothing spent, and the queue names the truth: held.
4619 let snapshot =4619 let snapshot =
4620- until_logs_contains(&app, &admin_cookie, "\"recipient\":\"emre@izlek.sh\"").await;4620+ until_logs_contains(&app, &admin_cookie, "\"recipient\":\"emre@iz.sh\"").await;
4621 assert!(snapshot.contains("\"state\":\"held\""), "{}", snapshot);4621 assert!(snapshot.contains("\"state\":\"held\""), "{}", snapshot);
4622 assert!(snapshot.contains("\"attempts\":0"), "{}", snapshot);4622 assert!(snapshot.contains("\"attempts\":0"), "{}", snapshot);
4623 }4623 }
@@ -4922,7 +4922,7 @@ async fn an_unlisted_ui_is_refused() {
4922 async fn creating_a_task_into_a_ruled_column_owes_mail() {4922 async fn creating_a_task_into_a_ruled_column_owes_mail() {
4923 let app = App::open_with_mail().await;4923 let app = App::open_with_mail().await;
4924 let admin_cookie = admin(&app).await;4924 let admin_cookie = admin(&app).await;
4925- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;4925+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
4926 let column = first_column(&app).await;4926 let column = first_column(&app).await;
4927 4927
4928 let written = app4928 let written = app
@@ -4951,8 +4951,8 @@ async fn creating_a_task_into_a_ruled_column_owes_mail() {
4951 .await;4951 .await;
4952 assert_eq!(created.body, "", "the task was refused: {}", created.body);4952 assert_eq!(created.body, "", "the task was refused: {}", created.body);
4953 4953
4954- let send = until_rule_send_to(&app, &rule, "ada@izlek.sh", 0).await;4954+ let send = until_rule_send_to(&app, &rule, "ada@iz.sh", 0).await;
4955- assert_eq!(send.recipient, "ada@izlek.sh");4955+ assert_eq!(send.recipient, "ada@iz.sh");
4956 }4956 }
4957 4957
4958 #[tokio::test]4958 #[tokio::test]
@@ -4985,7 +4985,7 @@ async fn the_topbar_nav_marks_the_active_page() {
4985 // The settings rail keeps the panels' admin gating: a member sees only4985 // The settings rail keeps the panels' admin gating: a member sees only
4986 // the Profile link, and an admin-only section in the query still renders4986 // the Profile link, and an admin-only section in the query still renders
4987 // Profile rather than the panel it asked for.4987 // Profile rather than the panel it asked for.
4988- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;4988+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
4989 let page = app.get("/settings", Some(&member)).await;4989 let page = app.get("/settings", Some(&member)).await;
4990 let html = String::from_utf8_lossy(&page.bytes);4990 let html = String::from_utf8_lossy(&page.bytes);
4991 assert!(4991 assert!(
@@ -5021,7 +5021,7 @@ async fn a_password_change_carries_its_own_refusal_and_a_saved_note() {
5021 .post_without_script(5021 .post_without_script(
5022 "/api/change_password",5022 "/api/change_password",
5023 Some(&admin_cookie),5023 Some(&admin_cookie),
5024- "http://izlek.test/settings?section=profile",5024+ "http://iz.test/settings?section=profile",
5025 &[5025 &[
5026 ("current", "not the password"),5026 ("current", "not the password"),
5027 ("new", "a whole new passphrase"),5027 ("new", "a whole new passphrase"),
@@ -5042,7 +5042,7 @@ async fn a_password_change_carries_its_own_refusal_and_a_saved_note() {
5042 .post_without_script(5042 .post_without_script(
5043 "/api/change_password",5043 "/api/change_password",
5044 Some(&admin_cookie),5044 Some(&admin_cookie),
5045- "http://izlek.test/settings?section=profile",5045+ "http://iz.test/settings?section=profile",
5046 &[5046 &[
5047 ("current", "correct horse battery staple"),5047 ("current", "correct horse battery staple"),
5048 ("new", "a whole new passphrase"),5048 ("new", "a whole new passphrase"),
@@ -5070,11 +5070,11 @@ async fn until_rule_send_to(
5070 rule_id: &str,5070 rule_id: &str,
5071 recipient: &str,5071 recipient: &str,
5072 already: usize,5072 already: usize,
5073-) -> izlek_core::store::MailSend {5073+) -> iz_core::store::MailSend {
5074 for _ in 0..500 {5074 for _ in 0..500 {
5075 let matching: Vec<_> = app5075 let matching: Vec<_> = app
5076 .store5076 .store
5077- .mail_queue(50, izlek_core::store::FeedPage::Newest)5077+ .mail_queue(50, iz_core::store::FeedPage::Newest)
5078 .await5078 .await
5079 .unwrap()5079 .unwrap()
5080 .into_iter()5080 .into_iter()
@@ -5100,7 +5100,7 @@ async fn until_rule_send_to(
5100 async fn a_rule_rides_every_event_and_can_be_rewritten() {5100 async fn a_rule_rides_every_event_and_can_be_rewritten() {
5101 let app = App::open_with_mail().await;5101 let app = App::open_with_mail().await;
5102 let admin_cookie = admin(&app).await;5102 let admin_cookie = admin(&app).await;
5103- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;5103+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
5104 let column = first_column(&app).await;5104 let column = first_column(&app).await;
5105 let task = a_task(&app, &admin_cookie, &column, "Ship the picker").await;5105 let task = a_task(&app, &admin_cookie, &column, "Ship the picker").await;
5106 5106
@@ -5129,29 +5129,29 @@ async fn a_rule_rides_every_event_and_can_be_rewritten() {
5129 .await;5129 .await;
5130 assert_eq!(commented.body, "null", "{}", commented.body);5130 assert_eq!(commented.body, "null", "{}", commented.body);
5131 5131
5132- let send = until_rule_send_to(&app, &rule, "ada@izlek.sh", 0).await;5132+ let send = until_rule_send_to(&app, &rule, "ada@iz.sh", 0).await;
5133- assert_eq!(send.recipient, "ada@izlek.sh");5133+ assert_eq!(send.recipient, "ada@iz.sh");
5134 assert!(5134 assert!(
5135 app.store5135 app.store
5136- .mail_queue(50, izlek_core::store::FeedPage::Newest)5136+ .mail_queue(50, iz_core::store::FeedPage::Newest)
5137 .await5137 .await
5138 .unwrap()5138 .unwrap()
5139 .iter()5139 .iter()
5140 .all(|send| {5140 .all(|send| {
5141 !(send.kind == SendKind::Rule5141 !(send.kind == SendKind::Rule
5142 && send.rule_id.as_deref() == Some(rule.as_str())5142 && send.rule_id.as_deref() == Some(rule.as_str())
5143- && send.recipient == "deniz@izlek.sh")5143+ && send.recipient == "deniz@iz.sh")
5144 }),5144 }),
5145 "the commenter was mailed instead of the creator"5145 "the commenter was mailed instead of the creator"
5146 );5146 );
5147 let decisions = app5147 let decisions = app
5148 .store5148 .store
5149- .recent_mail_decisions(50, izlek_core::store::FeedPage::Newest)5149+ .recent_mail_decisions(50, iz_core::store::FeedPage::Newest)
5150 .await5150 .await
5151 .unwrap();5151 .unwrap();
5152 assert!(5152 assert!(
5153 decisions.iter().any(|decision| decision.rule_id == rule5153 decisions.iter().any(|decision| decision.rule_id == rule
5154- && matches!(decision.outcome, izlek_core::store::MailOutcome::Owed)),5154+ && matches!(decision.outcome, iz_core::store::MailOutcome::Owed)),
5155 "the decisions ledger has no matched decision for the rule"5155 "the decisions ledger has no matched decision for the rule"
5156 );5156 );
5157 5157
@@ -5217,14 +5217,14 @@ async fn a_rule_rides_every_event_and_can_be_rewritten() {
5217 // addresses the assignee — the admin — not the member who renamed it.5217 // addresses the assignee — the admin — not the member who renamed it.
5218 let already = app5218 let already = app
5219 .store5219 .store
5220- .mail_queue(50, izlek_core::store::FeedPage::Newest)5220+ .mail_queue(50, iz_core::store::FeedPage::Newest)
5221 .await5221 .await
5222 .unwrap()5222 .unwrap()
5223 .iter()5223 .iter()
5224 .filter(|send| {5224 .filter(|send| {
5225 send.kind == SendKind::Rule5225 send.kind == SendKind::Rule
5226 && send.rule_id.as_deref() == Some(rule.as_str())5226 && send.rule_id.as_deref() == Some(rule.as_str())
5227- && send.recipient == "ada@izlek.sh"5227+ && send.recipient == "ada@iz.sh"
5228 })5228 })
5229 .count();5229 .count();
5230 let renamed = app5230 let renamed = app
@@ -5236,23 +5236,23 @@ async fn a_rule_rides_every_event_and_can_be_rewritten() {
5236 .await;5236 .await;
5237 assert_eq!(renamed.body, "null", "{}", renamed.body);5237 assert_eq!(renamed.body, "null", "{}", renamed.body);
5238 5238
5239- until_rule_send_to(&app, &rule, "ada@izlek.sh", already).await;5239+ until_rule_send_to(&app, &rule, "ada@iz.sh", already).await;
5240 assert!(5240 assert!(
5241 app.store5241 app.store
5242- .mail_queue(50, izlek_core::store::FeedPage::Newest)5242+ .mail_queue(50, iz_core::store::FeedPage::Newest)
5243 .await5243 .await
5244 .unwrap()5244 .unwrap()
5245 .iter()5245 .iter()
5246 .all(|send| {5246 .all(|send| {
5247 !(send.kind == SendKind::Rule5247 !(send.kind == SendKind::Rule
5248 && send.rule_id.as_deref() == Some(rule.as_str())5248 && send.rule_id.as_deref() == Some(rule.as_str())
5249- && send.recipient == "deniz@izlek.sh")5249+ && send.recipient == "deniz@iz.sh")
5250 }),5250 }),
5251 "the renamer was mailed instead of being excluded as the actor"5251 "the renamer was mailed instead of being excluded as the actor"
5252 );5252 );
5253 5253
5254 let logs = until_logs_contains(&app, &admin_cookie, "\"subject\":\"Renamed\"").await;5254 let logs = until_logs_contains(&app, &admin_cookie, "\"subject\":\"Renamed\"").await;
5255- assert!(logs.contains("\"recipient\":\"ada@izlek.sh\""), "{}", logs);5255+ assert!(logs.contains("\"recipient\":\"ada@iz.sh\""), "{}", logs);
5256 }5256 }
5257 5257
5258 // `?task=X&new=1` together used to render both modals at once — two5258 // `?task=X&new=1` together used to render both modals at once — two
@@ -5306,7 +5306,7 @@ async fn the_new_task_modal_opens_from_the_board_and_creates_into_the_chosen_col
5306 .post_without_script(5306 .post_without_script(
5307 "/api/create_task",5307 "/api/create_task",
5308 Some(&admin),5308 Some(&admin),
5309- "http://izlek.test/?new=1",5309+ "http://iz.test/?new=1",
5310 &[("title", "Ship it, no script"), ("column_id", &column)],5310 &[("title", "Ship it, no script"), ("column_id", &column)],
5311 )5311 )
5312 .await;5312 .await;
@@ -5318,7 +5318,7 @@ async fn the_new_task_modal_opens_from_the_board_and_creates_into_the_chosen_col
5318 );5318 );
5319 5319
5320 let workspace_id = app.workspace_id().await;5320 let workspace_id = app.workspace_id().await;
5321- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)5321+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
5322 .await5322 .await
5323 .unwrap()5323 .unwrap()
5324 .unwrap();5324 .unwrap();
@@ -5361,7 +5361,7 @@ async fn user_id(app: &App, email: &str) -> String {
5361 async fn a_profile_photo_round_trips_back_as_the_same_bytes() {5361 async fn a_profile_photo_round_trips_back_as_the_same_bytes() {
5362 let app = App::open().await;5362 let app = App::open().await;
5363 let admin = admin(&app).await;5363 let admin = admin(&app).await;
5364- let admin_id = user_id(&app, "ada@izlek.sh").await;5364+ let admin_id = user_id(&app, "ada@iz.sh").await;
5365 5365
5366 let answer = app5366 let answer = app
5367 .post_multipart(5367 .post_multipart(
@@ -5389,7 +5389,7 @@ async fn a_profile_photo_round_trips_back_as_the_same_bytes() {
5389 async fn text_uploaded_as_a_photo_is_refused_and_stores_nothing() {5389 async fn text_uploaded_as_a_photo_is_refused_and_stores_nothing() {
5390 let app = App::open().await;5390 let app = App::open().await;
5391 let admin = admin(&app).await;5391 let admin = admin(&app).await;
5392- let admin_id = user_id(&app, "ada@izlek.sh").await;5392+ let admin_id = user_id(&app, "ada@iz.sh").await;
5393 5393
5394 let answer = app5394 let answer = app
5395 .post_multipart(5395 .post_multipart(
@@ -5415,7 +5415,7 @@ async fn text_uploaded_as_a_photo_is_refused_and_stores_nothing() {
5415 async fn a_photo_over_the_workspace_limit_is_refused_and_stores_nothing() {5415 async fn a_photo_over_the_workspace_limit_is_refused_and_stores_nothing() {
5416 let app = App::open().await;5416 let app = App::open().await;
5417 let admin = admin(&app).await;5417 let admin = admin(&app).await;
5418- let admin_id = user_id(&app, "ada@izlek.sh").await;5418+ let admin_id = user_id(&app, "ada@iz.sh").await;
5419 // The transport caps request bodies at 2 MiB (topcoat's default body5419 // The transport caps request bodies at 2 MiB (topcoat's default body
5420 // limit), exactly a fresh workspace's photo limit, so against the shipped5420 // limit), exactly a fresh workspace's photo limit, so against the shipped
5421 // defaults the handler's own check can never fire. The admin lowers the5421 // defaults the handler's own check can never fire. The admin lowers the
@@ -5476,8 +5476,8 @@ async fn a_photo_over_the_workspace_limit_is_refused_and_stores_nothing() {
5476 async fn a_photo_is_visible_to_other_workspace_members() {5476 async fn a_photo_is_visible_to_other_workspace_members() {
5477 let app = App::open().await;5477 let app = App::open().await;
5478 let admin = admin(&app).await;5478 let admin = admin(&app).await;
5479- let admin_id = user_id(&app, "ada@izlek.sh").await;5479+ let admin_id = user_id(&app, "ada@iz.sh").await;
5480- let member = invited(&app, &admin, "deniz@izlek.sh", "Deniz", Role::Member).await;5480+ let member = invited(&app, &admin, "deniz@iz.sh", "Deniz", Role::Member).await;
5481 5481
5482 let answer = app5482 let answer = app
5483 .post_multipart(5483 .post_multipart(
@@ -5505,7 +5505,7 @@ async fn a_photo_is_visible_to_other_workspace_members() {
5505 async fn an_unknown_photo_id_is_not_found_and_the_photo_revalidates_by_etag() {5505 async fn an_unknown_photo_id_is_not_found_and_the_photo_revalidates_by_etag() {
5506 let app = App::open().await;5506 let app = App::open().await;
5507 let admin = admin(&app).await;5507 let admin = admin(&app).await;
5508- let admin_id = user_id(&app, "ada@izlek.sh").await;5508+ let admin_id = user_id(&app, "ada@iz.sh").await;
5509 5509
5510 let answer = app5510 let answer = app
5511 .post_multipart(5511 .post_multipart(
@@ -5541,7 +5541,7 @@ async fn an_unknown_photo_id_is_not_found_and_the_photo_revalidates_by_etag() {
5541 async fn a_replaced_photo_moves_the_avatar_url_stamp() {5541 async fn a_replaced_photo_moves_the_avatar_url_stamp() {
5542 let app = App::open().await;5542 let app = App::open().await;
5543 let admin = admin(&app).await;5543 let admin = admin(&app).await;
5544- let admin_id = user_id(&app, "ada@izlek.sh").await;5544+ let admin_id = user_id(&app, "ada@iz.sh").await;
5545 5545
5546 app.post_multipart(5546 app.post_multipart(
5547 "/api/profile_photo",5547 "/api/profile_photo",
@@ -5586,7 +5586,7 @@ fn avatar_stamp(html: &str, user_id: &str) -> Option<i64> {
5586 async fn the_nav_hides_rules_and_logs_from_a_member() {5586 async fn the_nav_hides_rules_and_logs_from_a_member() {
5587 let app = App::open().await;5587 let app = App::open().await;
5588 let admin = admin(&app).await;5588 let admin = admin(&app).await;
5589- let member = invited(&app, &admin, "deniz@izlek.sh", "Deniz", Role::Member).await;5589+ let member = invited(&app, &admin, "deniz@iz.sh", "Deniz", Role::Member).await;
5590 5590
5591 let admin_board = app.get("/", Some(&admin)).await;5591 let admin_board = app.get("/", Some(&admin)).await;
5592 let admin_html = String::from_utf8_lossy(&admin_board.bytes).into_owned();5592 let admin_html = String::from_utf8_lossy(&admin_board.bytes).into_owned();
@@ -5606,7 +5606,7 @@ async fn the_nav_hides_rules_and_logs_from_a_member() {
5606 async fn account_events_ride_the_activity_feed() {5606 async fn account_events_ride_the_activity_feed() {
5607 let app = App::open().await;5607 let app = App::open().await;
5608 let admin_cookie = admin(&app).await;5608 let admin_cookie = admin(&app).await;
5609- invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;5609+ invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
5610 let columns = columns_of(&app).await;5610 let columns = columns_of(&app).await;
5611 a_task(&app, &admin_cookie, &columns[0], "Ship it").await;5611 a_task(&app, &admin_cookie, &columns[0], "Ship it").await;
5612 5612
@@ -5615,14 +5615,14 @@ async fn account_events_ride_the_activity_feed() {
5615 "/api/sign_in",5615 "/api/sign_in",
5616 None,5616 None,
5617 &[5617 &[
5618- ("email", "ada@izlek.sh"),5618+ ("email", "ada@iz.sh"),
5619 ("password", "correct horse battery staple"),5619 ("password", "correct horse battery staple"),
5620 ],5620 ],
5621 )5621 )
5622 .await;5622 .await;
5623 let admin_cookie = fresh.session.expect("signing in set no session cookie");5623 let admin_cookie = fresh.session.expect("signing in set no session cookie");
5624 5624
5625- let body = until_logs_contains(&app, &admin_cookie, "invited emre@izlek.sh").await;5625+ let body = until_logs_contains(&app, &admin_cookie, "invited emre@iz.sh").await;
5626 assert!(body.contains("signed in"), "{body}");5626 assert!(body.contains("signed in"), "{body}");
5627 assert!(body.contains("claimed the workspace"), "{body}");5627 assert!(body.contains("claimed the workspace"), "{body}");
5628 assert!(body.contains("\"sentence\":\"joined\""), "{body}");5628 assert!(body.contains("\"sentence\":\"joined\""), "{body}");
@@ -5651,14 +5651,14 @@ fn extract_href<'h>(html: &'h str, contains: &str) -> &'h str {
5651 async fn the_logs_page_pages_past_the_truncation() {5651 async fn the_logs_page_pages_past_the_truncation() {
5652 let app = App::open().await;5652 let app = App::open().await;
5653 let admin_cookie = admin(&app).await;5653 let admin_cookie = admin(&app).await;
5654- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;5654+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
5655 5655
5656 let t0 = time::OffsetDateTime::now_utc();5656 let t0 = time::OffsetDateTime::now_utc();
5657 for i in 0..60 {5657 for i in 0..60 {
5658 app.store5658 app.store
5659 .record_event(5659 .record_event(
5660 None,5660 None,
5661- &izlek_core::detail::ActivityKind::Other("row".to_string()),5661+ &iz_core::detail::ActivityKind::Other("row".to_string()),
5662 &format!("row {i}"),5662 &format!("row {i}"),
5663 t0 + time::Duration::seconds(i),5663 t0 + time::Duration::seconds(i),
5664 )5664 )
@@ -5718,9 +5718,9 @@ async fn the_logs_page_pages_past_the_truncation() {
5718 async fn the_activity_filter_narrows_and_the_position_note_counts_the_match() {5718 async fn the_activity_filter_narrows_and_the_position_note_counts_the_match() {
5719 let app = App::open().await;5719 let app = App::open().await;
5720 let admin_cookie = admin(&app).await;5720 let admin_cookie = admin(&app).await;
5721- let admin_id = user_id(&app, "ada@izlek.sh").await;5721+ let admin_id = user_id(&app, "ada@iz.sh").await;
5722- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;5722+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
5723- let member_id = user_id(&app, "deniz@izlek.sh").await;5723+ let member_id = user_id(&app, "deniz@iz.sh").await;
5724 5724
5725 let t0 = time::OffsetDateTime::now_utc();5725 let t0 = time::OffsetDateTime::now_utc();
5726 for i in 0..60 {5726 for i in 0..60 {
@@ -5732,7 +5732,7 @@ async fn the_activity_filter_narrows_and_the_position_note_counts_the_match() {
5732 app.store5732 app.store
5733 .record_event(5733 .record_event(
5734 actor,5734 actor,
5735- &izlek_core::detail::ActivityKind::Other("row".to_string()),5735+ &iz_core::detail::ActivityKind::Other("row".to_string()),
5736 &format!("row {i}"),5736 &format!("row {i}"),
5737 t0 + time::Duration::seconds(i),5737 t0 + time::Duration::seconds(i),
5738 )5738 )
@@ -5792,7 +5792,7 @@ async fn the_kind_filter_shows_only_that_kinds_rows() {
5792 app.store5792 app.store
5793 .record_event(5793 .record_event(
5794 None,5794 None,
5795- &izlek_core::detail::ActivityKind::Created,5795+ &iz_core::detail::ActivityKind::Created,
5796 "",5796 "",
5797 t0 + time::Duration::seconds(i),5797 t0 + time::Duration::seconds(i),
5798 )5798 )
@@ -5803,7 +5803,7 @@ async fn the_kind_filter_shows_only_that_kinds_rows() {
5803 app.store5803 app.store
5804 .record_event(5804 .record_event(
5805 None,5805 None,
5806- &izlek_core::detail::ActivityKind::Commented,5806+ &iz_core::detail::ActivityKind::Commented,
5807 "",5807 "",
5808 t0 + time::Duration::seconds(100 + i),5808 t0 + time::Duration::seconds(100 + i),
5809 )5809 )
@@ -5912,7 +5912,7 @@ async fn the_day_filter_keeps_only_that_days_rows() {
5912 app.store5912 app.store
5913 .record_event(5913 .record_event(
5914 None,5914 None,
5915- &izlek_core::detail::ActivityKind::Other("row".to_string()),5915+ &iz_core::detail::ActivityKind::Other("row".to_string()),
5916 &format!("today-row {i}"),5916 &format!("today-row {i}"),
5917 today + time::Duration::seconds(i),5917 today + time::Duration::seconds(i),
5918 )5918 )
@@ -5923,7 +5923,7 @@ async fn the_day_filter_keeps_only_that_days_rows() {
5923 app.store5923 app.store
5924 .record_event(5924 .record_event(
5925 None,5925 None,
5926- &izlek_core::detail::ActivityKind::Other("row".to_string()),5926+ &iz_core::detail::ActivityKind::Other("row".to_string()),
5927 &format!("old-row {i}"),5927 &format!("old-row {i}"),
5928 two_days_ago + time::Duration::seconds(i),5928 two_days_ago + time::Duration::seconds(i),
5929 )5929 )
@@ -5963,7 +5963,7 @@ async fn the_range_filter_keeps_the_inclusive_span() {
5963 app.store5963 app.store
5964 .record_event(5964 .record_event(
5965 None,5965 None,
5966- &izlek_core::detail::ActivityKind::Other("row".to_string()),5966+ &iz_core::detail::ActivityKind::Other("row".to_string()),
5967 &format!("day{i}-row"),5967 &format!("day{i}-row"),
5968 day,5968 day,
5969 )5969 )
@@ -6058,7 +6058,7 @@ async fn the_older_href_round_trips_the_range_filter() {
6058 app.store6058 app.store
6059 .record_event(6059 .record_event(
6060 None,6060 None,
6061- &izlek_core::detail::ActivityKind::Other("row".to_string()),6061+ &iz_core::detail::ActivityKind::Other("row".to_string()),
6062 &format!("row {i}"),6062 &format!("row {i}"),
6063 t0 + time::Duration::seconds(i),6063 t0 + time::Duration::seconds(i),
6064 )6064 )
@@ -6081,7 +6081,7 @@ async fn the_older_href_round_trips_the_range_filter() {
6081 assert!(older_href.contains(&format!("to={to}")), "{older_href}");6081 assert!(older_href.contains(&format!("to={to}")), "{older_href}");
6082 }6082 }
6083 6083
6084-/// The `izlek_rows_activity` cookie the page's own fit script sets caps the6084+/// The `iz_rows_activity` cookie the page's own fit script sets caps the
6085 /// page at that many rows, no more.6085 /// page at that many rows, no more.
6086 #[tokio::test]6086 #[tokio::test]
6087 async fn the_rows_cookie_caps_the_page_size() {6087 async fn the_rows_cookie_caps_the_page_size() {
@@ -6093,7 +6093,7 @@ async fn the_rows_cookie_caps_the_page_size() {
6093 app.store6093 app.store
6094 .record_event(6094 .record_event(
6095 None,6095 None,
6096- &izlek_core::detail::ActivityKind::Other("row".to_string()),6096+ &iz_core::detail::ActivityKind::Other("row".to_string()),
6097 &format!("row {i}"),6097 &format!("row {i}"),
6098 t0 + time::Duration::seconds(i),6098 t0 + time::Duration::seconds(i),
6099 )6099 )
@@ -6105,7 +6105,7 @@ async fn the_rows_cookie_caps_the_page_size() {
6105 .get_with_extra_cookie(6105 .get_with_extra_cookie(
6106 "/logs?section=activity",6106 "/logs?section=activity",
6107 Some(&admin_cookie),6107 Some(&admin_cookie),
6108- "izlek_rows_activity=15",6108+ "iz_rows_activity=15",
6109 )6109 )
6110 .await;6110 .await;
6111 let html = String::from_utf8_lossy(&capped.bytes).into_owned();6111 let html = String::from_utf8_lossy(&capped.bytes).into_owned();
@@ -6125,7 +6125,7 @@ async fn the_older_href_round_trips_the_active_filter() {
6125 app.store6125 app.store
6126 .record_event(6126 .record_event(
6127 None,6127 None,
6128- &izlek_core::detail::ActivityKind::Other("target".to_string()),6128+ &iz_core::detail::ActivityKind::Other("target".to_string()),
6129 &format!("target {i}"),6129 &format!("target {i}"),
6130 t0 + time::Duration::seconds(i),6130 t0 + time::Duration::seconds(i),
6131 )6131 )
@@ -6136,7 +6136,7 @@ async fn the_older_href_round_trips_the_active_filter() {
6136 app.store6136 app.store
6137 .record_event(6137 .record_event(
6138 None,6138 None,
6139- &izlek_core::detail::ActivityKind::Other("foreign".to_string()),6139+ &iz_core::detail::ActivityKind::Other("foreign".to_string()),
6140 &format!("foreign {i}"),6140 &format!("foreign {i}"),
6141 t0 + time::Duration::seconds(1000 + i),6141 t0 + time::Duration::seconds(1000 + i),
6142 )6142 )
@@ -6163,7 +6163,7 @@ async fn the_older_href_round_trips_the_active_filter() {
6163 }6163 }
6164 6164
6165 /// `/api/current_logs` keeps reading the unpaged newest page regardless of a6165 /// `/api/current_logs` keeps reading the unpaged newest page regardless of a
6166-/// small `izlek_rows_activity` cookie — the JSON route never widened by the6166+/// small `iz_rows_activity` cookie — the JSON route never widened by the
6167 /// page's own fit cookie.6167 /// page's own fit cookie.
6168 #[tokio::test]6168 #[tokio::test]
6169 async fn current_logs_json_ignores_the_rows_cookie() {6169 async fn current_logs_json_ignores_the_rows_cookie() {
@@ -6175,7 +6175,7 @@ async fn current_logs_json_ignores_the_rows_cookie() {
6175 app.store6175 app.store
6176 .record_event(6176 .record_event(
6177 None,6177 None,
6178- &izlek_core::detail::ActivityKind::Other("row".to_string()),6178+ &iz_core::detail::ActivityKind::Other("row".to_string()),
6179 &format!("row {i}"),6179 &format!("row {i}"),
6180 t0 + time::Duration::seconds(i),6180 t0 + time::Duration::seconds(i),
6181 )6181 )
@@ -6188,7 +6188,7 @@ async fn current_logs_json_ignores_the_rows_cookie() {
6188 "/api/current_logs",6188 "/api/current_logs",
6189 Some(&admin_cookie),6189 Some(&admin_cookie),
6190 &[],6190 &[],
6191- Some("izlek_rows_activity=5"),6191+ Some("iz_rows_activity=5"),
6192 )6192 )
6193 .await;6193 .await;
6194 assert!(answer.body.contains("\"queue\""), "{}", answer.body);6194 assert!(answer.body.contains("\"queue\""), "{}", answer.body);
@@ -6209,7 +6209,7 @@ async fn current_logs_json_ignores_the_rows_cookie() {
6209 async fn a_photo_hides_from_the_signed_out_and_the_foreign() {6209 async fn a_photo_hides_from_the_signed_out_and_the_foreign() {
6210 let app = App::open().await;6210 let app = App::open().await;
6211 let admin_cookie = admin(&app).await;6211 let admin_cookie = admin(&app).await;
6212- let admin_id = user_id(&app, "ada@izlek.sh").await;6212+ let admin_id = user_id(&app, "ada@iz.sh").await;
6213 6213
6214 let answer = app6214 let answer = app
6215 .post_multipart(6215 .post_multipart(
@@ -6234,7 +6234,7 @@ async fn a_photo_hides_from_the_signed_out_and_the_foreign() {
6234 async fn an_invite_refusal_lands_on_the_members_section() {6234 async fn an_invite_refusal_lands_on_the_members_section() {
6235 let app = App::open().await;6235 let app = App::open().await;
6236 let admin_cookie = admin(&app).await;6236 let admin_cookie = admin(&app).await;
6237- invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6237+ invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6238 6238
6239 let dup = app6239 let dup = app
6240 .post_without_script(6240 .post_without_script(
@@ -6242,7 +6242,7 @@ async fn an_invite_refusal_lands_on_the_members_section() {
6242 Some(&admin_cookie),6242 Some(&admin_cookie),
6243 "http://localhost/settings?section=members",6243 "http://localhost/settings?section=members",
6244 &[6244 &[
6245- ("email", "emre@izlek.sh"),6245+ ("email", "emre@iz.sh"),
6246 ("display_name", "Emre"),6246 ("display_name", "Emre"),
6247 ("role", "member"),6247 ("role", "member"),
6248 ],6248 ],
@@ -6257,7 +6257,7 @@ async fn an_invite_refusal_lands_on_the_members_section() {
6257 let page = app.get(&location, Some(&admin_cookie)).await;6257 let page = app.get(&location, Some(&admin_cookie)).await;
6258 let html = String::from_utf8_lossy(&page.bytes);6258 let html = String::from_utf8_lossy(&page.bytes);
6259 assert!(html.contains("field-error"), "{html}");6259 assert!(html.contains("field-error"), "{html}");
6260- assert!(html.contains("emre@izlek.sh"), "{html}");6260+ assert!(html.contains("emre@iz.sh"), "{html}");
6261 }6261 }
6262 6262
6263 /// Seeds one decision and one accepted send directly on the store — the6263 /// Seeds one decision and one accepted send directly on the store — the
@@ -6307,7 +6307,7 @@ async fn a_task_with_a_notification(
6307 .unwrap();6307 .unwrap();
6308 let send = app6308 let send = app
6309 .store6309 .store
6310- .claim_send(&rule.id, &transition.id, &task, "ada@izlek.sh", now, now)6310+ .claim_send(&rule.id, &transition.id, &task, "ada@iz.sh", now, now)
6311 .await6311 .await
6312 .unwrap()6312 .unwrap()
6313 .unwrap();6313 .unwrap();
@@ -6322,7 +6322,7 @@ async fn a_task_with_a_notification(
6322 async fn a_tasks_notifications_show_the_recipient_and_the_rule_name_is_admin_only() {6322 async fn a_tasks_notifications_show_the_recipient_and_the_rule_name_is_admin_only() {
6323 let app = App::open().await;6323 let app = App::open().await;
6324 let admin_cookie = admin(&app).await;6324 let admin_cookie = admin(&app).await;
6325- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6325+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6326 let (task, _send_id) =6326 let (task, _send_id) =
6327 a_task_with_a_notification(&app, &admin_cookie, "Wraps up the sprint").await;6327 a_task_with_a_notification(&app, &admin_cookie, "Wraps up the sprint").await;
6328 6328
@@ -6330,7 +6330,7 @@ async fn a_tasks_notifications_show_the_recipient_and_the_rule_name_is_admin_onl
6330 .get(&format!("/?task={task}&tab=mail"), Some(&member))6330 .get(&format!("/?task={task}&tab=mail"), Some(&member))
6331 .await;6331 .await;
6332 let member_html = String::from_utf8_lossy(&member_page.bytes);6332 let member_html = String::from_utf8_lossy(&member_page.bytes);
6333- assert!(member_html.contains("ada@izlek.sh"), "{member_html}");6333+ assert!(member_html.contains("ada@iz.sh"), "{member_html}");
6334 assert!(6334 assert!(
6335 member_html.contains("rule-term-sent"),6335 member_html.contains("rule-term-sent"),
6336 "no state chip on the member's page: {member_html}"6336 "no state chip on the member's page: {member_html}"
@@ -6344,7 +6344,7 @@ async fn a_tasks_notifications_show_the_recipient_and_the_rule_name_is_admin_onl
6344 .get(&format!("/?task={task}&tab=mail"), Some(&admin_cookie))6344 .get(&format!("/?task={task}&tab=mail"), Some(&admin_cookie))
6345 .await;6345 .await;
6346 let admin_html = String::from_utf8_lossy(&admin_page.bytes);6346 let admin_html = String::from_utf8_lossy(&admin_page.bytes);
6347- assert!(admin_html.contains("ada@izlek.sh"), "{admin_html}");6347+ assert!(admin_html.contains("ada@iz.sh"), "{admin_html}");
6348 assert!(admin_html.contains("Wraps up the sprint"), "{admin_html}");6348 assert!(admin_html.contains("Wraps up the sprint"), "{admin_html}");
6349 }6349 }
6350 6350
@@ -6355,7 +6355,7 @@ async fn a_tasks_notifications_show_the_recipient_and_the_rule_name_is_admin_onl
6355 async fn the_mail_servers_own_words_are_admin_only() {6355 async fn the_mail_servers_own_words_are_admin_only() {
6356 let app = App::open().await;6356 let app = App::open().await;
6357 let admin_cookie = admin(&app).await;6357 let admin_cookie = admin(&app).await;
6358- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6358+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6359 let (task, send_id) = a_task_with_a_notification(&app, &admin_cookie, "Sprint wrap").await;6359 let (task, send_id) = a_task_with_a_notification(&app, &admin_cookie, "Sprint wrap").await;
6360 6360
6361 // The send failed, and the server said something about the account it6361 // The send failed, and the server said something about the account it
@@ -6377,7 +6377,7 @@ async fn the_mail_servers_own_words_are_admin_only() {
6377 let member_html = String::from_utf8_lossy(&member_page.bytes);6377 let member_html = String::from_utf8_lossy(&member_page.bytes);
6378 // The fact of the failure is theirs to see.6378 // The fact of the failure is theirs to see.
6379 assert!(6379 assert!(
6380- member_html.contains("ada@izlek.sh"),6380+ member_html.contains("ada@iz.sh"),
6381 "the member lost the recipient too: {member_html}"6381 "the member lost the recipient too: {member_html}"
6382 );6382 );
6383 assert!(6383 assert!(
@@ -6449,7 +6449,7 @@ async fn an_admin_retries_a_failed_send_and_it_rejoins_the_queue() {
6449 .post("/api/current_logs", Some(&admin_cookie), &[])6449 .post("/api/current_logs", Some(&admin_cookie), &[])
6450 .await;6450 .await;
6451 assert!(6451 assert!(
6452- logs.body.contains("\"recipient\":\"ada@izlek.sh\""),6452+ logs.body.contains("\"recipient\":\"ada@iz.sh\""),
6453 "the retried send did not rejoin the queue: {}",6453 "the retried send did not rejoin the queue: {}",
6454 logs.body6454 logs.body
6455 );6455 );
@@ -6461,7 +6461,7 @@ async fn an_admin_retries_a_failed_send_and_it_rejoins_the_queue() {
6461 async fn a_member_may_not_retry_a_send() {6461 async fn a_member_may_not_retry_a_send() {
6462 let app = App::open().await;6462 let app = App::open().await;
6463 let admin_cookie = admin(&app).await;6463 let admin_cookie = admin(&app).await;
6464- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6464+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6465 let (task, send_id) =6465 let (task, send_id) =
6466 a_task_with_a_notification(&app, &admin_cookie, "Member cannot touch this").await;6466 a_task_with_a_notification(&app, &admin_cookie, "Member cannot touch this").await;
6467 let now = time::OffsetDateTime::now_utc();6467 let now = time::OffsetDateTime::now_utc();
@@ -6523,10 +6523,10 @@ async fn retrying_an_already_sent_send_changes_nothing() {
6523 async fn an_admin_sends_a_message_to_one_member() {6523 async fn an_admin_sends_a_message_to_one_member() {
6524 let app = App::open().await;6524 let app = App::open().await;
6525 let admin_cookie = admin(&app).await;6525 let admin_cookie = admin(&app).await;
6526- let _ = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6526+ let _ = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6527 let mert_id = app6527 let mert_id = app
6528 .store6528 .store
6529- .user_by_email(&app.workspace_id().await, "emre@izlek.sh")6529+ .user_by_email(&app.workspace_id().await, "emre@iz.sh")
6530 .await6530 .await
6531 .unwrap()6531 .unwrap()
6532 .unwrap()6532 .unwrap()
@@ -6555,7 +6555,7 @@ async fn an_admin_sends_a_message_to_one_member() {
6555 6555
6556 let sends = app6556 let sends = app
6557 .store6557 .store
6558- .mail_queue(10, izlek_core::store::FeedPage::Newest)6558+ .mail_queue(10, iz_core::store::FeedPage::Newest)
6559 .await6559 .await
6560 .unwrap();6560 .unwrap();
6561 let notices: Vec<_> = sends6561 let notices: Vec<_> = sends
@@ -6564,7 +6564,7 @@ async fn an_admin_sends_a_message_to_one_member() {
6564 .collect();6564 .collect();
6565 assert_eq!(notices.len(), 1, "{sends:?}");6565 assert_eq!(notices.len(), 1, "{sends:?}");
6566 let notice = notices[0];6566 let notice = notices[0];
6567- assert_eq!(notice.recipient, "emre@izlek.sh");6567+ assert_eq!(notice.recipient, "emre@iz.sh");
6568 assert_eq!(notice.subject.as_deref(), Some("Heads up"));6568 assert_eq!(notice.subject.as_deref(), Some("Heads up"));
6569 assert_eq!(notice.body.as_deref(), Some("Standup moved to 10."));6569 assert_eq!(notice.body.as_deref(), Some("Standup moved to 10."));
6570 6570
@@ -6577,8 +6577,8 @@ async fn an_admin_sends_a_message_to_one_member() {
6577 async fn an_admin_sends_a_message_to_everyone_and_not_to_themself() {6577 async fn an_admin_sends_a_message_to_everyone_and_not_to_themself() {
6578 let app = App::open().await;6578 let app = App::open().await;
6579 let admin_cookie = admin(&app).await;6579 let admin_cookie = admin(&app).await;
6580- let _ = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6580+ let _ = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6581- let _ = invited(&app, &admin_cookie, "quiet@izlek.sh", "Quiet", Role::Viewer).await;6581+ let _ = invited(&app, &admin_cookie, "quiet@iz.sh", "Quiet", Role::Viewer).await;
6582 6582
6583 let answer = app6583 let answer = app
6584 .post(6584 .post(
@@ -6603,7 +6603,7 @@ async fn an_admin_sends_a_message_to_everyone_and_not_to_themself() {
6603 6603
6604 let sends = app6604 let sends = app
6605 .store6605 .store
6606- .mail_queue(10, izlek_core::store::FeedPage::Newest)6606+ .mail_queue(10, iz_core::store::FeedPage::Newest)
6607 .await6607 .await
6608 .unwrap();6608 .unwrap();
6609 let notices: Vec<_> = sends6609 let notices: Vec<_> = sends
@@ -6612,7 +6612,7 @@ async fn an_admin_sends_a_message_to_everyone_and_not_to_themself() {
6612 .collect();6612 .collect();
6613 assert_eq!(notices.len(), 2, "{sends:?}");6613 assert_eq!(notices.len(), 2, "{sends:?}");
6614 assert!(6614 assert!(
6615- notices.iter().all(|send| send.recipient != "ada@izlek.sh"),6615+ notices.iter().all(|send| send.recipient != "ada@iz.sh"),
6616 "{sends:?}"6616 "{sends:?}"
6617 );6617 );
6618 }6618 }
@@ -6621,7 +6621,7 @@ async fn an_admin_sends_a_message_to_everyone_and_not_to_themself() {
6621 async fn a_blank_subject_or_body_refuses_and_queues_nothing() {6621 async fn a_blank_subject_or_body_refuses_and_queues_nothing() {
6622 let app = App::open().await;6622 let app = App::open().await;
6623 let admin_cookie = admin(&app).await;6623 let admin_cookie = admin(&app).await;
6624- let _ = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6624+ let _ = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6625 6625
6626 let answer = app6626 let answer = app
6627 .post(6627 .post(
@@ -6663,7 +6663,7 @@ async fn a_blank_subject_or_body_refuses_and_queues_nothing() {
6663 6663
6664 let sends = app6664 let sends = app
6665 .store6665 .store
6666- .mail_queue(10, izlek_core::store::FeedPage::Newest)6666+ .mail_queue(10, iz_core::store::FeedPage::Newest)
6667 .await6667 .await
6668 .unwrap();6668 .unwrap();
6669 assert!(6669 assert!(
@@ -6681,7 +6681,7 @@ async fn a_blank_subject_or_body_refuses_and_queues_nothing() {
6681 async fn a_member_may_not_send_a_message_and_never_sees_the_panel() {6681 async fn a_member_may_not_send_a_message_and_never_sees_the_panel() {
6682 let app = App::open().await;6682 let app = App::open().await;
6683 let admin_cookie = admin(&app).await;6683 let admin_cookie = admin(&app).await;
6684- let member = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6684+ let member = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6685 6685
6686 let answer = app6686 let answer = app
6687 .post(6687 .post(
@@ -6706,7 +6706,7 @@ async fn a_member_may_not_send_a_message_and_never_sees_the_panel() {
6706 6706
6707 let sends = app6707 let sends = app
6708 .store6708 .store
6709- .mail_queue(10, izlek_core::store::FeedPage::Newest)6709+ .mail_queue(10, iz_core::store::FeedPage::Newest)
6710 .await6710 .await
6711 .unwrap();6711 .unwrap();
6712 assert!(6712 assert!(
@@ -6724,7 +6724,7 @@ async fn a_member_may_not_send_a_message_and_never_sees_the_panel() {
6724 async fn an_unknown_recipient_refuses_and_never_broadcasts() {6724 async fn an_unknown_recipient_refuses_and_never_broadcasts() {
6725 let app = App::open().await;6725 let app = App::open().await;
6726 let admin_cookie = admin(&app).await;6726 let admin_cookie = admin(&app).await;
6727- let _ = invited(&app, &admin_cookie, "emre@izlek.sh", "Emre", Role::Member).await;6727+ let _ = invited(&app, &admin_cookie, "emre@iz.sh", "Emre", Role::Member).await;
6728 6728
6729 let answer = app6729 let answer = app
6730 .post(6730 .post(
@@ -6755,7 +6755,7 @@ async fn an_unknown_recipient_refuses_and_never_broadcasts() {
6755 6755
6756 let sends = app6756 let sends = app
6757 .store6757 .store
6758- .mail_queue(10, izlek_core::store::FeedPage::Newest)6758+ .mail_queue(10, iz_core::store::FeedPage::Newest)
6759 .await6759 .await
6760 .unwrap();6760 .unwrap();
6761 assert!(6761 assert!(
@@ -6950,7 +6950,7 @@ async fn a_member_who_may_only_read_still_gets_the_tab_strip() {
6950 let member = invited(6950 let member = invited(
6951 &app,6951 &app,
6952 &admin_cookie,6952 &admin_cookie,
6953- "reads@izlek.sh",6953+ "reads@iz.sh",
6954 "Reader Only",6954 "Reader Only",
6955 Role::Member,6955 Role::Member,
6956 )6956 )
@@ -6967,7 +6967,7 @@ async fn a_member_who_may_only_read_still_gets_the_tab_strip() {
6967 );6967 );
6968 }6968 }
6969 6969
6970-/// A spreadsheet has no browser element behind it: İzlek reads the workbook6970+/// A spreadsheet has no browser element behind it: İz reads the workbook
6971 /// itself and lays the sheet out as a table, tab strip and all. The upload is6971 /// itself and lays the sheet out as a table, tab strip and all. The upload is
6972 /// a real xlsx, so this covers the sniffer, the reader and the view together.6972 /// a real xlsx, so this covers the sniffer, the reader and the view together.
6973 #[tokio::test]6973 #[tokio::test]
@@ -7142,10 +7142,10 @@ async fn an_admin_sets_the_address_mail_links_point_at() {
7142 &[7142 &[
7143 ("host", "smtp.fastmail.com"),7143 ("host", "smtp.fastmail.com"),
7144 ("port", "465"),7144 ("port", "465"),
7145- ("username", "izlek"),7145+ ("username", "iz"),
7146 ("password", SENDER_PASSWORD),7146 ("password", SENDER_PASSWORD),
7147- ("from_name", "İzlek"),7147+ ("from_name", "İz"),
7148- ("from_address", "izlek@izlek.sh"),7148+ ("from_address", "iz@iz.sh"),
7149 ("public_url", public_url),7149 ("public_url", public_url),
7150 ],7150 ],
7151 )7151 )
@@ -7332,7 +7332,7 @@ async fn the_live_channel_refuses_a_signed_out_caller() {
7332 async fn the_live_channel_never_names_an_admin_surface_to_a_member() {7332 async fn the_live_channel_never_names_an_admin_surface_to_a_member() {
7333 let app = App::open().await;7333 let app = App::open().await;
7334 let boss = admin(&app).await;7334 let boss = admin(&app).await;
7335- let member = invited(&app, &boss, "bo@izlek.sh", "Bo", Role::Member).await;7335+ let member = invited(&app, &boss, "bo@iz.sh", "Bo", Role::Member).await;
7336 7336
7337 let member_feed = app.live_open(Some(&member)).await;7337 let member_feed = app.live_open(Some(&member)).await;
7338 let admin_feed = app.live_open(Some(&boss)).await;7338 let admin_feed = app.live_open(Some(&boss)).await;
@@ -7343,9 +7343,9 @@ async fn the_live_channel_never_names_an_admin_surface_to_a_member() {
7343 app.store7343 app.store
7344 .create_mail_rule(7344 .create_mail_rule(
7345 &board,7345 &board,
7346- &izlek_core::store::Trigger::Created,7346+ &iz_core::store::Trigger::Created,
7347 "Something happened",7347 "Something happened",
7348- izlek_core::store::Audience::Board,7348+ iz_core::store::Audience::Board,
7349 time::OffsetDateTime::now_utc(),7349 time::OffsetDateTime::now_utc(),
7350 false,7350 false,
7351 )7351 )
@@ -7373,7 +7373,7 @@ async fn the_live_channel_never_names_an_admin_surface_to_a_member() {
7373 async fn the_live_channel_announces_a_shared_surface_to_a_member() {7373 async fn the_live_channel_announces_a_shared_surface_to_a_member() {
7374 let app = App::open().await;7374 let app = App::open().await;
7375 let boss = admin(&app).await;7375 let boss = admin(&app).await;
7376- let member = invited(&app, &boss, "bo@izlek.sh", "Bo", Role::Member).await;7376+ let member = invited(&app, &boss, "bo@iz.sh", "Bo", Role::Member).await;
7377 let column = first_column(&app).await;7377 let column = first_column(&app).await;
7378 7378
7379 let feed = app.live_open(Some(&member)).await;7379 let feed = app.live_open(Some(&member)).await;
@@ -7393,7 +7393,7 @@ async fn the_live_script_is_emitted_once_and_guarded() {
7393 let html = String::from_utf8(app.get("/", Some(&boss)).await.bytes).unwrap();7393 let html = String::from_utf8(app.get("/", Some(&boss)).await.bytes).unwrap();
7394 7394
7395 assert_eq!(7395 assert_eq!(
7396- html.matches("__izlekLive").count(),7396+ html.matches("__izLive").count(),
7397 2,7397 2,
7398 "the live script should appear once, as a guard read and a guard set"7398 "the live script should appear once, as a guard read and a guard set"
7399 );7399 );
@@ -7411,7 +7411,7 @@ async fn a_signed_out_page_opens_no_live_connection() {
7411 admin(&app).await;7411 admin(&app).await;
7412 let html = String::from_utf8(app.get("/", None).await.bytes).unwrap();7412 let html = String::from_utf8(app.get("/", None).await.bytes).unwrap();
7413 assert!(7413 assert!(
7414- !html.contains("__izlekLive"),7414+ !html.contains("__izLive"),
7415 "the sign-in page carries the live script"7415 "the sign-in page carries the live script"
7416 );7416 );
7417 }7417 }
@@ -7425,7 +7425,7 @@ async fn a_queued_mails_next_try_is_marked_for_the_tick() {
7425 let boss = admin(&app).await;7425 let boss = admin(&app).await;
7426 app.store7426 app.store
7427 .queue_notice(7427 .queue_notice(
7428- "bo@izlek.sh",7428+ "bo@iz.sh",
7429 "Your \u{130}zlek sign-in link",7429 "Your \u{130}zlek sign-in link",
7430 "body",7430 "body",
7431 time::OffsetDateTime::now_utc(),7431 time::OffsetDateTime::now_utc(),
@@ -7490,7 +7490,7 @@ async fn the_queues_next_try_is_shown_to_the_second() {
7490 let boss = admin(&app).await;7490 let boss = admin(&app).await;
7491 app.store7491 app.store
7492 .queue_notice(7492 .queue_notice(
7493- "bo@izlek.sh",7493+ "bo@iz.sh",
7494 "Subject",7494 "Subject",
7495 "body",7495 "body",
7496 time::OffsetDateTime::now_utc() + time::Duration::hours(1),7496 time::OffsetDateTime::now_utc() + time::Duration::hours(1),
@@ -7526,7 +7526,7 @@ async fn a_refused_handshake_is_shown_with_what_the_server_said() {
7526 app.store7526 app.store
7527 .record_sender_check(7527 .record_sender_check(
7528 &workspace,7528 &workspace,
7529- izlek_core::store::SenderCheck {7529+ iz_core::store::SenderCheck {
7530 at: time::OffsetDateTime::now_utc(),7530 at: time::OffsetDateTime::now_utc(),
7531 took_ms: 0,7531 took_ms: 0,
7532 error: Some("535 authentication failed".into()),7532 error: Some("535 authentication failed".into()),
@@ -7564,7 +7564,7 @@ async fn a_passed_handshake_says_when_it_passed() {
7564 app.store7564 app.store
7565 .record_sender_check(7565 .record_sender_check(
7566 &workspace,7566 &workspace,
7567- izlek_core::store::SenderCheck {7567+ iz_core::store::SenderCheck {
7568 at: time::OffsetDateTime::now_utc(),7568 at: time::OffsetDateTime::now_utc(),
7569 took_ms: 84,7569 took_ms: 84,
7570 error: None,7570 error: None,
@@ -7588,7 +7588,7 @@ async fn a_passed_handshake_says_when_it_passed() {
7588 async fn a_member_may_not_check_the_sender() {7588 async fn a_member_may_not_check_the_sender() {
7589 let app = App::open().await;7589 let app = App::open().await;
7590 let boss = admin(&app).await;7590 let boss = admin(&app).await;
7591- let member = invited(&app, &boss, "bo@izlek.sh", "Bo", Role::Member).await;7591+ let member = invited(&app, &boss, "bo@iz.sh", "Bo", Role::Member).await;
7592 let answer = app.post("/api/check_sender", Some(&member), &[]).await;7592 let answer = app.post("/api/check_sender", Some(&member), &[]).await;
7593 assert_ne!(7593 assert_ne!(
7594 answer.body, "null",7594 answer.body, "null",
@@ -7600,7 +7600,7 @@ async fn a_member_may_not_check_the_sender() {
7600 7600
7601 /// Makes a tag over HTTP and hands the store row back — the tests need the7601 /// Makes a tag over HTTP and hands the store row back — the tests need the
7602 /// id, and the mutation itself is still a real post.7602 /// id, and the mutation itself is still a real post.
7603-async fn a_tag(app: &App, cookie: &str, name: &str) -> izlek_core::store::Tag {7603+async fn a_tag(app: &App, cookie: &str, name: &str) -> iz_core::store::Tag {
7604 let answer = app7604 let answer = app
7605 .post("/api/create_tag", Some(cookie), &[("name", name)])7605 .post("/api/create_tag", Some(cookie), &[("name", name)])
7606 .await;7606 .await;
@@ -7625,7 +7625,7 @@ async fn a_tag(app: &App, cookie: &str, name: &str) -> izlek_core::store::Tag {
7625 async fn a_non_admin_cannot_create_rename_delete_or_move_a_tag() {7625 async fn a_non_admin_cannot_create_rename_delete_or_move_a_tag() {
7626 let app = App::open().await;7626 let app = App::open().await;
7627 let admin_cookie = admin(&app).await;7627 let admin_cookie = admin(&app).await;
7628- let member = invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;7628+ let member = invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
7629 7629
7630 let create = app7630 let create = app
7631 .post("/api/create_tag", Some(&member), &[("name", "Sneak")])7631 .post("/api/create_tag", Some(&member), &[("name", "Sneak")])
@@ -7660,7 +7660,7 @@ async fn a_viewer_cannot_set_a_task_tag() {
7660 let viewer = invited(7660 let viewer = invited(
7661 &app,7661 &app,
7662 &admin_cookie,7662 &admin_cookie,
7663- "hush@izlek.sh",7663+ "hush@iz.sh",
7664 "Hush Rao",7664 "Hush Rao",
7665 Role::Viewer,7665 Role::Viewer,
7666 )7666 )
@@ -7995,7 +7995,7 @@ async fn a_task_by(
7995 creator: &str,7995 creator: &str,
7996 ) -> String {7996 ) -> String {
7997 app.store7997 app.store
7998- .create_task(izlek_core::store::NewTask {7998+ .create_task(iz_core::store::NewTask {
7999 board_id,7999 board_id,
8000 column_id,8000 column_id,
8001 parent_id: None,8001 parent_id: None,
@@ -8061,16 +8061,16 @@ async fn profile_counts_fixture(app: &App, member: &str, admin: &str) {
8061 async fn a_member_may_read_another_members_profile_name_address_and_counts() {8061 async fn a_member_may_read_another_members_profile_name_address_and_counts() {
8062 let app = App::open().await;8062 let app = App::open().await;
8063 let admin_cookie = admin(&app).await;8063 let admin_cookie = admin(&app).await;
8064- invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;8064+ invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
8065 let reader = invited(8065 let reader = invited(
8066 &app,8066 &app,
8067 &admin_cookie,8067 &admin_cookie,
8068- "ivy@izlek.sh",8068+ "ivy@iz.sh",
8069 "Ivy Lear",8069 "Ivy Lear",
8070 Role::Member,8070 Role::Member,
8071 )8071 )
8072 .await;8072 .await;
8073- let mem_id = user_id(&app, "mem@izlek.sh").await;8073+ let mem_id = user_id(&app, "mem@iz.sh").await;
8074 let admin_id = app8074 let admin_id = app
8075 .store8075 .store
8076 .users(&app.workspace_id().await)8076 .users(&app.workspace_id().await)
@@ -8086,7 +8086,7 @@ async fn a_member_may_read_another_members_profile_name_address_and_counts() {
8086 assert_eq!(page.status.as_u16(), 200);8086 assert_eq!(page.status.as_u16(), 200);
8087 let html = String::from_utf8(page.bytes).unwrap();8087 let html = String::from_utf8(page.bytes).unwrap();
8088 assert!(html.contains("Mem Ber"), "{html}");8088 assert!(html.contains("Mem Ber"), "{html}");
8089- assert!(html.contains("mem@izlek.sh"), "{html}");8089+ assert!(html.contains("mem@iz.sh"), "{html}");
8090 for count in [2, 1, 3, 4] {8090 for count in [2, 1, 3, 4] {
8091 assert_eq!(8091 assert_eq!(
8092 html.matches(&format!(">{count}</dd>")).count(),8092 html.matches(&format!(">{count}</dd>")).count(),
@@ -8102,8 +8102,8 @@ async fn a_member_may_read_another_members_profile_name_address_and_counts() {
8102 async fn a_profile_names_its_fields_and_links_the_person_who_invited_them() {8102 async fn a_profile_names_its_fields_and_links_the_person_who_invited_them() {
8103 let app = App::open().await;8103 let app = App::open().await;
8104 let admin_cookie = admin(&app).await;8104 let admin_cookie = admin(&app).await;
8105- invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;8105+ invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
8106- let mem_id = user_id(&app, "mem@izlek.sh").await;8106+ let mem_id = user_id(&app, "mem@iz.sh").await;
8107 let admin_id = app8107 let admin_id = app
8108 .store8108 .store
8109 .users(&app.workspace_id().await)8109 .users(&app.workspace_id().await)
@@ -8149,8 +8149,8 @@ async fn a_profile_names_its_fields_and_links_the_person_who_invited_them() {
8149 async fn a_comment_author_and_an_assignee_lead_to_their_profiles() {8149 async fn a_comment_author_and_an_assignee_lead_to_their_profiles() {
8150 let app = App::open().await;8150 let app = App::open().await;
8151 let admin_cookie = admin(&app).await;8151 let admin_cookie = admin(&app).await;
8152- invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;8152+ invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
8153- let mem_id = user_id(&app, "mem@izlek.sh").await;8153+ let mem_id = user_id(&app, "mem@iz.sh").await;
8154 let workspace_id = app.workspace_id().await;8154 let workspace_id = app.workspace_id().await;
8155 let board = app.store.board(&workspace_id).await.unwrap().unwrap();8155 let board = app.store.board(&workspace_id).await.unwrap().unwrap();
8156 let open = app.store.columns(&board.id).await.unwrap()[0].id.clone();8156 let open = app.store.columns(&board.id).await.unwrap()[0].id.clone();
@@ -8193,8 +8193,8 @@ async fn the_project_filter_is_written_into() {
8193 async fn a_profile_is_not_found_signed_out_or_outside_the_workspace() {8193 async fn a_profile_is_not_found_signed_out_or_outside_the_workspace() {
8194 let app = App::open().await;8194 let app = App::open().await;
8195 let admin_cookie = admin(&app).await;8195 let admin_cookie = admin(&app).await;
8196- invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;8196+ invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
8197- let mem_id = user_id(&app, "mem@izlek.sh").await;8197+ let mem_id = user_id(&app, "mem@iz.sh").await;
8198 8198
8199 let signed_out = app.get(&format!("/people/{mem_id}"), None).await;8199 let signed_out = app.get(&format!("/people/{mem_id}"), None).await;
8200 assert_eq!(signed_out.status.as_u16(), 404, "never a 403, never a page");8200 assert_eq!(signed_out.status.as_u16(), 404, "never a 403, never a page");
@@ -8224,17 +8224,17 @@ async fn a_profile_is_not_found_signed_out_or_outside_the_workspace() {
8224 async fn only_your_own_profile_offers_the_edit_link() {8224 async fn only_your_own_profile_offers_the_edit_link() {
8225 let app = App::open().await;8225 let app = App::open().await;
8226 let admin_cookie = admin(&app).await;8226 let admin_cookie = admin(&app).await;
8227- invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await;8227+ invited(&app, &admin_cookie, "mem@iz.sh", "Mem Ber", Role::Member).await;
8228- let mem_id = user_id(&app, "mem@izlek.sh").await;8228+ let mem_id = user_id(&app, "mem@iz.sh").await;
8229 let ivy = invited(8229 let ivy = invited(
8230 &app,8230 &app,
8231 &admin_cookie,8231 &admin_cookie,
8232- "ivy@izlek.sh",8232+ "ivy@iz.sh",
8233 "Ivy Lear",8233 "Ivy Lear",
8234 Role::Member,8234 Role::Member,
8235 )8235 )
8236 .await;8236 .await;
8237- let ivy_id = user_id(&app, "ivy@izlek.sh").await;8237+ let ivy_id = user_id(&app, "ivy@iz.sh").await;
8238 8238
8239 let own = app.get(&format!("/people/{ivy_id}"), Some(&ivy)).await;8239 let own = app.get(&format!("/people/{ivy_id}"), Some(&ivy)).await;
8240 let own_html = String::from_utf8(own.bytes).unwrap();8240 let own_html = String::from_utf8(own.bytes).unwrap();
@@ -8266,7 +8266,7 @@ async fn a_clock_saved_on_a_task_renders_in_the_viewers_stored_timezone() {
8266 Some(&admin_cookie),8266 Some(&admin_cookie),
8267 &[8267 &[
8268 ("task_id", &task),8268 ("task_id", &task),
8269- ("deadline", "2026-09-02"),8269+ ("deadline", "2027-09-02"),
8270 ("clock_hour", "11"),8270 ("clock_hour", "11"),
8271 ("clock_minute", "00"),8271 ("clock_minute", "00"),
8272 ],8272 ],
@@ -8338,7 +8338,7 @@ async fn an_empty_time_clears_the_clock_and_a_clear_clears_both() {
8338 Some(&admin_cookie),8338 Some(&admin_cookie),
8339 &[8339 &[
8340 ("task_id", &task),8340 ("task_id", &task),
8341- ("deadline", "2026-09-02"),8341+ ("deadline", "2027-09-02"),
8342 ("clock_hour", "11"),8342 ("clock_hour", "11"),
8343 ("clock_minute", "00"),8343 ("clock_minute", "00"),
8344 ],8344 ],
@@ -8464,7 +8464,7 @@ async fn a_title_edit_keeps_the_clock() {
8464 Some(&admin_cookie),8464 Some(&admin_cookie),
8465 &[8465 &[
8466 ("task_id", &task),8466 ("task_id", &task),
8467- ("deadline", "2026-09-02"),8467+ ("deadline", "2027-09-02"),
8468 ("clock_hour", "11"),8468 ("clock_hour", "11"),
8469 ("clock_minute", "00"),8469 ("clock_minute", "00"),
8470 ],8470 ],
@@ -8522,7 +8522,7 @@ async fn a_description_edit_keeps_the_clock() {
8522 Some(&admin_cookie),8522 Some(&admin_cookie),
8523 &[8523 &[
8524 ("task_id", &task),8524 ("task_id", &task),
8525- ("deadline", "2026-09-02"),8525+ ("deadline", "2027-09-02"),
8526 ("clock_hour", "11"),8526 ("clock_hour", "11"),
8527 ("clock_minute", "00"),8527 ("clock_minute", "00"),
8528 ],8528 ],
@@ -8582,7 +8582,7 @@ async fn a_time_that_cannot_be_used_is_refused_and_saves_nothing() {
8582 &[8582 &[
8583 ("task_id", task.as_str()),8583 ("task_id", task.as_str()),
8584 ("title", "Renamed"),8584 ("title", "Renamed"),
8585- ("deadline", "2026-09-02"),8585+ ("deadline", "2027-09-02"),
8586 ("clock_hour", "not-a-time"),8586 ("clock_hour", "not-a-time"),
8587 ],8587 ],
8588 )8588 )
@@ -8681,7 +8681,7 @@ async fn a_card_wears_the_clock_chip_in_the_viewers_zone_instead_of_the_deadline
8681 &[8681 &[
8682 ("title", "Kickoff"),8682 ("title", "Kickoff"),
8683 ("column_id", &column),8683 ("column_id", &column),
8684- ("deadline", "2026-09-02"),8684+ ("deadline", "2027-09-02"),
8685 ("clock_hour", "14"),8685 ("clock_hour", "14"),
8686 ("clock_minute", "00"),8686 ("clock_minute", "00"),
8687 ],8687 ],
@@ -8724,7 +8724,7 @@ async fn a_time_set_on_an_existing_day_writes_both_columns() {
8724 .post(8724 .post(
8725 "/api/save_task",8725 "/api/save_task",
8726 Some(&admin_cookie),8726 Some(&admin_cookie),
8727- &[("task_id", &task), ("deadline", "2026-09-02")],8727+ &[("task_id", &task), ("deadline", "2027-09-02")],
8728 )8728 )
8729 .await;8729 .await;
8730 assert!(8730 assert!(
@@ -8760,7 +8760,7 @@ async fn a_time_set_on_an_existing_day_writes_both_columns() {
8760 assert!(facts.row.clock_at.is_some(), "the time did not persist");8760 assert!(facts.row.clock_at.is_some(), "the time did not persist");
8761 assert_eq!(8761 assert_eq!(
8762 facts.row.deadline.map(|day| day.to_string()),8762 facts.row.deadline.map(|day| day.to_string()),
8763- Some("2026-09-02".to_string()),8763+ Some("2027-09-02".to_string()),
8764 "the time lost its day"8764 "the time lost its day"
8765 );8765 );
8766 8766
@@ -8928,7 +8928,7 @@ async fn the_reminder_knob_saves_renders_and_keeps_when_absent() {
8928 async fn a_time_change_fires_the_deadline_rule_and_round_trips() {8928 async fn a_time_change_fires_the_deadline_rule_and_round_trips() {
8929 let app = App::open_with_mail().await;8929 let app = App::open_with_mail().await;
8930 let admin_cookie = admin(&app).await;8930 let admin_cookie = admin(&app).await;
8931- let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;8931+ let member = invited(&app, &admin_cookie, "deniz@iz.sh", "Deniz", Role::Member).await;
8932 let column = first_column(&app).await;8932 let column = first_column(&app).await;
8933 let task = a_task(&app, &admin_cookie, &column, "Ship it").await;8933 let task = a_task(&app, &admin_cookie, &column, "Ship it").await;
8934 8934
@@ -8970,7 +8970,7 @@ async fn a_time_change_fires_the_deadline_rule_and_round_trips() {
8970 .post(8970 .post(
8971 "/api/save_task",8971 "/api/save_task",
8972 Some(&admin_cookie),8972 Some(&admin_cookie),
8973- &[("task_id", &task), ("deadline", "2026-09-02")],8973+ &[("task_id", &task), ("deadline", "2027-09-02")],
8974 )8974 )
8975 .await;8975 .await;
8976 assert!(8976 assert!(
@@ -9006,8 +9006,8 @@ async fn a_time_change_fires_the_deadline_rule_and_round_trips() {
9006 answer.location9006 answer.location
9007 );9007 );
9008 let rule = only_rule(&app, &admin_cookie).await;9008 let rule = only_rule(&app, &admin_cookie).await;
9009- let send = until_rule_send_to(&app, &rule, "ada@izlek.sh", 0).await;9009+ let send = until_rule_send_to(&app, &rule, "ada@iz.sh", 0).await;
9010- assert_eq!(send.recipient, "ada@izlek.sh");9010+ assert_eq!(send.recipient, "ada@iz.sh");
9011 }9011 }
9012 9012
9013 #[tokio::test]9013 #[tokio::test]
@@ -9023,7 +9023,7 @@ async fn the_logs_feed_says_the_clock_in_its_own_words() {
9023 Some(&admin_cookie),9023 Some(&admin_cookie),
9024 &[9024 &[
9025 ("task_id", &task),9025 ("task_id", &task),
9026- ("deadline", "2026-09-02"),9026+ ("deadline", "2027-09-02"),
9027 ("clock_hour", "11"),9027 ("clock_hour", "11"),
9028 ("clock_minute", "00"),9028 ("clock_minute", "00"),
9029 ],9029 ],
@@ -9096,7 +9096,7 @@ async fn an_off_step_clock_renders_itself_not_a_rounded_step() {
9096 Some(&admin_cookie),9096 Some(&admin_cookie),
9097 &[9097 &[
9098 ("task_id", &task),9098 ("task_id", &task),
9099- ("deadline", "2026-09-02"),9099+ ("deadline", "2027-09-02"),
9100 ("clock_hour", "11"),9100 ("clock_hour", "11"),
9101 ("clock_minute", "23"),9101 ("clock_minute", "23"),
9102 ],9102 ],
@@ -9198,7 +9198,7 @@ async fn tag_writes_record_their_events() {
9198 .await;9198 .await;
9199 let workspace_id = app.workspace_id().await;9199 let workspace_id = app.workspace_id().await;
9200 let tag = {9200 let tag = {
9201- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)9201+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
9202 .await9202 .await
9203 .unwrap()9203 .unwrap()
9204 .unwrap();9204 .unwrap();
@@ -9233,9 +9233,9 @@ async fn tag_writes_record_their_events() {
9233 .store9233 .store
9234 .recent_activity(9234 .recent_activity(
9235 20,9235 20,
9236- izlek_core::store::FeedPage::Newest,9236+ iz_core::store::FeedPage::Newest,
9237- izlek_core::store::Dir::Newest,9237+ iz_core::store::Dir::Newest,
9238- &izlek_core::store::ActivityFilter::default(),9238+ &iz_core::store::ActivityFilter::default(),
9239 )9239 )
9240 .await9240 .await
9241 .unwrap();9241 .unwrap();
@@ -9265,7 +9265,7 @@ async fn tagging_a_task_records_a_trail_line() {
9265 let app = App::open().await;9265 let app = App::open().await;
9266 let admin_cookie = admin(&app).await;9266 let admin_cookie = admin(&app).await;
9267 let workspace_id = app.workspace_id().await;9267 let workspace_id = app.workspace_id().await;
9268- let board = izlek_core::board::load(app.store.as_ref(), &workspace_id)9268+ let board = iz_core::board::load(app.store.as_ref(), &workspace_id)
9269 .await9269 .await
9270 .unwrap()9270 .unwrap()
9271 .unwrap();9271 .unwrap();
@@ -9278,7 +9278,7 @@ async fn tagging_a_task_records_a_trail_line() {
9278 )9278 )
9279 .await;9279 .await;