Offense / Targets
Targets¶
Review pinned enemy villages and maintain planning labels while distinguishing collected observations from roster and automatic enrichment.
At a glance¶
Product route: /workspaces/{workspace_id}/targets.
Who can open this page: collection. A signed-in user needs enabled workspace entitlement and verified active membership, including the owner. Non-owners also need the named active grant; verified owners bypass the individual grant check, not entitlement or verification. These feature routes do not resolve a current linked game account. Sidebar visibility does not grant endpoint access.
What you see¶
Account, Village with coordinates, Alliance and Tags form the table. Account comes from the target observation, even when a roster player link is available. Village name and alliance label use the workspace server roster. Village always opens the external Travian map; account/alliance link to the game only when their roster IDs are present. Missing roster labels display an em dash. Targets are newest-created first, then account; re-observing an existing coordinate does not make it newly created.
Open Tags to choose key player, offender, deffender, wwk, ghost or scouter. Enter Custom tags as comma-separated text (input maximum520 characters), then choose Save tags. Automatic artifact and capital chips have separate styling and no manual checkbox. Empty tags show a dash. This page has no add-target form, deletion, search, pagination or coordinate/account editor; its empty-state instruction points to “Set a target” in the extension.
Who fills in each field¶
| Field or data | What it means | Who fills it in | Can it be changed here? | When it updates |
|---|---|---|---|---|
| Account and coordinates | Extension-supplied account and coordinates; server roster supplies village name, player link ID and alliance tag/link ID when present. | extension-collected, roster-ingest | Read-only | Page load from latest recorded values |
| Automatic tags | artifact for current workspace artifact coordinates; capital for current roster capital; read-only. | backend-derived | Read-only | Page load from latest recorded values |
| Manual and custom tags | Fixed manual vocabulary and first eight comma-separated custom pieces, whitespace-normalized, truncated to 64 characters each, case-insensitive dedupe. | signed-in-member | Verified collection | Tag form submission |
Calculations¶
Target automatic tags¶
Calculation ID: target.auto-tags. Artifact and capital labels enriched from current registry/roster.
Rule: Read workspace artifact coordinates and server roster coordinates: matching artifact=>artifact; roster.is_capital=>capital; append fixed manual tags then normalized custom tags. Manual allowed keys ordered key player,offender,deffender,wwk,ghost,scouter; process first8custom comma pieces, trim/collapse whitespace, truncate64chars, dedupe case-insensitively.
| Input | Who supplies it | Unit | Optional / fallback |
|---|---|---|---|
| Artifact/roster coordinates and capital | extension-collected, roster-ingest | coordinate records | Optional; Missing roster =>no capital/name; missing artifact=>no artifact |
| Manual/custom tags | signed-in-member | labels | Optional; Empty |
Output unit: ordered tag labels. Precision: Exact labels. Rounding: No rounding. Clamp: No output clamp. Timezone: not-applicable.
Edge cases: Automatic tags cannot be persisted through manual vocabulary. Only first8comma pieces considered even if some empty. Roster labels may be absent; target observation still exists.
For synthetic coordinates (12|−34), a matching artifact record and a roster capital flag produce artifact then capital; fixed manual tags and accepted custom tags follow. Only the first eight comma pieces are considered, including empty pieces. Each custom label is trimmed, internal whitespace collapsed, then truncated to 64 characters before case-insensitive deduplication. For example, Example target and example target become one label. Reserved exact lowercase artifact/capital labels are excluded by the display splitter even if entered as custom text; use the automatic sources for those tags. There is no numeric rounding, numeric clamp or timezone.
Canonical source and dependencies are reviewed below.
Calculation source references
- Canonical: `src/trapitan/api/routes/targets.py` — `_target_rows`. - Dependency: `src/trapitan/targets/service.py` — `normalize_target_tags`. - Dependency: `src/trapitan/targets/service.py` — `split_target_tags`. - Dependency: `src/trapitan/targets/service.py` — `AUTO_TARGET_TAGS`. - Dependency: `src/trapitan/targets/service.py` — `MANUAL_TARGET_TAGS`. - Non-canonical mirrors: none registered.Used on: Targets.
Freshness and updates¶
Targets appear after an authorized extension target submission for the user's active workspace on that server. The extension endpoint requires a valid device connection and collection authorization; it derives the workspace from active user/server membership, not a submitted workspace ID. Repeated submission at the same workspace coordinate updates Account and preserves manual tags. The backend normalizes nonblank account whitespace and accepts integer coordinates; that payload has no map-bound check or freshness timestamp.
Roster enrichment and automatic tags are recomputed when the page loads. Save tags replaces stored manual/custom tags and redirects back to the page, refreshing those enrichments. No capture timestamp, stale badge, automatic refresh or live game status is displayed. Missing records remain missing; opening this web page does not collect them.
Actions and permissions¶
Who can perform each action / Who can take action: access to a page does not replace its write guards.
| Action | Actor | Permission |
|---|---|---|
| Edit target tags | signed-in-member | Verified collection, enabled entitlement and same origin; target scoped to workspace |
Tag writes require collection again, same-origin validation and a target belonging to this workspace; missing/cross-workspace target is404 and rejected origin is403. Editing is not limited to the member who pinned the target. External links only open the game and never send troops. Extension observation is a separate producer transport, not a web control.
States and edge cases¶
“No targets yet” means this workspace has no saved target observations; the table does not infer targets from every roster village. Without roster data, the captured Account and coordinates still render while village/alliance labels and profile links may be missing. An artifact or capital label reflects recorded registry/roster state, not proof of present ownership. A saved tag form has no inline success/error message; successful save returns the table and rejected requests use the endpoint error response. Authorization failures prevent page access.
Custom labels are first-eight-piece limited before blank removal/deduplication, so an empty early piece does not permit a ninth piece. Case-insensitive duplicates are dropped after truncation. Unknown checkbox values are ignored. A stored custom label exactly matching the reserved lowercase automatic vocabulary is hidden by the display splitter, so custom text cannot reliably manufacture an automatic tag. Other case variants remain ordinary custom labels.
Related pages¶
Artifacts Registry, Operation Calls, Operation Dashboard, Villages.
Source references¶
Stable page ID: offense.targets.
Source reviewed: 2026-10-07