mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
docs(wiki): bring the wiki in line with 4.0.0 (#2034)
* docs(wiki): correct the install and operations pages for 4.0.0 Quick Start passed docker an empty ENCRYPTION_KEY: an assignment prefix is not expanded on the same command line, so the server silently generated its own key instead of taking the one the page told you to set. The tag examples pinned to the 3.x line, the documented tmpfs size did not match the shipped compose file, and several .env values were described as reaching the container when compose never interpolates them. * docs(wiki): match the MCP reference to the registered surface The scope table was missing the whole Collections group and the totals said 27 scopes across 13 groups where the code registers 29 across 14. The Cloudflare link on the setup page pointed at an anchor on its own page instead of the heading on Troubleshooting. * docs(wiki): correct the plugin and admin pages Three links to Plugin-Development carried a .md suffix, which does not resolve on the wiki. The admin pages described tabs, permissions and storage behaviour that had moved on. * docs(wiki): bring the feature pages back in line with the app Costs still documented the old panel, where categories could be added, renamed, reordered and deleted; they are fixed now and the panel is a day-grouped ledger with settlements. Trip sharing, journeys, maps, packing, reservations and the account pages had all drifted in the same way. * docs(wiki): cover the pages the first pass did not reach The MCP catalog listed 168 of the 201 registered tools; the settlement tools and rate_place were missing here and the Collections family from the addon page. Several resource rows claimed a trips:* scope where the handler asks for trips:read. * docs(wiki): tighten the corrections a review picked apart The audit-log resource is the row id, not the credential id; an admin password reset does not bump password_version the way the page implied; and a few of the new paragraphs described behaviour more confidently than the code supports. * docs(wiki): fix what a last read-through caught Costs shows every figure in your display currency, not the trip's, and an expense with no payer still counts against the members it is split between. Studio's cutoff is a 1024px viewport rather than phones alone, and the Integrations tab is gated on the providers an admin has configured. * docs(wiki): the last few the review caught A passkey satisfies the MFA policy everywhere except the WebSocket handshake, which still asks for TOTP, so a passkey-only account under that policy gets no live updates. Mobile optimizes a day from two places, not three. The ctx.db row carried an unescaped pipe that split the table, and the Backups table linked with a wiki link whose pipe did the same.
This commit is contained in:
@@ -47,7 +47,8 @@ Both are membership-checked against the current user — same gate as `ctx.trips
|
||||
const place = await ctx.places.create(tripId, { name: 'Teamlab', lat: 35.62, lng: 139.78 })
|
||||
const day = await ctx.days.create(tripId, { date: '2027-04-02', notes: 'Odaiba' })
|
||||
await ctx.itinerary.assign(tripId, day.id, place.id, 'buy tickets first')
|
||||
// days.create accepts { date?, notes?, position? }; set a day title later with ctx.days.update(tripId, day.id, { title: 'Odaiba' }).
|
||||
// days.create reads { date?, notes? } and always appends at the end — a position is honoured on the REST route only, not on the plugin path.
|
||||
// Set a day title later with ctx.days.update(tripId, day.id, { title: 'Odaiba' }).
|
||||
```
|
||||
|
||||
Updates and deletes mirror the REST app exactly (`ctx.places.update/delete`,
|
||||
@@ -257,8 +258,8 @@ whole point: you can be handed someone's push token without being handed their t
|
||||
Targeting a **self-hosted** Gotify? Your manifest can't name the user's hostname, so add
|
||||
`"operatorEgress": true` and let the admin add the real host after install
|
||||
(Admin → Plugins → Allowed hosts). See
|
||||
[Plugin-Development → Operator-supplied egress hosts](Plugin-Development.md#operator-supplied-egress-hosts-operatoregress),
|
||||
plus [Notification channels](Plugin-Development.md#notification-channels) for the event list, the
|
||||
[Plugin-Development → Operator-supplied egress hosts](Plugin-Development#operator-supplied-egress-hosts-operatoregress),
|
||||
plus [Notification channels](Plugin-Development#notification-channels) for the event list, the
|
||||
"configured" rule, and the `TREK_PLUGIN_ALLOW_PRIVATE_EGRESS` flag you need if the service runs
|
||||
on your own LAN.
|
||||
|
||||
@@ -377,7 +378,7 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
Both jobs and scheduled tasks run with **no acting user** (trip reads are refused; only your own db + declared egress). `ctx.scheduler.set` is an upsert by name and survives restarts. Caps: ≤100 tasks/plugin, ≤128-char name, ≤8 KB payload, recurring interval ≥60s, ≤1 year out.
|
||||
Both jobs and scheduled tasks run with **no acting user** (trip reads are refused; only your own db + declared egress). `at`, `in` and `every` upsert by name — scheduling the same name again replaces the pending task — and survive restarts. Caps: ≤100 tasks/plugin, ≤128-char name, ≤8 KB payload, recurring interval ≥60s, ≤1 year out.
|
||||
|
||||
---
|
||||
|
||||
@@ -387,7 +388,7 @@ Seven declarative hooks let a plugin push data into TREK's own screens — the h
|
||||
|
||||
```js
|
||||
hooks: {
|
||||
// hook:table-contributor — cells/buttons on a row. view ∈ reservations|places|day|costs|packing|files
|
||||
// hook:table-contributor — cells/buttons on a row. view ∈ reservations|transports|places|day|costs|packing|files|todos
|
||||
tableContributor: { async getContributions(view, tripId, ctx) {
|
||||
return [{ kind: 'column', entityId: 42, id: 'crowd', label: 'Crowd', value: 'Quiet', tone: 'success' }]
|
||||
} },
|
||||
@@ -612,11 +613,11 @@ await ctx.accommodations.create(tripId, { place_id, start_day_id, end_day_id, ch
|
||||
await ctx.packing.create(tripId, { name: 'Passport', visibility: 'personal' })
|
||||
await ctx.todos.create(tripId, { name: 'Buy JR pass', due_date: '2027-04-01' })
|
||||
// Costs (budget) — needs 'budget_edit' + the Costs addon
|
||||
await ctx.costs.create(tripId, { title: 'Hotel', amount: 120, currency: 'EUR' })
|
||||
await ctx.costs.create(tripId, { name: 'Hotel', total_price: 120, currency: 'EUR' })
|
||||
// Collab notes/polls/chat — needs 'collab_edit' + the Collab addon
|
||||
await ctx.collab.createNote(tripId, { title: 'Meeting point' })
|
||||
// Day notes — needs 'day_edit'
|
||||
await ctx.daynotes.create(tripId, dayId, { content: 'Rainy — swap plans' })
|
||||
await ctx.daynotes.create(tripId, dayId, { text: 'Rainy — swap plans' })
|
||||
// Tags (the acting user's own)
|
||||
const tag = await ctx.tags.create({ name: 'foodie', color: '#4F46E5' })
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user