Skip to content

Collapse duplicate map theme headers#52

Merged
SunkenInTime merged 11 commits intomainfrom
cursor/settings-page-design-fd94
Mar 19, 2026
Merged

Collapse duplicate map theme headers#52
SunkenInTime merged 11 commits intomainfrom
cursor/settings-page-design-fd94

Conversation

@SunkenInTime
Copy link
Owner

Summary

  • replace the stacked Map themes + Theme profiles heading pair with a single Map theme profiles header
  • keep the unified theme assignment/profile list layout from the previous pass intact

Testing

  • export PATH="/home/ubuntu/fvm/bin:/home/ubuntu/fvm/versions/3.41.1/bin:$PATH" && fvm flutter analyze lib/widgets/map_theme_settings_section.dart
  • no manual walkthrough rerun for this pass because it only removes a duplicated header line after the merged theme-profiles UI was already manually validated in the prior iteration
Open in Web Open in Cursor 

cursoragent and others added 9 commits March 18, 2026 07:55
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 18:49
@cursor
Copy link

cursor bot commented Mar 19, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
icarus Error Error Mar 19, 2026 7:03pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 19, 2026

Greptile Summary

This PR refactors the settings panel into a more structured, scope-aware layout. It introduces a reusable SettingsScopeCard widget that pairs a section header with a scope badge ("Saved with this strategy." / "Only affects this workspace."), rebuilds SettingsTab with richer _SettingsSliderTile and _SettingsToggleTile sub-widgets, and collapses the previously duplicated "Map themes" + "Theme profiles" headers in MapThemeSettingsSection into a single "Map theme profiles" heading.

Key changes:

  • New SettingsScopeCard widget (settings_scope_card.dart) — reusable header card that appends a scope-context suffix to the description text; the description sub-text uses a hardcoded Colors.white instead of the theme's muted foreground token, which may not render correctly if a light theme is introduced later.
  • MapThemeSettingsSection simplified — the outer Column now has a single SettingsScopeCard child; the Column wrapper is redundant and the card can be returned directly.
  • SettingsTab overhauled — old flat SettingsSection blocks are replaced with SettingsScopeCard-wrapped _SettingsSliderTile and _SettingsToggleTile sub-widgets; the workspace-scope toggle tiles hard-code a teal accent colour (0xff4b8f86) rather than deriving it from the theme, which is inconsistent with the violet theme tokens used everywhere else.

Confidence Score: 4/5

  • This PR is safe to merge; all changes are presentational with no logic or data-layer risk.
  • The diff is purely UI/widget restructuring with no provider logic, persistence, or routing changes. The three flagged items (hardcoded white in SettingsScopeCard, redundant Column in MapThemeSettingsSection, hardcoded teal in _SettingsToggleTile) are style-level concerns that don't affect runtime correctness. No generated files are touched and no build_runner types are modified.
  • No files require special attention — all issues are minor style inconsistencies.

Important Files Changed

Filename Overview
lib/widgets/settings_scope_card.dart New reusable SettingsScopeCard widget with SettingsScope enum; description sub-text hardcodes Colors.white instead of the theme's muted foreground token.
lib/widgets/map_theme_settings_section.dart Collapsed dual "Map themes / Theme profiles" headers into a single SettingsScopeCard; contains an unnecessary single-child Column wrapper that can be removed.
lib/widgets/settings_tab.dart Major UI refactor replacing flat SettingsSection list with SettingsScopeCard-based sections and new _SettingsSliderTile/_SettingsToggleTile widgets; workspace-scope tiles use a hardcoded teal accent colour outside the theme system.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    ST[SettingsTab] --> SSC1[SettingsScopeCard\n'Page object sizing'\nscope: strategy]
    ST --> SSC2[SettingsScopeCard\n'Map visibility helpers'\nscope: workspace]
    ST --> MTSS[MapThemeSettingsSection]

    SSC1 --> SLT1[_SettingsSliderTile\nAgent markers]
    SSC1 --> SLT2[_SettingsSliderTile\nAbility markers]

    SSC2 --> STT1[_SettingsToggleTile\nSpawn barriers]
    SSC2 --> STT2[_SettingsToggleTile\nRegion names]
    SSC2 --> STT3[_SettingsToggleTile\nUltimate orbs]

    MTSS --> SSC3[SettingsScopeCard\n'Map theme profiles'\nscope: strategy]
    SSC3 --> TPS[_ThemeProfilesSection]
    TPS --> ATC[_ActiveThemeCard]
    TPS --> PLS[_ProfileLibrarySection]
Loading

Last reviewed commit: "Fix map theme header..."

Comment on lines 14 to +27
Widget build(BuildContext context) {
return Column(
return const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SettingsScopeCard(
scope: SettingsScope.strategy,
title: "Map theme profiles",
description:
"Choose the active theme here. You can also set the default profile for new strategies.",
child: _ThemeProfilesSection(),
),
],
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Redundant single-child Column wrapper

MapThemeSettingsSection.build returns a const Column whose children list contains only one widget — the SettingsScopeCard. The Column adds no layout value here: SettingsScopeCard already manages its own CrossAxisAlignment.start column internally. Returning the card directly would simplify the tree by one node.

Suggested change
Widget build(BuildContext context) {
return Column(
return const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SettingsScopeCard(
scope: SettingsScope.strategy,
title: "Map theme profiles",
description:
"Choose the active theme here. You can also set the default profile for new strategies.",
child: _ThemeProfilesSection(),
),
],
);
}
Widget build(BuildContext context) {
return const SettingsScopeCard(
scope: SettingsScope.strategy,
title: "Map theme profiles",
description:
"Choose the active theme here. You can also set the default profile for new strategies.",
child: _ThemeProfilesSection(),
);
}

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Settings UI to remove duplicated map-theme headings by consolidating the theme/profile header into a single “Map theme profiles” section, while also reorganizing the broader Settings layout into scoped, card-like sections for strategy vs workspace settings.

Changes:

  • Collapse the prior “Map themes” + “Theme profiles” stacked headers into a single “Map theme profiles” header via a scoped section wrapper.
  • Restructure SettingsTab into grouped sections (strategy sizing, workspace map visibility, theme profiles) with new tile components.
  • Introduce SettingsScopeCard to standardize section titles/descriptions and indicate whether settings are strategy- or workspace-scoped.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
lib/widgets/settings_tab.dart Rebuilds the Settings tab layout into scoped sections with custom slider/toggle tiles and includes the theme settings section.
lib/widgets/settings_scope_card.dart Adds a reusable section header/description component with a scope indicator (strategy/workspace).
lib/widgets/map_theme_settings_section.dart Consolidates map-theme headers into a single scoped “Map theme profiles” header and adjusts theme/profile section layout/styling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +262 to +265
_SettingLeadingIcon(
icon: icon,
accentColor: const Color(0xff4b8f86),
),
Comment on lines +58 to +67
value: strategySettings.agentSize,
min: Settings.agentSizeMin,
max: Settings.agentSizeMax,
divisions: 15,
accentColor: Settings.tacticalVioletTheme.primary,
onChanged: (value) {
ref
.read(strategySettingsProvider.notifier)
.updateAgentSize(value);
},
Comment on lines 20 to +44
return ShadSheet(
title: Text("Settings", style: ShadTheme.of(context).textTheme.h3),
description: const Text("Adjust your application settings here."),
title: Row(
children: [
Icon(
LucideIcons.pencil,
size: 18,
color: Settings.tacticalVioletTheme.primary,
),
const SizedBox(width: 8),
Text("Settings", style: ShadTheme.of(context).textTheme.h3),
],
),
description: const Text(
"Adjust strategy sizing and workspace visibility from one place.",
),
child: Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8),
child: SizedBox(
width: 325,
width: Settings.sideBarContentWidth,
child: Material(
child: Column(
children: [
SettingsSection(
title: "Agents",
children: [
const Text(
"Scale",
style: TextStyle(fontSize: 15),
),
const SizedBox(height: 10),
Slider(
min: Settings.agentSizeMin,
max: Settings.agentSizeMax,
inactiveColor: Settings.tacticalVioletTheme.secondary,
divisions: 15,
value: ref.watch(strategySettingsProvider).agentSize,
onChanged: (value) {
ref
.read(strategySettingsProvider.notifier)
.updateAgentSize(value);
},
)
],
),
SettingsSection(
title: "Abilities",
children: [
const Text(
"Scale",
style: TextStyle(fontSize: 15),
),
const SizedBox(height: 10),
Slider(
min: Settings.abilitySizeMin,
max: Settings.abilitySizeMax,
inactiveColor: Settings.tacticalVioletTheme.secondary,
divisions: 15,
value: ref.watch(strategySettingsProvider).abilitySize,
onChanged: (value) {
ref
.read(strategySettingsProvider.notifier)
.updateAbilitySize(value);
},
)
],
),
SettingsSection(
title: "Map",
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
color: Colors.transparent,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'$description ${_scopeDescription(scope)}',
style: ShadTheme.of(context).textTheme.small.copyWith(
color: Colors.white.withValues(alpha: 0.7),
SunkenInTime and others added 2 commits March 19, 2026 14:55
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@SunkenInTime SunkenInTime merged commit 06ee4d7 into main Mar 19, 2026
1 of 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.

3 participants