feat(maps): split map requirements strip into pinned and active groups - #748
feat(maps): split map requirements strip into pinned and active groups#748atzorvas wants to merge 8 commits into
Conversation
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>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Code Review ✅ ApprovedSplits the map requirements strip into pinned and active groups with dedicated composable logic and test coverage. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
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 |
|
Hey — heads up: #747 merged on Aug 19, so this branch is now 21 commits behind |



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 ontomainonce #747 lands.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_OBJECTIVEmarker colour as accent (custom colours carry through viacolor-mix).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
useMapRequiredItemscomposable extracts the existing aggregation (eligible objectives → equipment counts / key groups) out ofMapRequiredItemsSummary.vue, built from small module-level helpers to satisfy the fallow complexity gate.MapRequiredItemsGroup.vueis a purely presentational group (title?, accent?, rows);MapRequiredItemsSummary.vuebecomes a thin splitter/gater that runs the composable twice over the pinned/active split oftasks(split bypreferencesStore.getPinnedTaskIds, the same source the map markers use).tasks.vuecall site is untouched.page.tasks.pinned_tasks_sectionfor the pinned title; adds one keypage.tasks.map.active_tasks_group("Active Tasks") toen.json.Validation
vitest—MapRequiredItemsSummary.test.tsextended 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 vsorigin/main, and vs the stacked parent),pnpm run typecheck,pnpm run i18n:check— all pass.🤖 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.
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
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"]Reviews (2): Last reviewed commit: "fix(maps): resolve SonarCloud finding in..." | Re-trigger Greptile
Context used: