Skip to content

UI improvements + text clarifications (mainly in teams, pulls, characters pages) - #33

Merged
woopxwoop merged 19 commits into
mainfrom
UI
Jul 30, 2026
Merged

UI improvements + text clarifications (mainly in teams, pulls, characters pages)#33
woopxwoop merged 19 commits into
mainfrom
UI

Conversation

@woopxwoop

@woopxwoop woopxwoop commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • URL-synced filter/sort/search state for Characters and Teams, plus reusable query-state helpers.
    • Added navigation-history tracking with an interactive BackLink that preserves applicable filters.
    • New info/popover and UI components (Cost, Usage Index, Upgrade Impact, Team Numbers, StatRow) and refreshed stat/wish visuals.
  • Bug Fixes
    • Cost selection now uses exact-cost matching only.
    • Improved keyboard/tooltip/popover and forced-colors focus behavior; disabled buttons no longer show hover cursor styling.
  • Tests
    • Added/updated coverage for query-state, navigation history, exact-cost behavior, and upgrade/impact ranking.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f3383089-2a8a-48d4-b1e7-a9b42d42bf7a

📥 Commits

Reviewing files that changed from the base of the PR and between 711efda and aa81525.

📒 Files selected for processing (8)
  • src/lib/character-builds.test.ts
  • src/lib/character-builds.ts
  • src/lib/stores.ts
  • src/lib/ui/components/CharacterTagSearch.svelte
  • src/lib/ui/components/Select.svelte
  • src/routes/characters/+page.svelte
  • src/routes/teams/+page.svelte
  • tests/pulls.spec.ts

📝 Walkthrough

Walkthrough

The PR adds URL-synchronized filters and navigation history, revised upgrade-impact ladders, reusable popover and display components, fixed-position menus, exact-cost team selection, and an independently revealed pull-suggestion ledger.

Changes

Upgrade impact and character builds

