Commit Graph

5360 Commits

Author SHA1 Message Date
Maurice 293a48c26a fix(db): keep check:pg-baseline speaking once the baseline is frozen
A frozen baseline still has its manifest verified, and the check now lists the
migrations that run on Postgres after the cut and what holds them. Every
problem it reports says what to do about it.
2026-11-17 23:03:50 +01:00
Maurice 80fca10784 feat(db): hold migrations after the Postgres cut to engineDdl in lint:dialect
A migration newer than the baseline's through (read from
assets/postgres/baseline.json) fails on a schema statement outside engineDdl,
a plain string column for addColumnIfMissing or a SQLite-only helper, and on a
SQLite spelling in an engineDdl postgres member. The advice names the two
steps, and the baseline cannot hold an allowance for these rules.
2026-11-17 23:03:49 +01:00
Maurice 830cd6e3b5 feat(db): print the Postgres side of a new migration with gen:pg-migration
The script builds a scratch database the way a boot does (the baseline, then
the migrations after its cut) up to the target migration, compares it with the
entities by PARITY-PG's rules and prints the remaining statements as the
postgres member of engineDdl. The scratch database is always dropped.
2026-11-17 23:03:49 +01:00
Maurice 0f338d5484 refactor(db): move PARITY-PG's schema comparison into the Postgres engine
Which comparator statements change nothing (drop not null on a live primary
key, spelling-only defaults and checks proven by a rolled-back fingerprint, the
hand-ported triggers) is now one module the parity test and the migration
generator share, with unit tests for the sorting and the rollback.
2026-11-17 23:03:49 +01:00
Maurice a99cd40f4d feat(db): write a migration's schema change once per engine
A migration after the Postgres baseline's cut runs on both engines, but its DDL
is not one language. engineDdl(this, { sqlite, postgres }) queues the statements
of the engine the migration runs on, like addSql, and addColumnIfMissing takes a
column definition per engine, both picked in the dialect layer so a migration
never branches on the engine itself.
2026-11-17 23:03:49 +01:00
Maurice f3ea50b17b fix(db): cut the Postgres baseline at the newest migration again
The merge with dev brought eight migrations written for SQLite (DATETIME,
INTEGER PRIMARY KEY without identity); run verbatim on Postgres they stop the
first boot. No Postgres install has been released, so the baseline moves to
the newest migration and those tables come from the entities.
2026-11-17 23:03:49 +01:00
Isaias Tavares 2e3762afe1 feat(db): run TREK on PostgreSQL
TREK runs on PostgreSQL when TREK_DB_URL is set, and on SQLite as before
otherwise: an engine port under src/db/engine, the dialect helpers under
src/db/dialect, a Postgres baseline for the migrations up to the cut,
pg_dump/pg_restore backups, a probe of every repository method against a
real server and a Postgres test lane in CI.
2026-11-17 23:03:33 +01:00
Maurice 17b47b38b9 test(places): wait for the new tag's tick, not only the tag
The tag reaches the trip's list before the form ticks it, so the button
could be found in the moment between and read as not pressed.
2026-11-17 10:12:33 +01:00
Maurice 494c848ec9 chore(i18n): drop the place form's old text placeholders
The texts card explains each text in a line of its own and the phone sheet
follows it, so the description, notes and day note placeholders are no
longer read anywhere.
2026-11-17 09:41:30 +01:00
Maurice c203b0a597 test(places): look for the hidden tab's formatting buttons too 2026-11-17 09:27:49 +01:00
Maurice b36fefdf5d test(places): keep the place form's test file at its size
The tab changes had grown it past its line budget; the labels of the texts
are covered by PlaceFormTexts' own tests.
2026-11-17 09:20:46 +01:00
Maurice 8611359f7c chore(lint): lower the tests' non-null count to what they hold 2026-11-17 09:18:50 +01:00
Maurice c8e48460b6 fix(places): settle the gates for the place form rework
The text tabs name their field type for the switch, so it type-checks. The
colour field's sliders run left to right in every language and say so with
dir=ltr and a logical inset. The new phone fields take their sizes from the
type tiers or fs() instead of rem literals, the category field builds its
icon as an element, and the ESLint and theme baselines come down to what the
tree now holds. The tests follow the tabs (only the open tab's field and
formatting bar are shown), the category list and the files row, whose link
button keeps its place before attach.
2026-11-17 09:08:41 +01:00
Maurice 5ecf3001af fix(places): keep the hooks' helper types to their files
knip counts an exported type nothing imports; the tabs' row type and the
hours' field type are only used where they are declared.
2026-11-17 08:57:18 +01:00
Maurice 2c5beee849 fix(deps): hold jsdom at 29 and isomorphic-dompurify at 3, and settle the gates
jsdom 31 failed 56 client test files: it simplifies calc() and reads an
unset border as none in computed styles, and its File no longer carries
what the upload tests hand it. It moves back to 29 with isomorphic-dompurify
3, which needs it; the lockfile is resolved from the one before the bump, so
both sit at the root as they did. jsdom stays a root devDependency, so npm
keeps the copy vitest resolves at the root.

knip 6.45 reports tsconfig-paths, which test.yml loads from the server, as
unlisted rather than unresolved; it is the server's dependency. The removed
RTL text plugin took one swallowed catch with it, so that ESLint count is
lowered to what the tree holds.
2026-11-17 08:49:37 +01:00
Maurice a3f6635633 feat(places): colour tags, tabs for the texts and opening hours on the phone
Tags on the place form are pills in their own colour, with a palette under
the dot that recolours a tag for the whole trip (PUT /trips/:id/tags/:id was
there already, the client now reaches it through repo and store) and a
custom colour field of its own instead of the system picker. A new tag is
made in a colour picked the same way.

Description, notes and the note for one day's visit sit in one card under a
switch, each with a line on where the text shows up; the day tab is named
after its day and is only there with one visit in context. Nothing about the
three fields changes underneath.

Opening hours get a switch for open around the clock next to closed. Google
writes a place open all week as one period on Sunday that never closes; it
read as Sunday open and every other day closed, and now opens every day.

The phone form follows the desktop: category as one field with a list, tags
in one field, the texts switch, and phone, e-mail and opening hours, which it
did not have. The hours and the text tabs are shared hooks (usePlaceHours,
usePlaceTextTabs). Files and costs on the phone sheets are drawn as fields
like the rest, and the paste hint, a keyboard shortcut a phone has no use
for, is gone with its key.
2026-11-17 08:44:46 +01:00
Mariano 33d074c786 feat(places): tags on places, owned by the trip
A place keeps its one category, which decides its marker, and can now carry
any number of tags as extra labels to filter by.

- Tags belong to the trip (tags.trip_id): every member sees the same list and
  whoever may edit the trip's places adds, renames and deletes. Personal tags
  stay what they were.
- The place form picks them on desktop and mobile through one shared hook,
  usePlaceTags, and can add a new tag to the trip on the spot.
- The existing category filter of the places list lists the tags as well.
- Tags show on the place (inspector pills, phone place sheet); the marker is
  untouched.
- MCP: create_place, create_and_assign_place and update_place take `tags`,
  and list/create/update/delete_trip_tag manage a trip's tags.
- /api/trips/:tripId/tags and the tripTags:changed event keep every client
  of the trip in step.
2026-11-17 08:44:10 +01:00
Maurice e952586f60 chore(deps): keep the rollup musl pins on the installed rollup
The minor and patch group raised the Alpine pins to 4.68.3 while rollup
itself stayed on 4.62.0, so npm nested a second 4.62.0 copy under rollup
and the hoisted pins went unused. The pins follow rollup again.
2026-11-17 07:56:26 +01:00
Maurice 35c0cd35ef ci(dependabot): leave TypeScript majors to be moved by hand
TypeScript 7 is the native compiler without a JavaScript API, which
typescript-eslint, the coverage instrumenter and the Postgres probe need.
2026-11-16 21:20:33 +01:00
Maurice a1d753a975 style(i18n): format Arabic and Thai locales for Prettier 3.10
Prettier 3.10 measures the width of Arabic and Thai text differently, so
strings that fit the line now stay on it.
2026-11-16 21:20:33 +01:00
Maurice 35dbcc2103 chore(deps): bump npm dependencies, jsdom 31, isomorphic-dompurify 4 and dotenv 18
The minor and patch group of #3108 without MikroORM: 7.2.9 refuses to set
the OAuth client reference from its client_id (the Postgres probe fails on
OauthTokens.insertToken and OauthConsents.upsertGrant), so MikroORM stays on
7.2.8 and with it better-sqlite3 and kysely, which it pins exactly.

mapbox-gl 3.33 shapes right-to-left text itself and removed setRTLTextPlugin,
so the engine registers nothing any more and @mapbox/mapbox-gl-rtl-text, its
Vite alias and the registration guard go. The WebAssembly module it loads
instead comes from api.mapbox.com, which the CSP already allows.

jsdom 31 and isomorphic-dompurify 4 move together, since the sanitizer needs
jsdom 31. jsdom is also a root devDependency now: listed only in the client,
npm nests it under client/ where vitest's built-in jsdom environment does not
find it.

dotenv 18 is loaded through `import 'dotenv/config'` only, which stays quiet.

Closes #3108, closes #3109, closes #3110, closes #3112
2026-11-16 21:20:33 +01:00
Maurice 3c054fffa0 chore(plugin-sdk): bump @clack/prompts from 1.8.1 to 1.9.0
Closes #3106
2026-11-16 21:20:32 +01:00
Maurice c1bad1204c ci: bump SonarSource/sonarqube-scan-action from 8.4.1 to 8.5.0
Closes #3107
2026-11-16 21:20:32 +01:00
Maurice 9890f31d10 chore(dawarich): keep the stay naming helpers module-private 2026-11-16 16:57:03 +01:00
Maurice 04e0dc26e1 fix(dawarich): name a stay from its geocoded points when Dawarich sends a placeholder
Since 1.22 Dawarich sends a visit's display name, which is "Unknown Location"
for a visit without a place. TREK showed that as the name, although the points
recorded during the stay are reverse geocoded. A stay without a real name now
takes its place's name or address, and otherwise the city most of its points
fall in. A visit without a place also takes the middle of its points as its
coordinate.

Closes #3105
2026-11-16 16:34:47 +01:00
Maurice eb56e77600 fix(studio): hold photos back only in the export's sheets
The print-mode photos held their source back for the print view, but the
assistant also draws pages in print mode and needs its photos loaded. Only
the export's sheets now ask for it, the loader reads a minimal print
document like whenReady, and the new test helpers stay within the client's
TypeScript target and lint baseline.
2026-11-16 10:47:50 +01:00
Maurice 1a50e7f0ac fix(costs): settle up only in the currency the debts were read in
After switching the display currency the flows stayed in the old one until
the new read landed, or for good when it failed offline, and a settle-up
booked those amounts in the new currency. The ledger now remembers the
currency it read, drops answers to older reads and only settles flows read
in the one shown.
2026-11-16 10:45:24 +01:00
Maurice 2a134babbc fix(trips): keep a visit's own stay when a trip is copied
insertAssignmentCopy took stay_minutes but never wrote it, so a copied trip
fell back to the place's duration for every visit.
2026-11-16 10:45:24 +01:00
Maurice 2180175040 fix(mail-ingest): refuse an undo when the booking was moved in between
A move keeps the entry's resolution and changes only its trip and created
ids, so an undo that read them before a move landed still claimed the entry,
removed nothing and left the moved booking behind. The claim is now bound to
the trip and ids it was read with.
2026-11-16 10:45:23 +01:00
Maurice 856d1e5ea5 fix(flight-live): keep a past flight's times in its booking view
The booking dialog and the phone sheet hid their departure and arrival tiles
as soon as the store held any leg of the flight, but a leg long over or never
seen by the feed draws no live card, so such a flight showed no times at
all. Both views now hide the tiles only for legs that get a card.
2026-11-16 10:45:23 +01:00
Maurice ea5542f8eb fix(plugins): require budget_edit for a plugin switching a trip's costs mode
trips.update checked trip_edit and the archive and cover permissions, but
let costs_mode through without the budget_edit check REST and MCP apply.
2026-11-16 10:45:23 +01:00
Maurice 40dea84085 fix(flight-live): leave a through flight's first sector aircraft to that sector
With two booked sectors under one flight number, the second is in its watch
window for the whole first one, and the aircraft flying the first sector was
read as the second having departed, with its departure notice hours early.
An aircraft that fits a sibling sector better is now left to it.
2026-11-16 10:45:22 +01:00
Maurice 89f7908359 fix(mail-ingest): let the pause notice job keep its cursor row
The CHECK on mail_ingest_cursor.transport did not allow 'notice', so the
hourly job that tells address holders the import is paused failed on its
lease insert every run. A new migration rebuilds the table with 'notice'
allowed, keeping every reader's position and lease.
2026-11-16 10:45:22 +01:00
Maurice f02c4c57c3 fix(android): keep the offline copy to its own server and whole across a refresh
The offline flag lived in the process, so after picking another server the
recreated activity still answered with the previous server's start page. The
copy now stands in only for the server it was activated for, and an online
start clears it.

