Skip to content

feat(maps): split map requirements strip into pinned and active groups - #748

Draft
atzorvas wants to merge 8 commits into
tarkovtracker-org:mainfrom
atzorvas:feat/pinned-requirements-split
Draft

feat(maps): split map requirements strip into pinned and active groups#748
atzorvas wants to merge 8 commits into
tarkovtracker-org:mainfrom
atzorvas:feat/pinned-requirements-split

Conversation

@atzorvas

@atzorvas atzorvas commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Important

Stacked on #747 (feat/pinned-map-objectives). GitHub cannot use a fork branch as a PR base, so this diff shows both changesets until #747 merges. For the true stacked view — only this PR's three commits (b0090861, 700435bb, 65c7e49a), with commentable diff — review the companion PR in the fork: atzorvas/TarkovTracker-nuxt#1. Will rebase onto main once #747 lands.

Demo

Pinned/active requirements strip demo

Baseline single strip → task pinned (split with violet-accented pinned group) → Pinned chip off → Regular chip off → both back on.

What

Splits the map "required items / keys" strip on the tasks page into two groups:

  • Pinned Tasks — rendered first, with a pin icon and the user's PINNED_OBJECTIVE marker colour as accent (custom colours carry through via color-mix).
  • Active Tasks — everything else in the current map's filtered tasks.

The groups follow the map legend chips live: Pinned chip off → pinned group hides; Regular chip off → active group hides; both off → the strip disappears. The Team chip never affects the strip (it only ever shows your own tasks). Empty groups never render, and with nothing pinned the strip renders exactly as it does today (single untitled strip), so the common case doesn't get noisier.

How

  • useMapRequiredItems composable extracts the existing aggregation (eligible objectives → equipment counts / key groups) out of MapRequiredItemsSummary.vue, built from small module-level helpers to satisfy the fallow complexity gate.
  • MapRequiredItemsGroup.vue is a purely presentational group (title?, accent?, rows); MapRequiredItemsSummary.vue becomes a thin splitter/gater that runs the composable twice over the pinned/active split of tasks (split by preferencesStore.getPinnedTaskIds, the same source the map markers use).
  • The tasks.vue call site is untouched.
  • Locale: reuses page.tasks.pinned_tasks_section for the pinned title; adds one key page.tasks.map.active_tasks_group ("Active Tasks") to en.json.

Validation

  • vitestMapRequiredItemsSummary.test.ts extended to 10 tests (split order, accent colour carry-through, chip gating both ways, both-off empty state, Team-chip no-op, no-pins layout unchanged); full maps feature + tasks page suites: 65/65 pass.
  • pnpm run lint, pnpm run lint:fallow (pass vs origin/main, and vs the stacked parent), pnpm run typecheck, pnpm run i18n:check — all pass.
  • Live QA against the dev server on Customs: baseline single strip → pin "Chemical – Part 1" → strip splits with violet-accented Pinned group (Dorm 220 key) → chip toggles gate each group → zero console errors.

🤖 Generated with Claude Code

Greptile Summary

The PR adds separate pinned and active required-item groups while also introducing persisted map-objective visibility controls and pinned marker styling.

  • Splits required equipment and key aggregation into reusable pinned and active groups.
  • Adds Regular, Pinned, and Team map legend controls with persistent visibility preferences.
  • Propagates task pin state into objective marks, marker colors, and marker hashing.
  • Adds focused tests for grouping, preferences, marker hashing, and theme-color migration.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
app/features/maps/MapRequiredItemsSummary.vue Splits tasks by pinned IDs, aggregates each group independently, and gates presentation through the map visibility preferences.
app/features/maps/composables/useMapRequiredItems.ts Extracts required-equipment counting and required-key normalization from the summary component.
app/features/maps/LeafletMap.vue Adds objective-category chips and rebuilds map layers when category visibility or pin-derived marks change.
app/composables/useMapObjectiveMarks.ts Propagates each enclosing task’s pinned state onto generated objective marks.
app/stores/usePreferences.ts Adds persisted visibility controls with backward-compatible defaults for regular, pinned, and team objectives.
app/features/maps/utils/marksHash.ts Extracts objective-mark hashing and includes pin state so category changes invalidate rendered layers.
app/utils/theme-colors.ts Extends map marker colors and migration behavior with a pinned-objective color.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Tasks["Filtered map tasks"] --> Split{"Pinned task ID?"}
  Split -->|Yes| Pinned["Pinned tasks"]
  Split -->|No| Active["Active tasks"]
  Pinned --> PinnedItems["Aggregate required items and keys"]
  Active --> ActiveItems["Aggregate required items and keys"]
  Preferences["Map visibility preferences"] --> GatePinned{"Pinned enabled?"}
  Preferences --> GateActive{"Regular enabled?"}
  PinnedItems --> GatePinned
  ActiveItems --> GateActive
  GatePinned --> Summary["Required-items strip"]
  GateActive --> Summary
  Tasks --> Marks["Objective marks"]
  Preferences --> MarkerFilter["Regular / Pinned / Team filter"]
  Marks --> MarkerFilter
  MarkerFilter --> Map["Leaflet objective layers"]
Loading

Reviews (2): Last reviewed commit: "fix(maps): resolve SonarCloud finding in..." | Re-trigger Greptile

Context used:

atzorvas and others added 7 commits August 16, 2026 09:52
Give pinned tasks a distinct purple marker colour on the map and make
pin/unpin repaint markers live by extracting the marker memoization
hash to app/features/maps/utils/marksHash.ts and folding mark.pinned
into it. Replace the static legend entries with three clickable chips
(Regular/Pinned/Team) that toggle per-category marker visibility,
persisted in the preferences store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sort user ids with an explicit code-unit comparator (S2871) — the hash
needs deterministic ordering, not locale-aware collation — iterate the
hashed token with codePointAt (S7758), and drop a redundant generic
assertion in the theme-colors test (S5906).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the nested-ternary sort comparator with a named helper (Sonar
S3358) and strip the marksHash doc block plus redundant explanatory
comments per the repository no-comments convention, keeping only brief
notes on non-obvious constraints.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Break getMarksHash into per-mark helpers so each function stays under
the complexity gate, make hashLocationPositions take a required array,
and replace the chip dot border-[1.5px] arbitrary value with border-2.
The FNV update sequence is unchanged, so hash values are identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ada4fbbf-623c-4e4c-8dd6-4027c2b5c827

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Splits the map requirements strip into pinned and active groups with dedicated composable logic and test coverage. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@DysektAI

Copy link
Copy Markdown
Member

Hey — heads up: #747 merged on Aug 19, so this branch is now 21 commits behind main and the diff still includes the merged #747 changes. Could you rebase feat/pinned-requirements-split onto main and mark the PR ready for review? That will collapse the diff down to just the pinned/active requirements split and unblock review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants