Commit graph

2756 commits

Author SHA1 Message Date
lrnselfreliance
4aa11c552d
Search: keep hyphenated words with a stopword inside them searchable (#1089)
Two bugs in the stopword filter from #1085:

- Stopwords were removed from a punctuation-joined token and the remaining
  words were still rendered as one phrase.  The tokenizer indexes the
  stopword between them, so they are not adjacent: mother-in-law became
  "mother law" and matched nothing.  Each run of kept words is now ANDed:
  ("mother" AND "law").  This also fixes excluding such a word.
- `or` was exempt from the filter even when negated, so `solar -or`
  excluded every document containing "or".  Only a bare `or` is the
  operator now; `-or` is dropped like `-the`.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:01:59 -07:00
lrnselfreliance
c973d2f40b
Doc section hints look up only the sections of the page's docs (#1087)
_fetch_section_hints matched the search against every doc section in the
library, joined each match to doc_section and doc, and only then kept the
requested FileGroups.  A common word matches thousands of sections, and each
join is a random read of a large section row, so a cold files or docs search
spent most of its time here, even when no result on the page was a doc.

The match is now limited to the rowids of the requested docs' sections, read
from covering indexes.  The results are the same.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:01:38 -07:00
lrnselfreliance
1d432483bf
Files search: rank, page and count inside the FTS index (#1086)
A files search with nothing but the search string to filter by joined every
FTS match to file_group before ranking (page query) and counting.  A common
term matches most of a library, and each join reads one large file_group row,
so on a cold HDD both queries took minutes.  With no other filters, the FTS
subquery now ranks and pages itself (ORDER BY rank LIMIT/OFFSET), only the page
is joined to file_group, snippets are computed for the page only, and the
total is counted from the FTS index alone.  Filtered and viewed-ordered
searches keep the joined query.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:29:32 -07:00
lrnselfreliance
45b52a698e
Search: drop stopwords from unquoted terms, as Postgres did (#1085)
Postgres' english websearch_to_tsquery dropped stopwords; FTS5 indexes them.
A stopword matches most of the library, so a search containing one read its
whole doclist (slow on a cold HDD) and only found files that happened to
contain it.  translate_websearch now drops Postgres' english stopword list
from unquoted terms; quoted phrases keep them.

A search with nothing left to search (stopwords or punctuation only) now
matches nothing in archive, video and doc search too, as files search, the
search estimates and Postgres already did, instead of listing everything.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:16:36 -07:00
lrnselfreliance
a61d528832
API benchmark: run history and regression detection (#1084)
* API benchmark: run history and regression detection

api_perf.py --record saves each run to a SQLite history kept outside the
repository (--data-dir, $WROLPI_BENCH_DIR, or ~/.local/share/wrolpi-bench) and
reports endpoints that got slower than their own baseline: the median of the
last 5 trustworthy runs, flagged at 1.5x and +100 ms, with hot regressions
re-timed before they are reported.  Also reports slow drift, errors, slow
endpoints, response growth, library growth, and the commits between the
baseline and the run that touched related code.

Runs on a busy host (downloads, load above core count) or during which the API
was unavailable are recorded but never used as baselines.  Host profiles can
live in the data dir so LAN addresses stay out of every checkout; a profile
marked production refuses --cold without --restart-production.

The catalog drops the removed ai/chat endpoints and adds repos, bookmarks,
jobs, torrents, sync, speedtest, map and video description endpoints.
test_api_perf.py fails when a GET route is neither timed nor deliberately
excluded, so new endpoints are not silently left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* API benchmark: a 5xx is an endpoint error, not an unavailable API

Sanic answers 503 when a single request exceeds its response timeout; that
endpoint is reported as an error and the run stays a usable baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:16:23 -07:00
Roland
ffba963639
Bump version to 0.35.2-beta
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 15:15:22 -07:00
lrnselfreliance
0ccedde3b0
A refresh compare and the doc modeler read file_group through its indexes (#1083)
A refresh compared its roots with `directory LIKE 'root/%'`, and the doc
modeler found comics with `primary_path LIKE '%.cbz'`.  SQLite cannot use an
index for either, so both read every row of file_group.  With a cold page cache
on a large library, a refresh of one empty directory took ~3.5 minutes, and a
move queued behind it waited that long.

The compare now uses a range on `directory` (as `directory_or_descendant` does),
which also stops `_` and `%` in a path acting as wildcards: refreshing `a_b`
reported the FileGroups of `aXb/...` as deleted.  The doc modeler matches the
indexed, lowercased `suffix` column instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 15:12:06 -07:00
Roland
1c095d1104
Bump version to 0.35.1-beta
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:11:41 -07:00
Roland
9e72e66612
Remove .gitpod.yml
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:11:34 -07:00
Roland
90ade4ce69
Remove Gitpod badge from README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:09:31 -07:00
lrnselfreliance
00cf8c2fe0
Dependabot: hold maplibre-gl-style-spec below 24.9 (#1081)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 16:16:14 -07:00
lrnselfreliance
3c393c826e
Bump terser, cross-spawn, http-proxy-middleware, node-forge in /app (#1080)
Lockfile-only security bumps from Dependabot #1064, #1066, #1067, #1068.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:47:39 -07:00
lrnselfreliance
8efb6665d9
Bump libzim to 4, cachetools to 8, certifi, py7zr, uvicorn (#1079)
Combines Dependabot PRs #1072-#1076 and #1078 and regenerates the hash locks.

libzim 4 renames getResults/getEstimatedMatches to snake_case, and full-text
search results are now SearchResult objects (suggestions are still paths), so
libzim_worker.py reads .path from them.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:44:18 -07:00
dependabot[bot]
33cbc64780
build(deps): bump ws from 8.22.1 to 8.23.1 in /npm-tools (#1065)
Bumps [ws](https://github.com/websockets/ws) from 8.22.1 to 8.23.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.22.1...8.23.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 8.23.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-01 15:39:46 -07:00
lrnselfreliance
7b662744ab
Bump @mapbox/vector-tile to 3 and pbf to 5 (#1070)
pbf 5 drops its default export, so mapTiles reads tiles with PbfReader.
The two move together: vector-tile 2 calls readVarint64, which pbf 5 removed.
maplibre-gl keeps its own nested vector-tile 2 / pbf 4.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:28:06 -07:00
dependabot[bot]
44380a0cb1
build(deps-dev): bump @testing-library/jest-dom in /app (#1051)
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v7.0.1...v8.0.0)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 8.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-01 15:08:03 -07:00
lrnselfreliance
26ee433b8b
Dependabot: hold maplibre-gl-style-spec at maplibre-gl's major (#1071)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:07:59 -07:00
lrnselfreliance
6484d1691a
Bump Python dependencies and regenerate the hash locks (#1069)
Combines the open Dependabot pip bumps (#1044, #1045, #1047, #1049, #1050,
#1053-#1057) and regenerates requirements.lock and controller/requirements.lock,
which Dependabot cannot update.

Test expectations updated for two behavior changes:
- webvtt-py 0.8 reads cues whose first line is whitespace (YouTube
  auto-captions), so the first VTT chunk now starts at 0.0.
- vininfo 2.0 no longer folds doors/cab into the body description.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:04:39 -07:00
dependabot[bot]
e8815d7f59
build(deps): bump the npm-dependencies group in /app with 13 updates (#1043)
Bumps the npm-dependencies group in /app with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.50.0` | `3.53.0` |
| [@testing-library/user-event](https://github.com/testing-library/user-event) | `14.6.8` | `14.6.13` |
| [cypress](https://github.com/cypress-io/cypress) | `15.21.1` | `15.21.2` |
| [dompurify](https://github.com/cure53/DOMPurify) | `3.4.17` | `3.5.0` |
| [esptool-js](https://github.com/espressif/esptool-js) | `0.7.0` | `0.7.1` |
| [maplibre-gl](https://github.com/maplibre/maplibre-gl-js) | `5.24.0` | `5.24.1` |
| [mathjs](https://github.com/josdejong/mathjs) | `15.2.0` | `15.3.0` |
| [react-colorful](https://github.com/omgovich/react-colorful) | `5.8.1` | `5.8.2` |
| [react-hotkeys-hook](https://github.com/JohannesKlauss/react-keymap-hook) | `5.3.3` | `5.4.0` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.18.5` | `7.18.7` |
| [three](https://github.com/mrdoob/three.js) | `0.186.1` | `0.187.0` |
| [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) | `4.17.27` | `4.17.28` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.6.6` | `26.6.11` |


Updates `@tabler/icons-react` from 3.50.0 to 3.53.0
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Changelog](https://github.com/tabler/tabler-icons/blob/main/packages/icons-react/CHANGELOG.md)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.53.0/packages/icons-react)

Updates `@testing-library/user-event` from 14.6.8 to 14.6.13
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.6.8...v14.6.13)

Updates `cypress` from 15.21.1 to 15.21.2
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v15.21.1...v15.21.2)

Updates `dompurify` from 3.4.17 to 3.5.0
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.17...3.5.0)

Updates `esptool-js` from 0.7.0 to 0.7.1
- [Release notes](https://github.com/espressif/esptool-js/releases)
- [Changelog](https://github.com/espressif/esptool-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/espressif/esptool-js/compare/v0.7.0...v0.7.1)

Updates `maplibre-gl` from 5.24.0 to 5.24.1
- [Release notes](https://github.com/maplibre/maplibre-gl-js/releases)
- [Changelog](https://github.com/maplibre/maplibre-gl-js/blob/v5.24.1/CHANGELOG.md)
- [Commits](https://github.com/maplibre/maplibre-gl-js/compare/v5.24.0...v5.24.1)

Updates `mathjs` from 15.2.0 to 15.3.0
- [Changelog](https://github.com/josdejong/mathjs/blob/develop/HISTORY.md)
- [Commits](https://github.com/josdejong/mathjs/compare/v15.2.0...v15.3.0)

Updates `react-colorful` from 5.8.1 to 5.8.2
- [Release notes](https://github.com/omgovich/react-colorful/releases)
- [Changelog](https://github.com/omgovich/react-colorful/blob/master/CHANGELOG.md)
- [Commits](https://github.com/omgovich/react-colorful/commits/v5.8.2)

Updates `react-hotkeys-hook` from 5.3.3 to 5.4.0
- [Release notes](https://github.com/JohannesKlauss/react-keymap-hook/releases)
- [Changelog](https://github.com/JohannesKlauss/react-hotkeys-hook/blob/main/CHANGELOG.md)
- [Commits](https://github.com/JohannesKlauss/react-keymap-hook/compare/v5.3.3...v5.4.0)

Updates `react-router` from 7.18.5 to 7.18.7
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router@7.18.7/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.18.7/packages/react-router)

Updates `three` from 0.186.1 to 0.187.0
- [Release notes](https://github.com/mrdoob/three.js/releases)
- [Commits](https://github.com/mrdoob/three.js/commits)

Updates `@types/lodash` from 4.17.27 to 4.17.28
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

Updates `@types/node` from 26.6.6 to 26.6.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-version: 3.53.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@testing-library/user-event"
  dependency-version: 14.6.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: cypress
  dependency-version: 15.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: dompurify
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: esptool-js
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: maplibre-gl
  dependency-version: 5.24.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: mathjs
  dependency-version: 15.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: react-colorful
  dependency-version: 5.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: react-hotkeys-hook
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: react-router
  dependency-version: 7.18.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: three
  dependency-version: 0.187.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/lodash"
  dependency-version: 4.17.28
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-version: 26.6.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-01 14:42:22 -07:00
lrnselfreliance
47c943878d
Video page: find a Video's neighbors from indexes, not rows (#1062)
* Channel statistics: find a Channel's Videos in an index, not their rows

Each video row carries its ffprobe_json, so the statistics query read a
page per Video to get file_group_id.  A Channel with thousands of Videos
took seconds from a cold disk cache.  An index of (channel_id,
file_group_id) replaces video_channel_id_idx, and the tagged-Videos
subquery reads that index instead of looking up each tagged FileGroup's
video row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: read FileGroup sizes from a covering index

After the video index, the remaining cold cost was reading each Video's
file_group row for its size and length: a scattered page per Video.  An
index of file_group (id, size, length) holds them densely.  SQLite
prefers the rowid for an id lookup, so the query names the index with
INDEXED BY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: widen the FileGroup index to cover published dates

A Video's neighbors are found by the published dates of its Channel's
Videos, which reads the same scattered file_group rows.  One index of
file_group (id, published_datetime, size, length) serves both, so an
upgrade builds one index rather than two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Video page: find a Video's neighbors from indexes, not rows

The previous/next Videos are found by numbering every Video in the
Channel by its published date, which read each Video's file_group row.
Cold, that took 11 s on a Channel with about 2,000 Videos.  The query
now reads the published dates from file_group_published_size_length_idx,
and orders its result so previous and next cannot swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:31:17 -07:00
lrnselfreliance
3668bf1ce9
Channel list: read channels through a covering index, not their rows (#1061)
A channel row stores its yt-dlp info_json (up to megabytes) before
collection_id.  The Channel list scanned channel and joined on
collection_id, which walked every info_json; cold, that took 25 s on a
large library.  The query now scans collection and finds each channel
through channel_collection_summary_idx, which now also covers
minimum_frequency and url.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:31:17 -07:00
lrnselfreliance
d8eba53c24
Video page: show the Channel from the video response (#1060)
* Video page: show the Channel from the video response

The video page fetched the whole Channel just to show its name, and that
endpoint computes the Channel's statistics, which took seconds on a large
Channel from a cold disk cache.  The video response already carries the
Channel's id and name.  The URL's channel id is still fetched when the
Video has no Channel, and an unfetched Channel no longer renders an empty
link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Video page: drop the unreachable URL channel fallback

VideoPage is only routed at videos/:fileGroupId, so the URL never carries a channel id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:22:36 -07:00
lrnselfreliance
570c63ffc7
Channel statistics: read from covering indexes, not video or file_group rows (#1059)
* Channel statistics: find a Channel's Videos in an index, not their rows

Each video row carries its ffprobe_json, so the statistics query read a
page per Video to get file_group_id.  A Channel with thousands of Videos
took seconds from a cold disk cache.  An index of (channel_id,
file_group_id) replaces video_channel_id_idx, and the tagged-Videos
subquery reads that index instead of looking up each tagged FileGroup's
video row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: read FileGroup sizes from a covering index

After the video index, the remaining cold cost was reading each Video's
file_group row for its size and length: a scattered page per Video.  An
index of file_group (id, size, length) holds them densely.  SQLite
prefers the rowid for an id lookup, so the query names the index with
INDEXED BY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channel statistics: widen the FileGroup index to cover published dates

A Video's neighbors are found by the published dates of its Channel's
Videos, which reads the same scattered file_group rows.  One index of
file_group (id, published_datetime, size, length) serves both, so an
upgrade builds one index rather than two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:22:21 -07:00
Roland
2e46f3a6e3
Bump version to 0.35.0-beta
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-11-30 19:48:49 -07:00
lrnselfreliance
f2e3eba226
Fix media permissions: make the library readable by every service (#1042)
* Fix media permissions: make the library readable by every service

The script only made sure WROLPi (the owner) could read and write, so a
700 directory passed its check while Caddy, which serves media as its own
user, answered 403 for every file in it.

Library directories now get at least 755 and files 644, only ever adding
bits. config/ keeps only owner fixes: it holds the VPN's key and login.
The summary counts ownership fixes too, instead of reporting 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix permissions: skip config/ even when the media path ends in a slash

find prints paths as given, so a MEDIA_DIRECTORY with a trailing slash (from .env)
never matched the config/ prune, and the library pass opened the VPN key to other
users.  The tests also no longer depend on the umask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 19:32:58 -07:00
lrnselfreliance
daae0b1d67
Share Channels, Domains, Playlists, and Repos as torrents (#1041)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
* Share Channels, Domains, Playlists, and Repos as torrents

A Share button on each one's edit page opens Share as Torrent for its
directory (disabled in WROL Mode, or without a directory). A Playlist
shares its hard-linked copy of its items, in order, so it does not
depend on the sender's library layout. The torrent is named after the
directory's last part (the Playlist or Channel), never its parents;
the modal now shows that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Share: a Channel or Domain shares its saved directory, not an unsaved pick

useChannel and useDomain return the form's data, which holds a directory
as soon as one is picked, before Save; its files are not there until
then (and it may be another Collection's). They now also return the
directory the server has, and Share uses that.

The Playlist spec now commits an unsaved directory the way the field does
(blur), and checks it took, before checking what is shared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 17:23:26 -07:00
Roland
6975053146
Bump version to 0.34.1-beta 2026-11-30 15:23:29 -07:00
lrnselfreliance
5806882f85
Repair: restart a running tunnel and torrents, so an upgrade loads their new code (#1040)
repair.sh ends with systemctl start wrolpi.target, which leaves a running
unit as it was. wrolpi-vpn (the root tunnel) and wrolpi-torrent kept the
old code until a reboot, so a tunnel.py fix did not apply after an
upgrade. try-restart restarts them only if they are running.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:06:45 -07:00
lrnselfreliance
87ed2ffeb8
Config: wrolpi.yaml is only ever config/wrolpi.yaml (#1039)
* Config: wrolpi.yaml is only ever config/wrolpi.yaml

When config/wrolpi.yaml was missing, the API searched the media
directory three levels deep (hidden directories too) and trusted the
first wrolpi.yaml it found. A torrent, download, or git repo holding a
wrolpi.yaml (e.g. torrents/.1/wrolpi.yaml) would become the config, and
the real one was never created. The Controller and scripts already read
only the fixed path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Config: shorten the wrolpi.yaml comment to the rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:06:06 -07:00
lrnselfreliance
d6a8363903
Torrents: refuse to download into the media directory itself (#1038)
* Torrents: refuse to download into the media directory itself

A torrent's files are chosen by whoever made it. Saved in the media
directory itself, a torrent holding a config directory would put its
files in WROLPi's config directory. Downloads now need a directory in
the media directory. Share still seeds a top-level directory from the
media directory: its files are the shared directory's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Torrents: refuse a WebUI save path WROLPi would refuse

A torrent added in qBittorrent's WebUI to the media directory itself (or
outside the library) is removed from qBittorrent, its files kept, and a
"Torrent Refused" event says why. A torrent moved there in the WebUI is
moved back to its config's save path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Torrents: keep an untagged WROLPi torrent; refuse a WebUI download path

A WROLPi torrent whose tag was removed in the WebUI was removed from
qBittorrent when its save path was refused, and forgotten (config and
.torrent deleted) on the next pass. It is now tagged again and kept as
the config says, as adopt() did before.

qBittorrent keeps a downloading torrent's incomplete files in its
download path, which the WebUI can set per torrent. A WebUI torrent with
a refused download path is removed (files kept); a WROLPi torrent's is
set back to its save path. A finished torrent's download path is unused,
and left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:05:52 -07:00
lrnselfreliance
b1334c834b
VPN: read only the VPN files the Controller writes (#1037)
* VPN: read only the VPN files the Controller writes

controller.yaml's vpn.config_file and vpn.auth_file were joined to the
config directory as-is. The tunnel runs as root, so an absolute or ../
path would have it read (and send to the VPN server) any file, and the
Controller API would return any file's text as the VPN config.

Both now accept only vpn/wireguard.conf, vpn/openvpn.ovpn, and
vpn/openvpn-auth.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* VPN: refuse a VPN file which links outside the vpn directory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* VPN: read each VPN file once, never through a symlink

The check resolved the path, then the file was opened again later: by
root OpenVPN for the login (--auth-nocache re-reads it). The wrolpi user,
who owns the library, could swap the file for a symlink in between.

read_vpn_file() opens with O_NOFOLLOW and reads once. OpenVPN gets a
0600 copy of the login in the run directory, removed when the tunnel
goes down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:05:37 -07:00
lrnselfreliance
04ddc7c63c
Species: a monthly build of the packs, signed where the key is (#1036)
* Species: a monthly build of the packs, signed where the key is

The build host builds the packs unsigned (inat-build.sh, a systemd timer), and the machine with the signing key
signs the hashes and the manifest from manifest.json alone (inat-publish.sh), so the packs never leave the build host
and the key never goes to it. build_inat_regions.py --no-sign now still writes each pack's sha256, and --sign signs
such a build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: sign only a well-formed build manifest, written again where the key is

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: inat-publish.sh passes the bucket to the upload, so a try stays out of the live packs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: the monthly build publishes nothing older than what is published

The version is the observations' publication date; a build of the same (or older) observations would replace the
published packs with an older version, and the prune would delete the newer ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:05:22 -07:00
Roland
e61d87483a
Bump version to 0.34.0-beta
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-11-29 19:50:13 -07:00
lrnselfreliance
a429db441e
iNaturalist species map (#1033)
* Add iNaturalist species pack build script

Builds one `inat-<region>-<version>.species.db` per map region from the
iNaturalist research-grade GBIF export (CC BY-NC 4.0). Each species row
links to its English Wikipedia article (via Wikidata) so Kiwix supplies
the details, and carries its range as compressed per-cell dots (0.1° from
all observations, 0.02° from precise ones only). A cell lookup table
answers "what lives near here", and FTS5 searches names. Packs, meta4
files and a signed manifest are written for upload to the CDN.

modules/map/species.py holds the pack format shared with WROLPi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Download iNaturalist species packs by subscription

A species subscription is one recurring (30 day) `species_catalog` Download
of the signed species manifest, saved in the downloads config like map
subscriptions. Each run creates a `species_pack` Download per subscribed
region, which aria2c checks against the manifest's signed hash before the
pack is moved into map/inat/; only then are the region's older packs
deleted.

The map's Manage tab gets a Species section: subscribe, unsubscribe (the
pack is kept), and delete a downloaded pack. Pack file names are built and
parsed in modules/map/species.py, shared with the build script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Search the downloaded species packs, with their range and Wikipedia article

- GET /api/map/species: search by name (every word a prefix), and/or what
  was seen within radius_km of lat/lon. Nearby species come first, most
  seen nearby first; an exact name match comes first of all.
- GET /api/map/species/<taxon_id>: details, and the species' article in
  the best English Wikipedia Zim (maxi, nopic, mini; newest), found by the
  libzim worker's new `find` op, else a search link for its name.
- GET /api/map/species/<taxon_id>/range?grid=low|high: GeoJSON dots.

Packs are read directly and read-only; a species in several regions is
merged (counts summed, bbox and range unioned).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use iNaturalist's common names in the species packs

Wikidata's P1843 holds many English names per species and the one we got
was arbitrary ("black-tailed deer" for mule deer, "Greek milkweed" for
showy milkweed).  The build now reads iNaturalist's taxonomy archive
(VernacularNames-english.csv) and takes each species' first name not tied
to a place ("quaking aspen", not Canada's "trembling aspen"), else its
first name; Wikidata's is only a fallback.  In us-west this names 30,642
of 52,015 species, up from 17,805.

--version publishes a rebuild of the same observations under a new
version, and --reuse-split rebuilds from the last build's region work
files instead of reading the observations again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species panel on the map: what lives here, and a species' range as dots

A 🌿 button opens the Species panel (it and nuclear mode share the
panel's place, so one closes the other).  It lists the species seen
within 10/30/100 km of the middle of the map, following the map as it
moves, with how often each was seen nearby; it can search by name and
filter by group.  Choosing a species draws its range: the 0.1° grid of
every observation below zoom 7, the 0.02° grid of precise ones from it
(or the 0.1° grid at every zoom when there is none), put back after a
style change and erased on Back or close.  "Zoom to range" fits its
bbox, and its Wikipedia article opens from the best Wikipedia Zim (or a
search, or where to download Wikipedia).

The panel is at most half the screen tall and clears the map's buttons,
so the range stays in sight on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species tests: neutral Oregon fixtures

Bend, Prineville (~47 km apart) and Crater Lake replace the earlier
fixture points; the cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: zoom to a range without its outliers, beside the panel

"Zoom to range" fitted the species' bbox, so a few planted trees far
away (giant sequoias in Seattle and Los Angeles) zoomed the map out to
the whole coast, and the panel covered part of the range.  It now fits
the range's dots less the outermost 2% on each side (from 20 dots), and
pads by the panel: beside it on a wide map, above it on a narrow one.
The outlying dots are still drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Help: the Species page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: months seen, a popup on each dot, and review fixes

Months: packs now keep how many observations each species had in each
month, and the months it was seen in each ~11 km square (a bit per
month).  The species details show a bar per month; clicking a range dot
opens a popup of that square: how often the species was seen there and
in which months, and the other species seen there, any of which can be
opened (GET /api/map/species/here).  Packs without months still work.

Review fixes:
- Common names: the archive's first listed English name, not the first
  without a place (which was an alias: "Robin Redbreast", "Wanderer",
  "Duck Hawk"); every other English name is kept in `other_names` and
  is searchable, and shown as "Also called".
- Only the newest pack of each region is read, so a version left beside
  a newer one is not counted twice; a finished download also removes
  older versions.  A name one pack lacks is taken from another.
- No bbox for a species whose packs are on both sides of the
  antimeridian; Zoom to range takes the short way across it, drops at
  least one outlier on each side from 20 dots, waits for the dots, and
  measures the panel against the map.
- Wikipedia Zims are tried one at a time, best first, all of Wikipedia
  before a selection of it.
- A failed search keeps the last list and says so; failed details no
  longer suggest downloading Wikipedia, and the range is still drawn.
- Species range dots are left out of PDF exports.
- Unsubscribe (species and map regions) is red again; the Manage table
  refreshes until a subscribed pack arrives; a refused Delete fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: less work for the WROLPi per search and range

Measured on a Pi 4 with the us-west pack, the panel's search (species
within 30 km, asked each time the map stops moving) took 146 ms, and a
wide species' fine range 280 ms and 2.7 MB of GeoJSON.

- Search ranks the matching species from bare (taxon, names, counts)
  tuples and reads only the species it returns in full: 30 km 87 ms,
  100 km 445 -> 277 ms, a broad name prefix 480 -> 200 ms.
- The range is sent as its sorted cells, as differences, and the
  browser makes the dots: the red-tailed hawk's fine range 34 ms and
  95 KB, its coarse range 87 -> 10 ms and 939 -> 29 KB.

A dot's popup asks for the species clicked, and always shows how often
and in which months it was seen in that square, not only when it is
among the most seen there.  The popup is drawn over the Species panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: a planet pack, every region in one file

`--planet` merges every region's pack into `inat-planet-<version>`
(counts and months summed, ranges, bboxes and lookup cells joined, the
first name a pack has), and adds it to the manifest; `--merge-only`
makes it from the region packs of a finished build.  An observation
exactly on a shared region edge is in both regions' packs, so the
planet counts it twice; that is rare enough to leave.

On the device the planet is a choice in the Species catalog, and when
its pack is downloaded it is the only one read, so the regions it holds
are not counted again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: sizes of the 20261129 packs; no hang re-signing a manifest

The packs grew about 15% with months and other names; the planet pack
is 993 MB.  Re-signing a manifest (--planet --merge-only) hung: gpg
asks before replacing an existing signature and nothing could answer.
The old signature is now removed first.  Help: a dot's popup, months,
other names, and the planet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: the planet from each observation once; overlaps counted once

Map regions overlap, some widely (southern Arizona is in us-west and
mexico, north Africa in five regions): about 42M of 173M observations
are in two or more.  Merging the region packs counted those twice, so
the planet is now built like a region from every observation once.
Its work is split into 8 files by species and built a file at a time
(all at once its sets would need ~25 GB).  `planet` is a region for
--regions, built by default, and the manifest lists every pack of the
version in the folder, so a planet-only run keeps the regions.  The
merge and its flags are gone.

On a device with overlapping region packs, a square both hold was
counted twice in "near" and in a dot's popup; each square now counts
the larger of the packs' counts.  Species totals still add up across
overlapping packs; the planet pack is exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Help: Species screenshots from the planet pack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: Zoom to range fits the cluster of dots nearest the view

On the planet pack, giant sequoia (planted in Britain, New Zealand and
elsewhere) zoomed out to the whole world: far more than the 2% of dots
the zoom left out were planted away from its groves.  Dots in touching
2° squares (about 220 km, also across the antimeridian) are now one
cluster, and Zoom to range fits the cluster nearest the middle of the
map: California from Yosemite, the planted trees from London.  A range
spread across a continent is one cluster.  Help updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Species: Planet is listed first on the Manage tab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:24:19 -07:00
lrnselfreliance
8478fc7229
Downloads: an edit form for Git downloads, so an orphaned one can be deleted (#1035)
A Git download's edit modal was empty, so a Git download left behind by a
deleted Repo could not be deleted.  The form shows the URL, says whether
the Repo still owns it, and has Delete and Cancel.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:23:44 -07:00
lrnselfreliance
d34b2a7088
Add QR codes to the ATAK map sources, share one QR component (#1034)
Some checks failed
Backend Tests / api-tests (core) (push) Has been cancelled
Backend Tests / api-tests (files) (push) Has been cancelled
Backend Tests / api-tests (media) (push) Has been cancelled
Backend Tests / api-tests (rest) (push) Has been cancelled
Backend Tests / api-contract-tests (push) Has been cancelled
Backend Tests / api-migrations-and-start (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Cypress Tests / cypress-component-tests (push) Has been cancelled
Cypress Tests / cypress-e2e-tests (push) Has been cancelled
Dead Code / vulture (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled
The ATAK tab's HTTP and HTTPS map source rows get a QR code button beside
the copy button, so a phone can scan the address and download the map
source file.

QRCodeImage, QRCodeModal, and QRCodeButton (components/QRCode.js) replace
the five copies of the night-mode-safe white field + modal used by Share,
Donate, the hotspot settings, and the QR code calculator.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 16:27:26 -07:00
lrnselfreliance
2c3300b8b0
Torrents over a fail-closed VPN (#1026)
Torrents reach the Internet only through a fail-closed VPN (WireGuard or
OpenVPN, any provider), so peers never see a WROLPi's own address.

- A network namespace (Pi/Debian) or the vpn container (Docker) with an
  nftables kill switch; NAT-PMP or fixed port forwarding.
- qBittorrent inside it, sandboxed; torrents kept in config/torrents/.
- Torrent download form, Torrents page, Share as torrent, nav warning, and
  VPN settings in both Controller UIs.
- Help docs: Torrents, and The VPN for Torrents.

QA'd on a Raspberry Pi with a real provider over WireGuard and OpenVPN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 14:26:24 -07:00
lrnselfreliance
633b125dc6
Controller: link to the main UI on :8443 for Docker installs (#1029)
The fallback Controller UI picked the main UI's port by sniffing its own URL:
only port 8080 mapped to 8443, and any https page dropped the port. Loaded
from https://host:8443/controller/, the Continue/Proceed links pointed at
https://host/. All four links now share one base chosen by docker_mode.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 12:49:43 -07:00
lrnselfreliance
b372a5fc90
Bump readability-extractor 0.0.6 → 0.0.16 in npm-tools (#1028)
Also bumps @mozilla/readability 0.4.4 → 0.6.0 and dompurify 2.x → 3.x.
Same CLI and the same output keys (plus publishedTime).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 12:00:17 -07:00
lrnselfreliance
34eeebb8b8
Bump serve 12.0.1 → 14.2.8 in npm-tools (#1027)
* build(deps): bump ajv and serve in /npm-tools

Bumps [ajv](https://github.com/ajv-validator/ajv) to 8.18.0 and updates ancestor dependency [serve](https://github.com/vercel/serve). These dependencies need to be updated together.


Updates `ajv` from 6.12.6 to 8.18.0
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.6...v8.18.0)

Updates `serve` from 12.0.1 to 14.2.8
- [Release notes](https://github.com/vercel/serve/releases)
- [Changelog](https://github.com/vercel/serve/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vercel/serve/compare/12.0.1...v14.2.8)

---
updated-dependencies:
- dependency-name: ajv
  dependency-version: 8.18.0
  dependency-type: indirect
- dependency-name: serve
  dependency-version: 14.2.8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update serve test pin to 14.2.8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Disable serve's per-request logging

serve 14 logs every request by default; -L keeps the journal as quiet
as it was with serve 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:40:19 -07:00
dependabot[bot]
712c4d9abc
build(deps): bump systeminformation from 5.33.1 to 5.33.26 in /app (#1015)
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 5.33.1 to 5.33.26.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/compare/v5.33.1...v5.33.26)

---
updated-dependencies:
- dependency-name: systeminformation
  dependency-version: 5.33.26
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-28 11:30:56 -07:00
dependabot[bot]
762b5ff6a0
build(deps): bump follow-redirects from 1.16.1 to 1.16.3 in /app (#1013)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.16.1 to 1.16.3.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.16.1...v1.16.3)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-28 11:30:53 -07:00
lrnselfreliance
ee30d99212
Map tiles for ATAK and iTAK (#1024)
* Map tiles for ATAK and iTAK

A new service, wrolpi-tiles (tiles/), draws WROLPi's map as 256 px raster
tiles from the map's PMTiles with MapLibre Native (mapli), so ATAK and iTAK
can use the map as a map source, and ATAK can download an area of it.

- Tiles are drawn in blocks of 4x4 (ATAK asks for tiles in quadtree order),
  each block once however many requests wait on it, in render processes of
  their own.  Phones are served in turn.
- A tile is always a 200: blank where there is no map, or when it was not
  drawn before ATAK's 5 second timeout.  Five failed tiles in a row stop an
  ATAK download, and a 401/403 stops the map source.
- Drawn tiles are kept in /var/cache/wrolpi-tiles, with a size cap and a
  free-space floor; JPEG, about a seventh of a PNG.
- The basemap is the web map's (protomaps-themes-base, light), kept equal
  to it by a Jest test.  Unreadable map files and missing map fonts are
  left out rather than failing every tile.
- Caddy serves it at /tiles/ over HTTPS and on port 8088 over plain HTTP
  (a phone must trust WROLPi's CA for HTTPS).  /tiles/wrolpi.xml is the
  MOBAC map source to import.
- A separate service with lower CPU priority and a memory cap, so a phone
  downloading an area cannot slow the API.  Docker runs it from the api
  image.
- The map page has an ATAK tab: the map source links, how to use them, and
  what the tile service is doing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: bound PMTiles decompression before it happens

A few bytes of a downloaded map file could decompress to far more than the
cap, which was applied only afterwards.  Decompress at most MAX_METADATA_SIZE,
as modules.map.pmtiles does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: never send a blank for a late tile; start render processes with the service

QA on a Pi 4 found the first tile after a start sent blank: starting the
render processes and the first draw took 4.5 s, past the deadline.  A
downloader (ATAK's, iTAK's) keeps whatever a tile request returns, so a
blank sent for a late or failed tile is a hole in its offline map for
good.  Such a tile is now a 503 (ATAK tries each tile twice; only 401 and
403 stop a map source), and the render processes start with the service.

Also:
- OOMScoreAdjust=500: Raspberry Pi OS disables the memory cgroup, so
  MemoryMax does nothing there; the tile service is killed before the API.
- sanic-ext's auto extensions are off in the tile service.
- The map's ATAK tab is before Manage: Manage is the last tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: put backgroundColor back in the map source; iTAK requires it

iTAK refuses a MOBAC map source without <backgroundColor> ("The data couldn't
be read because it is missing").  ATAK ignores it.  It is the map's own
background color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: leave out the map files hidden on the Manage tab, as the web map does

maps.yaml's ignored_files names the map files the user hid; the web map
does not draw them, and the tiles drew them anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: bound the render processes' memory and the tiles-per-second times

QA on a Pi 4, a phone taking 123,000 tiles offline: each render process
grew from about 270 MB to 370 MB (MapLibre keeps what it has read and
drawn) and did not shrink when idle.  A render process is now replaced
after 2,000 blocks.  The serve times behind tiles-per-second were only
forgotten when the status was asked for; they are forgotten as tiles are
served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Map ATAK tab: iTAK takes an area offline too

An iPhone downloaded 123,000 tiles with iTAK and showed them offline with
none missing; the tab said only ATAK could.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Map ATAK tab: a button to clear the tiles the tile service keeps

POST /tiles/cache/clear on the tile service (which keeps the cache's size)
removes the kept tiles; they are drawn again when next asked for.  The
button asks first, and says that maps already downloaded to phones are not
changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: measure the cache as the disk does; clear it at once, delete in the background

QA on a Pi 4 after a 123,000-tile download: the cache counted 375 MB of tile
bytes while its files took 660 MB of the SD card (each small file takes a
whole 4 KiB block), so the 1 GB cap allowed about 1.7 GB.  The cache is now
measured in disk blocks.

Clearing deleted 128,000 files in the request: about 40 seconds, with the
Pi's load warning on.  A clear (or a new style) now renames the tiles out of
the way at once and deletes them in a lowest-priority thread, pausing every
500 files; a deletion cut short is finished at the next start.  A tile drawn
again no longer counts twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Help: ATAK and iTAK

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: a page on port 8088 saying what it is

A person who finds port 8088 got a 404.  / (and /tiles/) is now a short page:
WROLPi's map tile service for ATAK and iTAK, the map source to open on a
phone, and links to the WROLPi app and the map's ATAK tab, made from the
address the page was reached by (Docker publishes the app on
TILES_HTTPS_PORT).  Port 8088 serves WROLPi's icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tiles: review fixes

- Caddy: a tile request is never redirected to the fallback page when the
  tile service is down or restarting (handle_errors on 443).  ATAK keeps
  whatever a tile request ends with, so the page was stored as the tile;
  it is now a 503 with Retry-After, which ATAK tries again.
- The cache's oldest tiles are found and deleted in a lowest-priority
  thread, pausing as it goes, not in the tile request which filled it.
- ATAK tab: only the newest status request writes the status, so a slow
  answer can not undo a newer one (or a clear).  It says when the page was
  opened on localhost and the addresses work only there, and names each
  map source as the app lists it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:21:45 -07:00
lrnselfreliance
92761e1c52
README: the food storage calculator is available (#1025)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 19:10:25 -07:00
lrnselfreliance
2db9e45d92
README: sync and backup are available (#1022)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 19:06:19 -07:00
lrnselfreliance
68d8eadd69
Fallout winds: make the daily download at 23 past the hour (#1020)
Some checks failed
Backend Tests / api-tests (core) (push) Has been cancelled
Backend Tests / api-tests (files) (push) Has been cancelled
Backend Tests / api-tests (media) (push) Has been cancelled
Backend Tests / api-tests (rest) (push) Has been cancelled
Backend Tests / api-contract-tests (push) Has been cancelled
Backend Tests / api-migrations-and-start (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Cypress Tests / cypress-component-tests (push) Has been cancelled
Cypress Tests / cypress-e2e-tests (push) Has been cancelled
Dead Code / vulture (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled
Daily downloads are spread over the day in slots which fall on the hour, when the
forecast service is busiest.  On .5 its TLS handshake stalled for minutes there,
failing the download.  The weather downloader now schedules its next run itself, a
day later at 23 minutes past the hour.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:23:54 -07:00
lrnselfreliance
f58c86af88
Fallout winds: retry a batch once when the forecast service can't be connected to (#1019)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
A connection failure on any batch failed the whole daily download, discarding the
batches already fetched and deferring the field to the next day.  A batch which can't
connect is now asked again a minute later, once, as an HTTP 429 already is.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:03:14 -07:00
Roland
4c9f413322
Bump version to 0.33.0-beta
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-11-25 17:35:11 -07:00
lrnselfreliance
fcd9f1bc40
Help: the fallout simulator (#1018)
* Help: the fallout simulator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Help: screenshots of the fallout simulator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:31:34 -07:00
Roland
b57f64ee71
Bumping yt-dlp requirement.
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
2026-11-25 14:06:30 -07:00