Skip to content
Skip to documentation content

Command / Reservations

Reservations

Browse reservation boards and let authorized managers define a board’s initial policy.

At a glance

Route: /workspaces/{workspace_id}/reservations.

Who can open this page: collection. The workspace must have enabled entitlement and an active, verified membership; ownership does not bypass verification. Sign in with Discord. Sidebar visibility is separate from endpoint permission. This documentation never submits workspace requests.

What you see

Each board card shows its name, reserved-village count, per-user parallel limit and Unlimited time or duration in minutes. New reservation opens Name, Reservation limit time with Hours/Days/Minutes, Unlimited reservation time, Reservations per user in parallel and Users can delete their own reservations. Defaults are 24 hours, one parallel reservation and unchecked unlimited/self-delete. Existing cards do not expose policy editing or board deletion.

Who fills in each field

Field or data What it means Who fills it in Can it be changed here? When it updates
Board name Manager chooses a trimmed nonempty name, maximum 120 characters. workspace-manager manage_members at creation Board creation
Time and parallel limits Board policy: unlimited or 1–525600 minutes, parallel limit 1–100 per user per board; allow-self-delete boolean. workspace-manager manage_members at creation Board creation
Active reservation count Counts unexpired reservations (or no expiry), scoped per board. signed-in-member, backend-derived Read-only Page load from latest recorded values

Calculations

Reservation expiration

reservation.expiry — Board policy determines active reservation lifetime.

Rule: expires_at=None for unlimited; otherwise creation now+timedelta(minutes=board.reservation_limit_minutes). Active if expiry absent or>now; expired if<=now. Board lock, expired cleanup, per-user parallel cap and unique board coordinate are enforced before creation.

Input Who fills it in Unit Optional Fallback
reservation_limit_minutes workspace-manager minutes Yes None =>unlimited
parallel_limit workspace-manager active reservations per user/board No Required; no fallback
Current time backend-derived UTC timestamp Yes datetime.now(UTC)

Output unit: timestamp or unlimited. Precision: Datetime timedelta precision. Rounding: No rounding. Clamp: No output clamp. Timezone: UTC.

Expiry equality is expired, not active. Time-limited board requires1..525600minutes; parallel cap1..100. Roster village missing is allowed for coordinates; board lock/unique coordinate still apply. Self-delete is independent board policy; managers and own allowed deletions use separate gates.

Canonical implementation and dependencies: reviewed source symbols. Non-canonical mirrors: none registered.

Used on: Reservations, Reservation Board

Freshness and updates

Page loading removes expired reservations before counting remaining entries. Counts then remain unchanged on the open screen until reloading. Board policies are stored at creation; a card click opens the detailed claims.

Actions and permissions

Who can perform each action / Who can take action: each actor below needs the exact grant and conditions, independently of page visibility. All writes retain workspace scoping; same-origin checks apply as listed.

Action Actor Permission
Create board workspace-manager Verified manage_members, enabled entitlement, same origin, valid policy
Open board signed-in-member Verified collection, enabled entitlement; board detail additionally requires current linked account

In Trapitan, choose New reservation, name the board, choose duration or Unlimited reservation time, set the cap and optional self-delete policy, then Create. Success navigates to the new board. Open board also requires a current linked account on its detail page, beyond the list’s collection gate.

States and edge cases

No reservation pages yet invites a manager to create one. Blank trimmed names are rejected; maximum name length is 120. The backend accepts 1–525600 minutes and 1–100 parallel claims per user per board. The browser multiplies Hours by 60 and Days by 1440; unlimited disables the duration controls and omits their value. The form shows server validation or Could not create the reservation page. Expiry is lazy cleanup on later list/detail/reserve requests, not a live countdown.

Reservation Board, Push Calls, Villages.

Source references

Source reviewed: 2026-10-07

Source references

Stable page ID: command.reservations.

  • src/trapitan/api/routes/web.py
  • src/trapitan/web/templates/reservations.html
  • src/trapitan/web/static/js/reservations.js
  • src/trapitan/authorization/dependencies.py
  • src/trapitan/authorization/policy.py
  • src/trapitan/api/routes/guards.py
  • src/trapitan/authorization/current_account.py

Calculation reservation.expiry:

  • Canonical implementation: src/trapitan/reservations/service.py — _active_reservation_clause.
  • Dependency: src/trapitan/reservations/service.py — _remove_expired_for_board.
  • Dependency: src/trapitan/reservations/service.py — create_coordinate_reservation.
  • Dependency: src/trapitan/reservations/service.py — list_reservation_choices.
  • Dependency: src/trapitan/api/routes/web.py — _remove_expired_reservations.
  • Dependency: src/trapitan/api/routes/web.py — reservation_boards_page.
  • Dependency: src/trapitan/api/routes/web.py — reservation_board_detail_page.
  • Dependency: src/trapitan/api/routes/web.py — create_reservation_board.