A refresh stored the new start page before the build files it names, so one
cut off halfway left a page whose scripts were missing. The page now goes in
last, once every file is stored.
2026-11-16 10:45:21 +01:00
Maurice 5b0412bc2c fix(mail-ingest): read a mail of bare sender lines in one pass
isBareHeaderBlock rescanned the header run below every sender line, so a
plain-text mail of nothing but "From:" lines without a subject took
quadratic time and held the event loop for seconds before the address was
even checked. The block starts are now worked out for all lines in one pass
from the bottom up, with the same rule.
2026-11-16 10:45:21 +01:00
Maurice aa8d041a33 fix(studio): load a large book's photos a few at a time for the PDF export
Every printed photo got its src at once, off screen in the editor and again
in the print frame, so a journey with a few hundred photos asked for every
original in parallel and the browser failed with insufficient resources.

The print markup now holds the source back, and the print view hands it over
four at a time, retries a failed photo once, gives up on one that never
answers and shows the progress on the Save button.

Closes #3102
2026-11-16 10:30:32 +01:00
Maurice 24bc132476 fix(planner): keep an untimed stop between the bookings it was dropped between
The desktop day list hides the stop a lodging booking puts on the day, but
the places are stored across the full day. Bookings and notes were positioned
by counting only the visible places, so every hidden row ahead of a stop
pushed it one slot behind the booking it was dropped above, and it fell
below the evening flight on every drag or arrow move.

Position bookings and notes in the same full-day count the places are
stored in, and share that count with the page's reorder.

Closes #3100
2026-11-16 10:29:47 +01:00
Maurice f728b568ed test(plugins): avoid a non-null assertion in the new frame visibility tests
The added test used querySelector('iframe')! which pushes the tests
no-non-null-assertion count one over its frozen baseline; cast instead.
2026-11-15 20:39:19 +01:00
Maurice c4a2a91578 fix(plugins): pause and suspend plugin frames when they leave the screen
A tester reported that their own plugin, fine on the web, slowed the app down
badly on a phone. A sandboxed plugin iframe keeps running its timers, polling and
animation even off screen, and on a phone it shares the WebView's main thread with
the whole app, so a heavy one janks everything.

The frame now watches whether it is on screen and the app in the foreground
(IntersectionObserver + page visibility) and forwards it as trek:visibility, so a
plugin can pause its work while hidden; the design kit exposes trek.onVisibility /
trek.isVisible and pauses its own CSS animations via data-hidden. On a phone a
dashboard-widget plugin scrolled well out of view is suspended outright: its iframe
is unmounted and a placeholder holds the widget's height, so an offscreen widget
costs nothing and remounts when it scrolls back.
2026-11-15 20:33:27 +01:00
Maurice a58d0117c6 fix(packing): a lighter visibility switch and bringers side by side in the item window
The picked visibility is a raised light segment on the grey track, like the
other pills in the window, instead of a black block, and the +N of further
bringers sits beside the first picture rather than over its initial.
2026-11-15 15:08:26 +01:00
Maurice 439736e904 fix(packing): stack the item window and the Lists menu on the app's layers
The item window sits on the layer of the other floating menus and the Lists
menu just above the bars, through the z-index tokens instead of numbers, and
the theme baseline follows the files the redesign left with fewer literals.
2026-11-15 12:51:20 +01:00
Maurice 71510a62f3 fix(packing): take a bringer off in one transaction, and settle the last baselines
Clearing a common item's owner and dropping the bringer row now happen inside
one unit of work, so a failure cannot leave one without the other. The lint
and RTL baselines follow the rows that lost their last physical sides.
2026-11-15 12:40:01 +01:00
Maurice a65342574a test: bring the packing, todo and dashboard changes in line with the CI gates
Lower the lint and strict baselines the redesign made smaller, keep the
detail window and the todo tab under the complexity limit by moving their
choices into helpers, read the toast in the detail test through its module
rather than a window global, keep the new dialog focus case in the module's
existing test file, show the panel's progress once in the standalone header,
and point the planner wiring tests at the Lists menu.
2026-11-15 12:30:14 +01:00
Maurice 783a697d95 fix(dashboard): a long trip name in an upcoming booking ends in an ellipsis
The badge holds its text in an element of its own, which the ellipsis needs
inside a flex badge, and the row's middle column may shrink below its content.
2026-11-15 12:23:27 +01:00
Maurice b8966330e0 test: keep the bringer and panel width changes within the lint and RTL ratchets
The bringer tests read their items through a small type instead of any, the
panel hook names its two ceilings after the panels rather than the sides, and
the stored-width test runs on a window wide enough for the map's share.
2026-11-15 12:22:12 +01:00
Maurice cb1b5dd88c fix(dashboard): upcoming bookings read cleanly, pending as a letter on the icon
The PENDING pill beside a title broke long names over several lines; a small
dot on the type icon's corner now carries the status's first letter (A for
Ausstehend, P for Pending), with the word as its tooltip and accessible name.
The time and the trip or place below the name are soft badges instead of a
line strung together with dots. Desktop and phone alike.
2026-11-15 12:22:05 +01:00
Maurice a1f063c703 fix(collections): the add-place search reads as one field and takes the focus
The search runs from a small button inside the field, dark once there is
something to look for, instead of a greyed-out button beside it, and the row
keeps its distance from the address box below. A dialog can now mark the field
it starts in, so this one opens in the search rather than in the name above it.
2026-11-15 12:11:43 +01:00
Maurice b65a1bb65c feat(collections): the map's padlock, and a picked place on the full map keeps the map
The collections map gets the trip map's padlock (#2010): locked, a click on a
place leaves the camera where it is, so places can be clicked through without
the map zooming in and out. One setting for both maps. On the full map a
picked place no longer brings the list back: its details dock on the map's
edge, or open as a sheet on a narrow screen.
2026-11-15 12:11:42 +01:00
Maurice d1cb0a418a feat(todo): the phone's task list takes the look of the packing list
The progress card says how many tasks are done with a slim bar, a round "+"
for a new task and a "..." for the order and the lists; the filters sit in
one tinted track, with "Mine" kept short there; and the tasks are rows of one
card, with priority and due date under the name and the assignee's face.
2026-11-15 12:11:40 +01:00
Maurice 5536d29cbf feat(packing): a calmer packing list, with every item's choices in one window
A row now shows its box, its name and only what is set: the amount from two
up, the pieces packed while packing, and who brings it. A click on the name
opens a small window at the row with the list, amount, pieces packed, weight,
bag, who brings it and who sees it, each as one pill, plus copy and delete,
instead of fields, a bin and menus in menus on every row. Above the lists the
Lists bar keeps Add list and gathers templates, import, export, the order,
hiding packed items, the bags on a narrow screen and the clean-up in one menu;
the progress moves next to the Shared/My list switch. The bag overview stays.

The phone follows the same shape: one "..." sheet for the list's actions, a
sheet per list for its own, a slim row and an item sheet that saves as you go.
Who may change what about an item lives in one module both views read.
2026-11-15 12:11:15 +01:00