Layer / File(s) Summary
Upgrade ladders and enriched impact rows
src/lib/upgrade-priority.ts, src/lib/character-builds.ts, src/lib/*test.ts
Upgrade tiers use ordered percentage ladders and the stronger mean or median value; character impact rows now expose distribution statistics and updated labels.
Character impact presentation
src/routes/characters/[slug]/+page.svelte, src/lib/ui/components/UpgradeImpactPopover.svelte
Talent, level, constellation, and signature-weapon impacts render through detailed popovers.

URL state and navigation

Layer / File(s) Summary
Query-state synchronization
src/lib/query-state.ts, src/lib/query-state.test.ts, src/routes/characters/+page.svelte, src/routes/teams/+page.svelte
Filter, search, sort, tag, and cost state is restored from and written to canonical query strings.
History-aware back links
src/lib/nav-history.ts, src/lib/nav-history.test.ts, src/lib/ui/components/BackLink.svelte, src/routes/+layout.svelte
Matching in-app paths use browser history while other links retain normal navigation.

Shared UI and menus

Layer / File(s) Summary
Shared UI primitives
src/lib/ui/components/*, src/lib/ui/icons/*, src/app.css, src/lib/ui/NavBar.svelte
Reusable popovers, notes, stat rows, icons, typography styles, forced-colors focus treatment, and wish-slot states are added.
Portaled menus and detail sheets
src/lib/ui/components/CharacterTagSearch.svelte, src/lib/ui/components/Select.svelte, src/lib/ui/components/HoverTooltip.svelte
Menus use fixed body-portaled positioning and viewport updates; detail sheets open consistently and use an icon close control.

Teams and pulls

Layer / File(s) Summary
Exact-cost team display
src/lib/investment-teams.ts, src/lib/investment-teams.test.ts, src/routes/teams/*, src/routes/team-configs/[slug]/+page.svelte
Selected costs require exact simulation matches, and team pages use shared cost, statistic, note, navigation, and responsive layout components.
Revealed pull ledger
src/lib/pullSuggestions.ts, src/routes/pulls/+page.svelte, tests/pulls.spec.ts
Suggestion rows support independent reveal/hide state, teammate cycling, animations, responsive layouts, and expanded interaction coverage.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Poem

A rabbit hops through filters bright,
Finds stronger stats by mean’s delight.
Popovers bloom and teams align,
Exact costs draw a sharper line.
Pull rows reveal, then hide from sight—
“Boing!” says the bunny, “what a UI night!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the PR and accurately points to the main UI/text updates across teams, pulls, and characters pages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch UI

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.

@woopxwoop woopxwoop changed the title UI improvements + text clarifications UI improvements + text clarifications (mainly in teams, pulls, characters pages) Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/query-state.ts`:
- Around line 64-65: Update the URL construction in the query-state flow around
params.toString() to append url.hash when returning either the filtered or
unfiltered pathname, preserving fragments such as `#results` during replaceState
updates. Add a regression case in the query-state tests covering a URL with an
existing fragment and verifying that it remains in the result.

In `@src/routes/characters/`+page.svelte:
- Around line 23-58: Update the URL-backed filter state initialization and
synchronization in src/routes/characters/+page.svelte (lines 23-58) and
src/routes/teams/+page.svelte (lines 68-99) so navigation changes reconstruct
all local filters from the current user-visible URL instead of retaining cached
$state values; use the route’s reactive URL source such as page.shallow.url, or
window.location.search within the URL-read effect, while preserving the existing
replaceState behavior.

In `@src/routes/pulls/`+page.svelte:
- Line 695: Update the panel heading text in the h2 with class panel-title to
remove the duplicated “used,” while preserving the intended meaning and
surrounding markup.
- Around line 440-460: Update the toggle button in the team-row controls to
remove the transient disabled state driven by isHiding, and guard the onclick
handler so repeated activation is ignored while hiding is in progress without
blurring the focused button. Also remove aria-controls={rowId} unless it can
reference the actual revealed region; retain aria-expanded and the existing
toggle behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8a2914e1-5a00-4b76-9f19-fb64f7ebecab

📥 Commits

Reviewing files that changed from the base of the PR and between f5ce229 and fbd6d92.

⛔ Files ignored due to path filters (1)
  • package.json is excluded by none and included by none
📒 Files selected for processing (41)
  • src/app.css
  • src/lib/character-builds.test.ts
  • src/lib/character-builds.ts
  • src/lib/investment-teams.test.ts
  • src/lib/investment-teams.ts
  • src/lib/nav-history.test.ts
  • src/lib/nav-history.ts
  • src/lib/pullSuggestions.ts
  • src/lib/query-state.test.ts
  • src/lib/query-state.ts
  • src/lib/ui/NavBar.svelte
  • src/lib/ui/components/BackLink.svelte
  • src/lib/ui/components/CharacterFilterBar.svelte
  • src/lib/ui/components/CharacterTagSearch.svelte
  • src/lib/ui/components/CostPopover.svelte
  • src/lib/ui/components/HoverTooltip.svelte
  • src/lib/ui/components/InfoPopover.svelte
  • src/lib/ui/components/PageHeader.svelte
  • src/lib/ui/components/Select.svelte
  • src/lib/ui/components/StatRow.svelte
  • src/lib/ui/components/TeamNumbersNote.svelte
  • src/lib/ui/components/UpgradeImpactPopover.svelte
  • src/lib/ui/components/UsageIndexPopover.svelte
  • src/lib/ui/components/WishSlot.svelte
  • src/lib/ui/icons/IconEye.svelte
  • src/lib/ui/icons/IconEyeOff.svelte
  • src/lib/ui/icons/IconX.svelte
  • src/lib/upgrade-priority.test.ts
  • src/lib/upgrade-priority.ts
  • src/routes/+layout.svelte
  • src/routes/+page.svelte
  • src/routes/abyss/+page.svelte
  • src/routes/characters/+page.svelte
  • src/routes/characters/[slug]/+page.svelte
  • src/routes/dev/ui/+page.svelte
  • src/routes/pulls/+page.svelte
  • src/routes/stygian/+page.svelte
  • src/routes/team-configs/[slug]/+page.svelte
  • src/routes/teams/+page.svelte
  • src/routes/teams/[slug]/+page.svelte
  • tests/pulls.spec.ts
💤 Files with no reviewable changes (1)
  • src/lib/ui/components/PageHeader.svelte

Comment thread src/lib/query-state.ts Outdated
Comment thread src/routes/characters/+page.svelte Outdated
Comment thread src/routes/pulls/+page.svelte
Comment thread src/routes/pulls/+page.svelte Outdated
Constrained oversized Select menus and added keyboard navigation/focus restoration.
Made upgrade strength use absolute magnitude while preserving sign; added negative coverage.
Moved constellation/signature impact calculations into tested helpers.
Resynced character/team settings-panel visibility from URL navigation.
Corrected the dev CRIT Rate icon key to critRate_.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
src/routes/pulls/+page.svelte (1)

232-240: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a single animation preference across JS and CSS.

animationsEnabled is only set by localStorage/settings, while prefers-reduced-motion bypasses animations in CSS. In these pull-page timers, JS can keep rows/standouts blocked after CSS animations are already suppressed, or remove them too fast when the store is enabled. Merge the media query and user setting into one helper/store before using it for both timers and CSS.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/routes/pulls/`+page.svelte around lines 232 - 240, The pull-page timer
logic around animationsEnabled must use the same effective animation preference
as the CSS, including prefers-reduced-motion and the user setting. Update the
shared animation preference helper/store, then use that unified value for wait
calculations in the teamHideTimers and related row/standout timers so JavaScript
timing stays consistent with CSS animation behavior.
src/lib/ui/components/CharacterTagSearch.svelte (2)

60-83: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

No max-height fallback when the menu fits neither above nor below.

When above < EDGE, top is clamped into the remaining space but menu.style.maxHeight is never set, so a long suggestion list simply overflows past the viewport edge with no scroll affordance. On short viewports (e.g. mobile with the on-screen keyboard open) this can make suggestions below the fold unreachable.

🐛 Proposed fix
     let top = rect.bottom + GAP;
+    menu.style.maxHeight = "";
     if (top + menuRect.height > vh - EDGE) {
       const above = rect.top - menuRect.height - GAP;
       if (above >= EDGE) {
         top = above;
       } else {
         const maxTop = Math.max(EDGE, vh - EDGE - menuRect.height);
         top = Math.max(EDGE, Math.min(top, maxTop));
+        menu.style.maxHeight = `${Math.max(0, vh - EDGE - top)}px`;
       }
     }

Also ensure .suggestions-dropdown has overflow-y: auto; so the constrained height actually scrolls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/ui/components/CharacterTagSearch.svelte` around lines 60 - 83, Update
placeMenu so when the menu fits neither above nor below (the above < EDGE
fallback), calculate and apply a maxHeight that fits within the available
viewport space. Ensure the .suggestions-dropdown styling uses overflow-y: auto
so constrained suggestion lists remain scrollable.

94-112: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Dropdown doesn't reposition as the suggestion list changes while typing.

The effect only tracks showSuggestions (a boolean). Since showSuggestions stays true across most keystrokes even as suggestions.length shrinks or grows, placeMenu() is computed once per open and never re-run as the visible list — and therefore the menu's natural height — changes. This can leave the dropdown mispositioned (e.g. still placed above the field with a stale gap, or overlapping) as the user narrows/widens their search.

🐛 Proposed fix
   $effect(() => {
     if (!showSuggestions) return;
+    // Track the suggestion list itself so repositioning also runs when its
+    // size changes (not just when the dropdown opens/closes).
+    suggestions.length;

     void tick().then(() => {
       placeMenu();
       requestAnimationFrame(placeMenu);
     });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/ui/components/CharacterTagSearch.svelte` around lines 94 - 112,
Update the reactive effect containing placeMenu so it also depends on the
changing suggestions collection or its length, causing repositioning whenever
the visible suggestion list changes while showSuggestions remains true. Preserve
the existing tick, animation-frame, resize, scroll, and cleanup behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/character-builds.ts`:
- Around line 116-156: Extract the duplicated impact mapping from
constellationImpactRows and rankSigWeaponsByGain into a shared attachImpact
helper that accepts a gain row and UpgradeImpactLadder, computes pct via
primaryUpgradePct, classifies it, and returns the enriched row. Update both
functions to reuse the helper while preserving constellation source order and
signature-weapon sorting.

In `@src/lib/ui/components/Select.svelte`:
- Around line 141-164: Scope the window-level onKeydown handler to this Select
by first verifying that document.activeElement is contained by triggerEl or
menuEl, and return without handling the event otherwise. Apply this guard before
processing Escape or navigation keys so unrelated focused elements retain their
normal key behavior.

---

Outside diff comments:
In `@src/lib/ui/components/CharacterTagSearch.svelte`:
- Around line 60-83: Update placeMenu so when the menu fits neither above nor
below (the above < EDGE fallback), calculate and apply a maxHeight that fits
within the available viewport space. Ensure the .suggestions-dropdown styling
uses overflow-y: auto so constrained suggestion lists remain scrollable.
- Around line 94-112: Update the reactive effect containing placeMenu so it also
depends on the changing suggestions collection or its length, causing
repositioning whenever the visible suggestion list changes while showSuggestions
remains true. Preserve the existing tick, animation-frame, resize, scroll, and
cleanup behavior.

In `@src/routes/pulls/`+page.svelte:
- Around line 232-240: The pull-page timer logic around animationsEnabled must
use the same effective animation preference as the CSS, including
prefers-reduced-motion and the user setting. Update the shared animation
preference helper/store, then use that unified value for wait calculations in
the teamHideTimers and related row/standout timers so JavaScript timing stays
consistent with CSS animation behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 77440e76-baf5-4528-8e35-74817b1e90f8

📥 Commits

Reviewing files that changed from the base of the PR and between fbd6d92 and 711efda.

📒 Files selected for processing (13)
  • src/lib/character-builds.test.ts
  • src/lib/character-builds.ts
  • src/lib/query-state.test.ts
  • src/lib/query-state.ts
  • src/lib/ui/components/CharacterTagSearch.svelte
  • src/lib/ui/components/Select.svelte
  • src/lib/upgrade-priority.test.ts
  • src/lib/upgrade-priority.ts
  • src/routes/characters/+page.svelte
  • src/routes/characters/[slug]/+page.svelte
  • src/routes/dev/ui/+page.svelte
  • src/routes/pulls/+page.svelte
  • src/routes/teams/+page.svelte

Comment thread src/lib/character-builds.ts
Comment thread src/lib/ui/components/Select.svelte
@woopxwoop
woopxwoop merged commit 3e54853 into main Jul 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant