The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Redesign Store discovery, categories, and navigation (#162)
Dee2072fae6e1db
diff --git a/.github/assets/store/curiosity-review/discover.png b/.github/assets/store/curiosity-review/discover.pngnew file mode 100644index 000000000..a4d018337Binary files /dev/null and b/.github/assets/store/curiosity-review/discover.png differdiff --git a/.github/assets/store/curiosity-review/engineering.png b/.github/assets/store/curiosity-review/engineering.pngnew file mode 100644index 000000000..4bc169ffdBinary files /dev/null and b/.github/assets/store/curiosity-review/engineering.png differdiff --git a/.github/assets/store/curiosity-review/project-prompts.png b/.github/assets/store/curiosity-review/project-prompts.pngnew file mode 100644index 000000000..5df326ba3Binary files /dev/null and b/.github/assets/store/curiosity-review/project-prompts.png differdiff --git a/desktop/assets/store/README.md b/desktop/assets/store/README.mdindex ba40abcdf..488c18ef1 100644--- a/desktop/assets/store/README.md+++ b/desktop/assets/store/README.md@@ -22,3 +22,27 @@ To regenerate the renders:```Store tabs use `desktop/assets/app_icon.png`, the same icon as the app.++## Exploration previews++`projects/` contains unaltered copies of the repository's showcase outputs.+Discovery and category pages use these; individual harness pages keep their existing artwork.++| Bundled image | Source under `store/showcase/` |+| --- | --- |+| `projects/blender.jpg` | `blender/cozy-reading-nook.jpg` |+| `projects/cad.jpg` | `text-to-cad/planetary-gear-set.jpg` |+| `projects/circuit.jpg` | `autonomous-circuit/six-key-macropad.jpg` |+| `projects/robot.jpg` | `mujoco/g1-humanoid-hello.jpg` |+| `projects/game.jpg` | `godogen/neon-drift.jpg` |+| `projects/music.jpg` | `score/ensemble.jpg` |+| `projects/data.jpg` | `marimo/lorenz-butterfly.jpg` |+| `projects/film.jpg` | `remotion/harness-store-launch.jpg` |+| `projects/research.jpg` | `roundtable/windows-port-room.jpg` |+| `projects/slides.jpg` | `marp/deep-sea-keynote.jpg` |+| `projects/circuitjs.jpg` | `circuitjs/555-led-flasher.jpg` |+| `projects/yosys.jpg` | `yosys/fibonacci-cpu.jpg` |+| `projects/orca-slicer.jpg` | `orca-slicer/spacer.jpg` |++New packages can supply example images in their Store metadata. If no preview is available,+the card displays the package mark. Shared viewers never appear as creative projects.diff --git a/desktop/assets/store/projects/blender.jpg b/desktop/assets/store/projects/blender.jpgnew file mode 100644index 000000000..d863ef0d9Binary files /dev/null and b/desktop/assets/store/projects/blender.jpg differdiff --git a/desktop/assets/store/projects/cad.jpg b/desktop/assets/store/projects/cad.jpgnew file mode 100644index 000000000..b35e7794fBinary files /dev/null and b/desktop/assets/store/projects/cad.jpg differdiff --git a/desktop/assets/store/projects/circuit.jpg b/desktop/assets/store/projects/circuit.jpgnew file mode 100644index 000000000..6e224e686Binary files /dev/null and b/desktop/assets/store/projects/circuit.jpg differdiff --git a/desktop/assets/store/projects/circuitjs.jpg b/desktop/assets/store/projects/circuitjs.jpgnew file mode 100644index 000000000..02165cdb8Binary files /dev/null and b/desktop/assets/store/projects/circuitjs.jpg differdiff --git a/desktop/assets/store/projects/data.jpg b/desktop/assets/store/projects/data.jpgnew file mode 100644index 000000000..31c071950Binary files /dev/null and b/desktop/assets/store/projects/data.jpg differdiff --git a/desktop/assets/store/projects/film.jpg b/desktop/assets/store/projects/film.jpgnew file mode 100644index 000000000..2e6c8432cBinary files /dev/null and b/desktop/assets/store/projects/film.jpg differdiff --git a/desktop/assets/store/projects/game.jpg b/desktop/assets/store/projects/game.jpgnew file mode 100644index 000000000..27c7268c8Binary files /dev/null and b/desktop/assets/store/projects/game.jpg differdiff --git a/desktop/assets/store/projects/music.jpg b/desktop/assets/store/projects/music.jpgnew file mode 100644index 000000000..ec1dae477Binary files /dev/null and b/desktop/assets/store/projects/music.jpg differdiff --git a/desktop/assets/store/projects/orca-slicer.jpg b/desktop/assets/store/projects/orca-slicer.jpgnew file mode 100644index 000000000..02af96007Binary files /dev/null and b/desktop/assets/store/projects/orca-slicer.jpg differdiff --git a/desktop/assets/store/projects/research.jpg b/desktop/assets/store/projects/research.jpgnew file mode 100644index 000000000..8bb7ab625Binary files /dev/null and b/desktop/assets/store/projects/research.jpg differdiff --git a/desktop/assets/store/projects/robot.jpg b/desktop/assets/store/projects/robot.jpgnew file mode 100644index 000000000..49b8b2590Binary files /dev/null and b/desktop/assets/store/projects/robot.jpg differdiff --git a/desktop/assets/store/projects/slides.jpg b/desktop/assets/store/projects/slides.jpgnew file mode 100644index 000000000..ac8d53a11Binary files /dev/null and b/desktop/assets/store/projects/slides.jpg differdiff --git a/desktop/assets/store/projects/yosys.jpg b/desktop/assets/store/projects/yosys.jpgnew file mode 100644index 000000000..c6a6d7a91Binary files /dev/null and b/desktop/assets/store/projects/yosys.jpg differdiff --git a/desktop/lib/store/store_category.dart b/desktop/lib/store/store_category.dartnew file mode 100644index 000000000..52303b128--- /dev/null+++ b/desktop/lib/store/store_category.dart@@ -0,0 +1,359 @@+import 'package:flutter/material.dart';+import 'package:lucide_icons_flutter/lucide_icons.dart';++import '../core/dsh_catalog.dart';+import '../shared/theme/app_theme.dart' as grid;+import '../shared/widgets/skeleton.dart';+import 'store_listing.dart';+import 'store_exploration.dart';+import 'store_explore_widgets.dart';+import 'store_models.dart';++/// A discipline has its own invitation, real examples, and tools to try. Search+/// and the complete index keep their compact rows; individual pages are unchanged.+class StoreCategory extends StatefulWidget {+ const StoreCategory({+ super.key,+ required this.name,+ required this.categories,+ required this.onCategory,+ required this.entries,+ required this.loaded,+ required this.ratingFor,+ required this.installed,+ required this.onOpen,+ required this.onAction,+ });++ final String name;+ final List<String> categories;+ final ValueChanged<String> onCategory;+ final List<DshEntry> entries;+ final bool loaded;+ final StoreRating Function(DshEntry) ratingFor;+ final bool Function(String) installed;+ final ValueChanged<String> onOpen;+ final ValueChanged<DshEntry> onAction;++ @override+ State<StoreCategory> createState() => _StoreCategoryState();+}++class _StoreCategoryState extends State<StoreCategory> {+ bool _installedOnly = false;+ bool _restored = false;++ @override+ void didChangeDependencies() {+ super.didChangeDependencies();+ if (!_restored) {+ _installedOnly =+ PageStorage.maybeOf(+ context,+ )?.readState(context, identifier: 'store-installed:${widget.name}') ==+ true;+ _restored = true;+ }+ }++ void _filter(bool installedOnly) {+ setState(() => _installedOnly = installedOnly);+ PageStorage.maybeOf(context)?.writeState(+ context,+ installedOnly,+ identifier: 'store-installed:${widget.name}',+ );+ }++ @override+ Widget build(BuildContext context) {+ grid.AppTheme.watch(context);+ final name = widget.name;+ final loaded = widget.loaded;+ final ratingFor = widget.ratingFor;+ final installed = widget.installed;+ final onOpen = widget.onOpen;+ final onAction = widget.onAction;+ final installedCount = widget.entries.where((e) => installed(e.id)).length;+ final entries = _installedOnly+ ? widget.entries.where((e) => installed(e.id)).toList()+ : widget.entries;+ final related = (storeRelatedDisciplines[name] ?? const <String>[])+ .where(widget.categories.contains)+ .toList();+ final discipline = storeDiscipline(name);+ final example = discipline.example(widget.entries);+ final coding = name == 'Coding';+ return LayoutBuilder(+ builder: (context, box) {+ final padding = box.maxWidth < 680 ? 20.0 : 36.0;+ return SingleChildScrollView(+ key: ValueKey('store-catalog:$name'),+ padding: EdgeInsets.fromLTRB(padding, 12, padding, 40),+ child: Center(+ child: ConstrainedBox(+ constraints: const BoxConstraints(maxWidth: 1440),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ _DisciplineHero(+ name: name,+ discipline: discipline,+ entry: example,+ headline: discipline.headline,+ description: discipline.description,+ onOpen: example == null ? null : () => onOpen(example.id),+ ),+ const SizedBox(height: 32),+ StoreExploreHeading(+ title: coding+ ? 'The agents you already know.'+ : discipline.invitation,+ subtitle: entries.isEmpty && !loaded+ ? null+ : '${entries.length} ${coding ? (entries.length == 1 ? 'coding agent' : 'coding agents') : (entries.length == 1 ? 'harness' : 'harnesses')} to explore.',+ ),+ const SizedBox(height: 14),+ Wrap(+ spacing: 8,+ runSpacing: 8,+ children: [+ ChoiceChip(+ key: const ValueKey('store-filter-all'),+ label: const Text('All'),+ selected: !_installedOnly,+ showCheckmark: false,+ onSelected: (_) => _filter(false),+ ),+ ChoiceChip(+ key: const ValueKey('store-filter-installed'),+ label: Text('Installed · $installedCount'),+ selected: _installedOnly,+ showCheckmark: false,+ onSelected: (_) => _filter(true),+ ),+ ],+ ),+ const SizedBox(height: 20),+ if (entries.isEmpty && _installedOnly)+ Padding(+ padding: const EdgeInsets.symmetric(vertical: 36),+ child: Column(+ children: [+ Text(+ 'Your next tool is waiting.',+ style: TextStyle(+ fontSize: 20,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ const SizedBox(height: 8),+ Text(+ 'Explore the harnesses in $name and choose one to try.',+ textAlign: TextAlign.center,+ style: TextStyle(+ fontSize: 14,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ const SizedBox(height: 14),+ TextButton(+ onPressed: () => _filter(false),+ child: const Text('Show all harnesses'),+ ),+ ],+ ),+ )+ else if (entries.isEmpty)+ loaded+ ? Padding(+ padding: const EdgeInsets.symmetric(vertical: 36),+ child: Text(+ 'Nothing here yet.',+ style: TextStyle(+ color: grid.AppPalette.textSecondary,+ ),+ ),+ )+ : Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ 'Asking this computer…',+ style: TextStyle(+ color: grid.AppPalette.textSecondary,+ ),+ ),+ const SizedBox(height: 16),+ const SkeletonBlock(+ child: Skeleton(height: 210, radius: 20),+ ),+ ],+ )+ else if (coding)+ StoreListing(+ entries: entries,+ ratingFor: ratingFor,+ installed: installed,+ onOpen: onOpen,+ onAction: onAction,+ )+ else+ StoreProjectGrid(+ entries: entries,+ ratingFor: ratingFor,+ installed: installed,+ onOpen: onOpen,+ onAction: onAction,+ ),+ if (related.isNotEmpty) ...[+ const SizedBox(height: 36),+ const StoreExploreHeading(+ title: 'Where could this take you next?',+ ),+ const SizedBox(height: 16),+ Wrap(+ spacing: 10,+ runSpacing: 10,+ children: [+ for (final category in related)+ ActionChip(+ key: ValueKey('store-related:$category'),+ avatar: Icon(+ LucideIcons.arrowUpRight300,+ size: 14,+ color: grid.AppPalette.textSecondary,+ ),+ label: Text(category),+ onPressed: () => widget.onCategory(category),+ ),+ ],+ ),+ ],+ if (entries.isNotEmpty && !coding) ...[+ const SizedBox(height: 40),+ const StoreLearningNote(),+ ],+ ],+ ),+ ),+ ),+ );+ },+ );+ }+}++class _DisciplineHero extends StatelessWidget {+ const _DisciplineHero({+ required this.name,+ required this.discipline,+ required this.entry,+ required this.headline,+ required this.description,+ required this.onOpen,+ });+ final String name;+ final StoreDiscipline discipline;+ final DshEntry? entry;+ final String headline;+ final String description;+ final VoidCallback? onOpen;++ @override+ Widget build(BuildContext context) => LayoutBuilder(+ builder: (context, box) {+ final narrow =+ box.maxWidth < 650 || MediaQuery.textScalerOf(context).scale(14) > 20;+ final compact = box.maxWidth < 1000;+ final copy = Padding(+ padding: EdgeInsets.all(compact ? 26 : 36),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ name.toUpperCase(),+ style: const TextStyle(+ fontSize: 11,+ letterSpacing: 2,+ fontWeight: FontWeight.w700,+ color: Color(0xff344437),+ ),+ ),+ const SizedBox(height: 22),+ Text(+ headline,+ style: TextStyle(+ fontSize: compact ? 35 : 43,+ height: 1.05,+ letterSpacing: -1.6,+ fontWeight: FontWeight.w700,+ color: const Color(0xff182b24),+ ),+ ),+ const SizedBox(height: 18),+ Text(+ description,+ style: const TextStyle(+ fontSize: 14,+ height: 1.6,+ color: Color(0xff37473d),+ ),+ ),+ if (entry != null) ...[+ const SizedBox(height: 22),+ TextButton.icon(+ key: const ValueKey('store-category-feature'),+ onPressed: onOpen,+ iconAlignment: IconAlignment.end,+ icon: const Icon(LucideIcons.arrowUpRight300, size: 16),+ style: TextButton.styleFrom(+ foregroundColor: const Color(0xff182b24),+ backgroundColor: Colors.white.withValues(alpha: .55),+ padding: const EdgeInsets.symmetric(+ horizontal: 18,+ vertical: 14,+ ),+ shape: const StadiumBorder(),+ ),+ label: Text('Explore ${entry!.name}'),+ ),+ ],+ ],+ ),+ );+ final art = entry == null+ ? null+ : AspectRatio(+ aspectRatio: narrow ? 1.8 : 1.35,+ child: Padding(+ padding: const EdgeInsets.all(18),+ child: ClipRRect(+ borderRadius: BorderRadius.circular(14),+ child: StoreProjectArt(entry: entry!),+ ),+ ),+ );+ return Container(+ key: const ValueKey('store-category-hero'),+ clipBehavior: Clip.antiAlias,+ decoration: BoxDecoration(+ color: discipline.color,+ borderRadius: BorderRadius.circular(24),+ ),+ child: narrow || art == null+ ? Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [copy, ?art],+ )+ : Row(+ children: [+ Expanded(flex: 11, child: copy),+ Expanded(flex: 10, child: art),+ ],+ ),+ );+ },+ );+}diff --git a/desktop/lib/store/store_discover.dart b/desktop/lib/store/store_discover.dartindex 8c3e90022..e9262b321 100644--- a/desktop/lib/store/store_discover.dart+++ b/desktop/lib/store/store_discover.dart@@ -6,11 +6,13 @@ import '../shared/theme/app_theme.dart' as grid;import '../shared/widgets/skeleton.dart';import '../widgets/engine_identity.dart';import 'store_editorial.dart';+import 'store_exploration.dart';+import 'store_explore_widgets.dart';import 'store_models.dart';-/// The curated front page. Nothing here invents availability, popularity or-/// ratings: the live catalog supplies the products; editorial supplies context.-class StoreDiscover extends StatelessWidget {+/// Invitations to explore, backed by the catalog on this machine. No invented+/// availability, popularity, or ratings; each preview opens its actual harness.+class StoreDiscover extends StatefulWidget {const StoreDiscover({super.key,required this.entries,@@ -19,7 +21,7 @@ class StoreDiscover extends StatelessWidget {required this.installed,required this.onOpen,required this.onAction,- required this.onCollection,+ required this.onCategory,required this.onAll,required this.onEngines,});@@ -30,167 +32,173 @@ class StoreDiscover extends StatelessWidget {final bool Function(String) installed;final ValueChanged<String> onOpen;final ValueChanged<DshEntry> onAction;- final ValueChanged<StoreCollection> onCollection;+ final ValueChanged<String> onCategory;final VoidCallback onAll;final VoidCallback onEngines;+ @override+ State<StoreDiscover> createState() => _StoreDiscoverState();+}++class _StoreDiscoverState extends State<StoreDiscover> {+ final _paths = GlobalKey();++ void _explore() {+ final target = _paths.currentContext;+ if (target == null) return;+ Scrollable.ensureVisible(+ target,+ alignment: .03,+ duration: MediaQuery.disableAnimationsOf(context)+ ? Duration.zero+ : const Duration(milliseconds: 350),+ curve: Curves.easeOutCubic,+ );+ }+@overrideWidget build(BuildContext context) {- final byId = {for (final e in entries) e.id: e};- final featured = [+ grid.AppTheme.watch(context);+ final byId = {for (final entry in widget.entries) entry.id: entry};+ final samples = [for (final id in ['autonomous/blender',- 'autonomous/copper',- 'autonomous/autonomous-circuit',+ 'autonomous/text-to-cad',+ 'autonomous/mujoco',+ 'autonomous/godogen','autonomous/phaser',+ 'autonomous/marimo',])?byId[id],+ ].take(3).toList();+ final engines = [+ for (final id in ['claude', 'codex', 'cursor']) ?byId[id],];- final collections = storeCollections- .where((c) => entries.any(c.includes))- .toList();- final crafts = entries+ final crafts = widget.entries.where((e) => !e.isEngine && !e.isViewerPackage).toList();const picks = [- 'autonomous/openmontage',- 'autonomous/music-studio',- 'autonomous/data-studio',- 'autonomous/roundtable',- 'autonomous/freecad',- 'autonomous/ollama',- 'autonomous/jev-sheets',- 'autonomous/drone-pilot',- 'autonomous/generative-art','autonomous/text-to-cad',- 'autonomous/strudel',- 'autonomous/marp',- 'autonomous/manim',- 'autonomous/excalidraw',+ 'autonomous/score','autonomous/marimo',- 'autonomous/typst',+ 'autonomous/mujoco','autonomous/remotion',- 'autonomous/rdkit',+ 'autonomous/roundtable',];crafts.sort((a, b) {final ai = picks.indexOf(a.id), bi = picks.indexOf(b.id);- return (ai < 0 ? 999 : ai).compareTo(bi < 0 ? 999 : bi);+ final rank = (ai < 0 ? 999 : ai).compareTo(bi < 0 ? 999 : bi);+ return rank == 0 ? a.name.compareTo(b.name) : rank;});- final engines = [- for (final id in ['claude', 'codex', 'cursor']) ?byId[id],+ final categories = [+ for (final name in [...storeCategoryDomains.keys, 'Other'])+ if (name != 'Coding' &&+ crafts.any((entry) => storeCategoryFor(entry) == name))+ name,];return LayoutBuilder(- builder: (context, constraints) {- final padding = constraints.maxWidth < 680 ? 20.0 : 36.0;+ builder: (context, box) {+ final padding = box.maxWidth < 680 ? 20.0 : 36.0;return SingleChildScrollView(key: const PageStorageKey('store-discover-scroll'),- padding: EdgeInsets.fromLTRB(padding, 28, padding, 48),+ padding: EdgeInsets.fromLTRB(padding, 12, padding, 40),child: Center(child: ConstrainedBox(constraints: const BoxConstraints(maxWidth: 1440),child: Column(crossAxisAlignment: CrossAxisAlignment.stretch,children: [- Text(- 'Discover',- style: TextStyle(- fontSize: 30,- fontWeight: FontWeight.w700,- letterSpacing: -.8,- color: grid.AppPalette.textPrimary,- ),- ),- const SizedBox(height: 6),- Text(- 'Start with code. Follow your curiosity.',- style: TextStyle(- fontSize: 14,- color: grid.AppPalette.textSecondary,- ),- ),- const SizedBox(height: 24),if (engines.isNotEmpty) ...[- _Heading('Coding', action: 'See all', onTap: onEngines),const SizedBox(height: 4),- Text(- 'Build software with the agents you already use, across all your machines.',- style: TextStyle(- fontSize: 13,- color: grid.AppPalette.textSecondary,- ),- ),- const SizedBox(height: 10),- StoreListing(+ _CodingStart(entries: engines,- ratingFor: ratingFor,- installed: installed,- onOpen: onOpen,- onAction: onAction,- ),- ],- if (crafts.isNotEmpty) ...[- const SizedBox(height: 30),- _Heading(- 'Build across disciplines',- action: 'See all',- onTap: onAll,+ installed: widget.installed,+ onOpen: widget.onOpen,+ onAction: widget.onAction,+ onAll: widget.onEngines,),- const SizedBox(height: 14),],- if (featured.isNotEmpty)- _Feature(- entry: featured.first,- onOpen: () => onOpen(featured.first.id),- )- else if (!loaded)- const SkeletonBlock(- child: Skeleton(height: 340, radius: 18),+ const SizedBox(height: 22),+ _CuriosityHero(+ samples: samples,+ onOpen: widget.onOpen,+ onExplore: categories.isEmpty ? widget.onEngines : _explore,+ ),+ if (categories.isNotEmpty) ...[+ const SizedBox(height: 40),+ StoreExploreHeading(+ key: _paths,+ title: 'Choose your next superpower.',+ subtitle: 'Same curiosity. New tools. What do you want to make next?',+ action: 'Browse all',+ onAction: widget.onAll,),- if (collections.isNotEmpty) ...[const SizedBox(height: 22),LayoutBuilder(- builder: (context, box) {- final columns = box.maxWidth >= 780+ builder: (context, constraints) {+ final scale =+ MediaQuery.textScalerOf(context).scale(14) / 14;+ final columns =+ constraints.maxWidth >= 1080 && scale <= 1.25? 3- : box.maxWidth >= 540+ : constraints.maxWidth >= 620 && scale <= 1.5? 2: 1;final width =- (box.maxWidth - (columns - 1) * 18) / columns;+ (constraints.maxWidth - (columns - 1) * 20) /+ columns;return Wrap(- spacing: 18,- runSpacing: 18,+ spacing: 20,+ runSpacing: 20,children: [- for (final collection in collections)+ for (final name in categories)SizedBox(width: width,- child: _CollectionCard(- collection: collection,- entries: entries- .where(collection.includes)+ child: _CuriosityPath(+ key: ValueKey('store-category:$name'),+ name: name,+ entries: crafts+ .where(+ (entry) =>+ storeCategoryFor(entry) == name,+ ).toList(),- onTap: () => onCollection(collection),+ onTap: () => widget.onCategory(name),),),],);},),- ],- if (crafts.isNotEmpty) ...[- const SizedBox(height: 34),- _Heading(- 'More to explore',- action: 'See all',- onTap: onAll,+ const SizedBox(height: 42),+ const StoreExploreHeading(+ title: 'It started with a prompt.',+ subtitle: 'Borrow a starting point. Make it your own.',),- const SizedBox(height: 10),- StoreListing(- entries: crafts.take(12).toList(),- ratingFor: ratingFor,- installed: installed,- onOpen: onOpen,- onAction: onAction,+ const SizedBox(height: 22),+ StoreProjectGrid(+ entries: crafts.take(6).toList(),+ ratingFor: widget.ratingFor,+ installed: widget.installed,+ onOpen: widget.onOpen,+ onAction: widget.onAction,+ ),+ const SizedBox(height: 40),+ const StoreLearningNote(),+ ] else if (!widget.loaded) ...[+ const SizedBox(height: 32),+ const SkeletonBlock(+ child: Skeleton(height: 240, radius: 20),+ ),+ ] else ...[+ const SizedBox(height: 32),+ Text(+ 'Start with a coding agent. More disciplines will appear here as harnesses become available.',+ style: TextStyle(+ fontSize: 14,+ height: 1.5,+ color: grid.AppPalette.textSecondary,+ ),),],],@@ -203,425 +211,395 @@ class StoreDiscover extends StatelessWidget {}}-class _Heading extends StatelessWidget {- const _Heading(this.title, {required this.action, required this.onTap});- final String title;- final String action;- final VoidCallback onTap;-- @override- Widget build(BuildContext context) => Row(- children: [- Expanded(- child: Text(- title,- style: TextStyle(- fontSize: 21,- fontWeight: FontWeight.w600,- letterSpacing: -.4,- color: grid.AppPalette.textPrimary,- ),- ),- ),- TextButton(onPressed: onTap, child: Text(action)),- ],- );-}--class _Feature extends StatelessWidget {- const _Feature({required this.entry, required this.onOpen});- final DshEntry entry;- final VoidCallback onOpen;+class _CuriosityHero extends StatelessWidget {+ const _CuriosityHero({+ required this.samples,+ required this.onOpen,+ required this.onExplore,+ });+ final List<DshEntry> samples;+ final ValueChanged<String> onOpen;+ final VoidCallback onExplore;@override- Widget build(BuildContext context) {- final story = storeStories[entry.id]!;- return LayoutBuilder(- builder: (context, box) {- final narrow =- box.maxWidth < 660 ||- MediaQuery.textScalerOf(context).scale(14) > 20;- final art = Image.asset(- story.asset!,- fit: BoxFit.cover,- alignment: Alignment.centerRight,- excludeFromSemantics: true,- );- final copy = Padding(- padding: EdgeInsets.all(narrow ? 28 : 40),- child: ConstrainedBox(- constraints: BoxConstraints(- minHeight: narrow ? 0 : 310,- maxWidth: narrow ? double.infinity : 470,+ Widget build(BuildContext context) => LayoutBuilder(+ builder: (context, box) {+ final narrow =+ box.maxWidth < 650 || MediaQuery.textScalerOf(context).scale(14) > 20;+ final compact = box.maxWidth < 1000;+ const ink = Color(0xff182b24);+ final copy = Padding(+ padding: EdgeInsets.all(compact ? 28 : 38),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ const Text(+ 'FOR POLYMATHS IN THE MAKING',+ style: TextStyle(+ fontSize: 10,+ letterSpacing: 1.6,+ fontWeight: FontWeight.w700,+ color: Color(0xff45543a),+ ),),- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- mainAxisAlignment: MainAxisAlignment.center,- children: [- const Text(- 'FOLLOW YOUR CURIOSITY',- style: TextStyle(- fontSize: 10,- fontWeight: FontWeight.w700,- letterSpacing: 1.8,- color: Color(0xffadf3d3),- ),- ),- const SizedBox(height: 18),- Text(- story.headline!,- style: TextStyle(- fontSize: narrow ? 39 : 52,- height: 1.02,- fontWeight: FontWeight.w700,- letterSpacing: -1.8,- color: Colors.white,- ),- ),- const SizedBox(height: 16),- Text(- story.description!,- style: const TextStyle(- fontSize: 14,- height: 1.5,- color: Color(0xffdcece5),- ),+ const SizedBox(height: 24),+ Text(+ 'Follow your\ncuriosity.',+ style: TextStyle(+ fontSize: compact ? 43 : 54,+ height: .98,+ letterSpacing: -2.5,+ fontWeight: FontWeight.w700,+ color: ink,+ ),+ ),+ const SizedBox(height: 24),+ const Text(+ 'Start with code. Build across disciplines.',+ style: TextStyle(+ fontSize: 16,+ height: 1.4,+ fontWeight: FontWeight.w600,+ color: ink,+ ),+ ),+ const SizedBox(height: 10),+ const Text(+ 'Your ideas can take you into unfamiliar crafts.\nThis is a place to follow them.',+ style: TextStyle(+ fontSize: 14,+ height: 1.6,+ color: Color(0xff45543a),+ ),+ ),+ const SizedBox(height: 26),+ FilledButton.icon(+ onPressed: onExplore,+ iconAlignment: IconAlignment.end,+ style: FilledButton.styleFrom(+ backgroundColor: ink,+ foregroundColor: Colors.white,+ padding: const EdgeInsets.symmetric(+ horizontal: 22,+ vertical: 18,),- const SizedBox(height: 24),- Row(- mainAxisSize: MainAxisSize.min,- children: [- EngineMark(- engine: entry.id,- displayName: entry.name,- size: 26,- ),- const SizedBox(width: 10),- Flexible(- child: Text(- entry.name,- style: const TextStyle(- fontSize: 14,- fontWeight: FontWeight.w600,- color: Colors.white,- ),- ),+ ),+ icon: const Icon(LucideIcons.arrowDown300, size: 16),+ label: const Text('Explore disciplines'),+ ),+ ],+ ),+ );+ final art = samples.isEmpty+ ? null+ : Padding(+ padding: const EdgeInsets.all(24),+ child: Row(+ crossAxisAlignment: CrossAxisAlignment.center,+ children: [+ Expanded(+ child: _HeroProject(+ entry: samples.first,+ tall: samples.length > 1,+ onTap: () => onOpen(samples.first.id),),- const SizedBox(width: 20),- FilledButton(- onPressed: onOpen,- style: FilledButton.styleFrom(- backgroundColor: Colors.white,- foregroundColor: const Color(0xff132c25),- minimumSize: const Size(100, 36),- shape: const StadiumBorder(),+ ),+ if (samples.length > 1) ...[+ const SizedBox(width: 14),+ Expanded(+ child: Column(+ children: [+ for (final entry in samples.skip(1)) ...[+ _HeroProject(+ entry: entry,+ onTap: () => onOpen(entry.id),+ ),+ if (entry != samples.last)+ const SizedBox(height: 14),+ ],+ ],),- child: const Text('Explore'),),],- ),- ],- ),- ),- );- return Material(- key: ValueKey('store-feature:${entry.id}'),- color: const Color(0xff102b24),- borderRadius: BorderRadius.circular(18),- clipBehavior: Clip.antiAlias,- child: InkWell(- onTap: onOpen,- child: narrow- ? Column(- crossAxisAlignment: CrossAxisAlignment.stretch,- children: [- copy,- AspectRatio(aspectRatio: 2.1, child: art),- ],- )- : Stack(- children: [- Positioned.fill(child: art),- Positioned.fill(- child: DecoratedBox(- decoration: BoxDecoration(- gradient: LinearGradient(- colors: [- Colors.black.withValues(alpha: .5),- Colors.transparent,- ],- stops: const [0, .85],- ),- ),- ),- ),- copy,- ],- ),- ),- );- },- );- }+ ],+ ),+ );+ return Container(+ key: const ValueKey('store-curiosity-hero'),+ decoration: BoxDecoration(+ color: const Color(0xffdfefbc),+ borderRadius: BorderRadius.circular(24),+ ),+ clipBehavior: Clip.antiAlias,+ child: narrow || art == null+ ? Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [copy, ?art],+ )+ : Row(+ children: [+ Expanded(flex: 11, child: copy),+ Expanded(flex: 10, child: art),+ ],+ ),+ );+ },+ );}-class _CollectionCard extends StatelessWidget {- const _CollectionCard({- required this.collection,- required this.entries,+class _HeroProject extends StatelessWidget {+ const _HeroProject({+ required this.entry,required this.onTap,+ this.tall = false,});- final StoreCollection collection;- final List<DshEntry> entries;+ final DshEntry entry;final VoidCallback onTap;+ final bool tall;@override- Widget build(BuildContext context) {- final withArt = [- for (final id in collection.featuredIds)- if (entries.any((e) => e.id == id) && storeStories[id]?.asset != null)- id,- ];- final story = withArt.isEmpty ? null : storeStories[withArt.first];- return Material(- key: ValueKey('store-collection:${collection.id}'),- color: grid.AppPalette.cardBg,- borderRadius: BorderRadius.circular(14),- clipBehavior: Clip.antiAlias,- child: InkWell(- onTap: onTap,- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- SizedBox(- height: 162,- width: double.infinity,- child: story?.asset != null- ? Image.asset(- story!.asset!,- fit: BoxFit.cover,- alignment: collection.id == 'shape'- ? const Alignment(.8, .4)- : Alignment.center,- excludeFromSemantics: true,- )- : ColoredBox(- color: grid.AppSurface.recess,- child: Center(- child: EngineMark(- engine: entries.first.id,- displayName: entries.first.name,- size: 70,- ),- ),- ),- ),- Padding(- padding: const EdgeInsets.fromLTRB(18, 17, 18, 16),- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Text(- collection.title,- style: TextStyle(- fontSize: 19,- fontWeight: FontWeight.w600,- letterSpacing: -.4,- color: grid.AppPalette.textPrimary,- ),- ),- const SizedBox(height: 6),- Text(- collection.subtitle,- style: TextStyle(+ Widget build(BuildContext context) => Material(+ key: ValueKey('store-feature:${entry.id}'),+ color: const Color(0xff22302b),+ borderRadius: BorderRadius.circular(14),+ clipBehavior: Clip.antiAlias,+ child: InkWell(+ onTap: onTap,+ child: Column(+ children: [+ AspectRatio(+ aspectRatio: tall ? .94 : 1.65,+ child: StoreProjectArt(entry: entry),+ ),+ Padding(+ padding: const EdgeInsets.all(12),+ child: Row(+ children: [+ Expanded(+ child: Text(+ entry.name,+ maxLines: 2,+ overflow: TextOverflow.ellipsis,+ style: const TextStyle(fontSize: 12,- height: 1.4,- color: grid.AppPalette.textSecondary,+ color: Colors.white,+ fontWeight: FontWeight.w600,),),- const SizedBox(height: 14),- Row(- children: [- Expanded(- child: Text(- '${entries.length} harness${entries.length == 1 ? '' : 'es'} to explore',- style: TextStyle(- fontSize: 11,- color: grid.AppPalette.textFaint,- ),- ),- ),- Icon(- LucideIcons.arrowRight300,- size: 16,- color: grid.AppPalette.textSecondary,- ),- ],- ),- ],- ),+ ),+ const SizedBox(width: 4),+ const Icon(+ LucideIcons.arrowUpRight300,+ size: 14,+ color: Color(0xffdfefbc),+ ),+ ],),- ],- ),+ ),+ ],),- );- }+ ),+ );}-/// Compact, responsive rows shared by Discover, search and categories.-class StoreListing extends StatelessWidget {- const StoreListing({- super.key,+class _CodingStart extends StatelessWidget {+ const _CodingStart({required this.entries,- required this.ratingFor,required this.installed,required this.onOpen,required this.onAction,+ required this.onAll,});final List<DshEntry> entries;- final StoreRating Function(DshEntry) ratingFor;final bool Function(String) installed;final ValueChanged<String> onOpen;final ValueChanged<DshEntry> onAction;+ final VoidCallback onAll;@override- Widget build(BuildContext context) => LayoutBuilder(- builder: (context, box) {- final columns = box.maxWidth >= 1120- ? 3- : box.maxWidth >= 720- ? 2- : 1;- final width = (box.maxWidth - (columns - 1) * 24) / columns;- return Wrap(- spacing: 24,+ Widget build(BuildContext context) => Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ Row(children: [- for (final entry in entries)- SizedBox(- width: width,- child: _ProductRow(- key: ValueKey('store-card:${entry.id}'),- entry: entry,- rating: ratingFor(entry),- installed: installed(entry.id),- onOpen: () => onOpen(entry.id),- onAction: () => onAction(entry),+ Expanded(+ child: Text(+ 'Your starting point: code.',+ style: TextStyle(+ fontSize: 14,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textSecondary,),),+ ),+ TextButton(onPressed: onAll, child: const Text('All coding agents')),],- );- },+ ),+ const SizedBox(height: 8),+ LayoutBuilder(+ builder: (context, box) {+ final columns =+ box.maxWidth >= 650 &&+ MediaQuery.textScalerOf(context).scale(14) <= 18+ ? 3+ : 1;+ final width = (box.maxWidth - (columns - 1) * 12) / columns;+ return Wrap(+ spacing: 12,+ runSpacing: 12,+ children: [+ for (final entry in entries)+ SizedBox(+ width: width,+ child: Material(+ key: ValueKey('store-card:${entry.id}'),+ color: grid.AppSurface.recess,+ borderRadius: BorderRadius.circular(14),+ clipBehavior: Clip.antiAlias,+ child: InkWell(+ onTap: () => onOpen(entry.id),+ child: Padding(+ padding: const EdgeInsets.symmetric(+ horizontal: 14,+ vertical: 10,+ ),+ child: Row(+ children: [+ EngineMark(+ engine: entry.id,+ displayName: entry.name,+ size: 30,+ ),+ const SizedBox(width: 10),+ Expanded(+ child: Text(+ entry.name,+ style: TextStyle(+ fontSize: 13,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ ),+ TextButton(+ key: ValueKey('store-action:${entry.id}'),+ onPressed: () => onAction(entry),+ child: Text(installed(entry.id) ? 'Open' : 'Get'),+ ),+ ],+ ),+ ),+ ),+ ),+ ),+ ],+ );+ },+ ),+ ],);}-class _ProductRow extends StatelessWidget {- const _ProductRow({+class _CuriosityPath extends StatelessWidget {+ const _CuriosityPath({super.key,- required this.entry,- required this.rating,- required this.installed,- required this.onOpen,- required this.onAction,+ required this.name,+ required this.entries,+ required this.onTap,});- final DshEntry entry;- final StoreRating rating;- final bool installed;- final VoidCallback onOpen;- final VoidCallback onAction;+ final String name;+ final List<DshEntry> entries;+ final VoidCallback onTap;@override- Widget build(BuildContext context) => Material(- color: Colors.transparent,- child: InkWell(- onTap: onOpen,- borderRadius: BorderRadius.circular(10),- child: Container(- constraints: const BoxConstraints(minHeight: 94),- padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 6),- decoration: BoxDecoration(- border: Border(bottom: BorderSide(color: grid.AppPalette.divider)),- ),- child: Row(- children: [- EngineMark(engine: entry.id, displayName: entry.name, size: 42),- const SizedBox(width: 12),- Expanded(+ Widget build(BuildContext context) {+ final discipline = storeDiscipline(name);+ final example = discipline.example(entries)!;+ final scale = MediaQuery.textScalerOf(context).scale(14) / 14;+ final marks = [+ example,+ ...entries.where((entry) => entry.id != example.id),+ ].take(3);+ return StoreExploreCard(+ color: discipline.color,+ onTap: onTap,+ semanticLabel: 'Explore $name',+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ AspectRatio(aspectRatio: 2.1, child: StoreProjectArt(entry: example)),+ Container(height: 3, color: discipline.color),+ SizedBox(+ height: 151 * scale,+ child: Padding(+ padding: const EdgeInsets.all(20),child: Column(crossAxisAlignment: CrossAxisAlignment.start,- mainAxisSize: MainAxisSize.min,children: [- Text(- entry.name,- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: TextStyle(- fontSize: 14,- fontWeight: FontWeight.w600,- color: grid.AppPalette.textPrimary,- ),+ Row(+ children: [+ Expanded(+ child: Text(+ name,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 22,+ height: 1.15,+ letterSpacing: -.4,+ fontWeight: FontWeight.w700,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ ),+ Icon(+ LucideIcons.arrowUpRight300,+ size: 18,+ color: grid.AppPalette.textSecondary,+ ),+ ],),- const SizedBox(height: 4),+ const SizedBox(height: 8),Text(- storeBenefit(entry),+ discipline.headline.replaceAll('\n', ' '),maxLines: 2,overflow: TextOverflow.ellipsis,style: TextStyle(- fontSize: 12,- height: 1.3,+ fontSize: 13,+ height: 1.4,color: grid.AppPalette.textSecondary,),),- if (!rating.isEmpty) ...[- const SizedBox(height: 4),- Row(- children: [- Icon(- Icons.star_rounded,- size: 12,- color: grid.AppPalette.textSecondary,- ),- const SizedBox(width: 3),- Text(- '${rating.average.toStringAsFixed(1)} · ${rating.count}',- style: TextStyle(- fontSize: 11,- color: grid.AppPalette.textSecondary,+ const Spacer(),+ Row(+ children: [+ for (final entry in marks) ...[+ Tooltip(+ message: entry.name,+ child: EngineMark(+ engine: entry.id,+ displayName: entry.name,+ size: 24,),),+ const SizedBox(width: 7),],- ),- ],+ const Spacer(),+ Text(+ '${entries.length} ${entries.length == 1 ? 'harness' : 'harnesses'}',+ style: TextStyle(+ fontSize: 12,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ ],+ ),],),),- const SizedBox(width: 12),- TextButton(- key: ValueKey('store-action:${entry.id}'),- onPressed: entry.isViewerPackage ? onOpen : onAction,- style: TextButton.styleFrom(- backgroundColor: grid.AppSurface.selectedFill,- foregroundColor: grid.AppPalette.accentOnSurface,- minimumSize: const Size(62, 30),- padding: const EdgeInsets.symmetric(horizontal: 14),- shape: const StadiumBorder(),- ),- child: Text(- entry.isViewerPackage- ? 'View'- : entry.hasUpdate- ? 'Update'- : installed- ? 'Open'- : 'Get',- style: const TextStyle(- fontSize: 12,- fontWeight: FontWeight.w600,- ),- ),- ),- ],- ),+ ),+ ],),- ),- );+ );+ }}diff --git a/desktop/lib/store/store_editorial.dart b/desktop/lib/store/store_editorial.dartindex f759d8045..34d5d6d79 100644--- a/desktop/lib/store/store_editorial.dart+++ b/desktop/lib/store/store_editorial.dart@@ -1,5 +1,6 @@import '../core/dsh_catalog.dart';import 'store_categories.g.dart';+import 'store_project_examples.dart';export 'store_categories.g.dart';String storeCategoryFor(DshEntry entry) {@@ -183,101 +184,6 @@ const storeStories = <String, StoreStory>{),};-class StoreCollection {- const StoreCollection({- required this.id,- required this.title,- required this.subtitle,- required this.categories,- required this.featuredIds,- });-- final String id;- final String title;- final String subtitle;- final Set<String> categories;- final List<String> featuredIds;-- bool includes(DshEntry entry) =>- !entry.isEngine &&- !entry.isViewerPackage &&- (categories.contains(storeCategoryFor(entry)) ||- featuredIds.contains(entry.id));-}--const storeCollections = [- StoreCollection(- id: 'shape',- title: 'Give your ideas shape.',- subtitle: 'Scenes, parts, architecture, and original art.',- categories: {'Design'},- featuredIds: [- 'autonomous/blender',- 'autonomous/freecad',- 'autonomous/creative-direction',- ],- ),- StoreCollection(- id: 'hardware',- title: 'Build something real.',- subtitle: 'Circuits, fabrication, robotics, and simulation.',- categories: {'Engineering', 'Simulation'},- featuredIds: [- 'autonomous/copper',- 'autonomous/autonomous-circuit',- 'autonomous/circuitjs',- 'autonomous/kicad',- 'autonomous/mujoco',- ],- ),- StoreCollection(- id: 'play',- title: 'Make something play.',- subtitle: 'Invent a game. Compose a piece. Build a world.',- categories: {'Games', 'Music'},- featuredIds: [- 'autonomous/phaser',- 'autonomous/strudel',- 'autonomous/music-studio',- 'autonomous/voxel-worlds',- ],- ),- StoreCollection(- id: 'tell',- title: 'Tell your story.',- subtitle: 'Films, generated images, slides, and documents.',- categories: {'Media', 'Productivity'},- featuredIds: [- 'autonomous/openmontage',- 'autonomous/remotion',- 'autonomous/marp',- ],- ),- StoreCollection(- id: 'explore',- title: 'Follow a question.',- subtitle: 'Explore data, run experiments, and weigh a decision.',- categories: {'Science & Data', 'Research'},- featuredIds: [- 'autonomous/data-studio',- 'autonomous/roundtable',- 'autonomous/marimo',- ],- ),- StoreCollection(- id: 'local',- title: 'Make AI your own.',- subtitle: 'Run, compare, and manage models on your machines.',- categories: {'Local AI'},- featuredIds: [- 'autonomous/autonomous-grid',- 'autonomous/ollama',- 'autonomous/mlx-lm',- 'autonomous/vllm',- ],- ),-];-String storeBenefit(DshEntry entry) =>storeStories[entry.id]?.benefit ??entry.description ??@@ -293,7 +199,32 @@ bool storeMatches(DshEntry entry, String query) {entry.category,storeCategoryFor(entry),entry.description,+ entry.tagline,storeBenefit(entry),+ ...?storeStories[entry.id]?.prompts,+ storeProjectExamples[entry.id]?.prompt,+ storeProjectExamples[entry.id]?.title,+ ...entry.examples.map((example) => example.prompt),].join(' ').toLowerCase();return terms.every(text.contains);}++/// A named tool comes before incidental mentions in another tool's prompts.+List<DshEntry> storeSearch(Iterable<DshEntry> entries, String query) {+ final needle = query.trim().toLowerCase();+ int relevance(DshEntry entry) {+ final name = entry.name.toLowerCase();+ if (name == needle) return 0;+ if (name.startsWith(needle)) return 1;+ if (name.contains(needle)) return 2;+ return 3;+ }++ return entries.where((entry) => storeMatches(entry, query)).toList()+ ..sort((a, b) {+ final order = relevance(a).compareTo(relevance(b));+ return order != 0+ ? order+ : a.name.toLowerCase().compareTo(b.name.toLowerCase());+ });+}diff --git a/desktop/lib/store/store_exploration.dart b/desktop/lib/store/store_exploration.dartnew file mode 100644index 000000000..a2af96c6a--- /dev/null+++ b/desktop/lib/store/store_exploration.dart@@ -0,0 +1,242 @@+import 'package:flutter/material.dart';++import '../core/dsh_catalog.dart';+import 'store_editorial.dart';+import 'store_project_examples.dart';++/// Editorial direction for browsing. Product-page copy and package metadata+/// remain in their existing sources; these introductions invite an experiment.+class StoreDiscipline {+ const StoreDiscipline({+ required this.name,+ required this.headline,+ required this.description,+ required this.invitation,+ required this.color,+ this.featured = const [],+ });++ final String name;+ final String headline;+ final String description;+ final String invitation;+ // These colors belong to editorial artwork, not the app's chrome palette.+ final Color color;+ final List<String> featured;++ DshEntry? example(List<DshEntry> entries) {+ for (final id in featured) {+ for (final entry in entries) {+ if (entry.id == id) return entry;+ }+ }+ return entries.where((e) => !e.isViewerPackage).firstOrNull;+ }+}++const storeDisciplines = <String, StoreDiscipline>{+ 'Coding': StoreDiscipline(+ name: 'Coding',+ headline: 'Start with what\nyou know.',+ description:+ 'Build the feature. Try the idea. Follow a promising detour. '+ 'Your coding agents are right here, ready for the next thing.',+ invitation: 'Your familiar tools. Room for bigger ideas.',+ color: Color(0xffcfedac),+ featured: ['codex', 'claude', 'cursor'],+ ),+ 'Design': StoreDiscipline(+ name: 'Design',+ headline: 'Give an idea\na shape.',+ description:+ 'A part that fits just right. A room that only exists in your head. '+ 'Use code to explore form, change a detail, and see it come to life.',+ invitation: 'Make a first shape. Then make it yours.',+ color: Color(0xffdacdf7),+ featured: [+ 'autonomous/blender',+ 'autonomous/text-to-cad',+ 'autonomous/freecad',+ ],+ ),+ 'Engineering': StoreDiscipline(+ name: 'Engineering',+ headline: 'Bring your ideas\noff screen.',+ description:+ 'Follow a signal. Design a circuit. Prepare a part for printing. '+ 'Get closer to how things work by making something of your own.',+ invitation: 'Start with one circuit. See where it takes you.',+ color: Color(0xffffcf9e),+ featured: [+ 'autonomous/autonomous-circuit',+ 'autonomous/copper',+ 'autonomous/circuitjs',+ 'autonomous/kicad',+ ],+ ),+ 'Media': StoreDiscipline(+ name: 'Media',+ headline: 'Make the story\nyou can see.',+ description:+ 'Turn an idea into images, animation, or a film. '+ 'Try a different rhythm, change the light, and find the version that feels right.',+ invitation: 'One scene is a good place to begin.',+ color: Color(0xffffbfb5),+ featured: [+ 'autonomous/remotion',+ 'autonomous/openmontage',+ 'autonomous/manim',+ ],+ ),+ 'Music': StoreDiscipline(+ name: 'Music',+ headline: 'Find a sound.\nMake it yours.',+ description:+ 'A few notes can become a whole new direction. '+ 'Compose, listen, change a pattern, and hear what happens next.',+ invitation: 'Start with a rhythm you cannot get out of your head.',+ color: Color(0xffe6c6f3),+ featured: [+ 'autonomous/score',+ 'autonomous/music-studio',+ 'autonomous/strudel',+ ],+ ),+ 'Productivity': StoreDiscipline(+ name: 'Productivity',+ headline: 'Give your thinking\na little room.',+ description:+ 'Make a deck that tells the story, a document worth keeping, '+ 'or a spreadsheet that answers a question. Shape the work around your idea.',+ invitation: 'Turn a rough thought into something you can share.',+ color: Color(0xfff2e3a6),+ featured: ['autonomous/marp', 'autonomous/typst', 'autonomous/jev-sheets'],+ ),+ 'Science & Data': StoreDiscipline(+ name: 'Science & Data',+ headline: 'Follow the\ninteresting question.',+ description:+ 'Explore a dataset, test a hunch, or look at a molecule in a new way. '+ 'Make the experiment visible and follow the evidence wherever it leads.',+ invitation: 'A good question is enough to get started.',+ color: Color(0xffbce1f5),+ featured: [+ 'autonomous/marimo',+ 'autonomous/data-studio',+ 'autonomous/rdkit',+ ],+ ),+ 'Simulation': StoreDiscipline(+ name: 'Simulation',+ headline: 'Build a world.\nSee what happens.',+ description:+ 'Give a robot a task. Change a force. Try a different control loop. '+ 'Use a simulation to explore the ideas you want to understand.',+ invitation: 'Change one thing. Watch the world respond.',+ color: Color(0xffb6e5d3),+ featured: [+ 'autonomous/mujoco',+ 'autonomous/drone-pilot',+ 'autonomous/dimos',+ ],+ ),+ 'Games': StoreDiscipline(+ name: 'Games',+ headline: 'Your world.\nYour rules.',+ description:+ 'Invent a tiny game, build a place to explore, or make a new reason '+ 'to say “one more try.” Play with what you make. Then change the rules.',+ invitation: 'The first version only needs to be fun enough to try.',+ color: Color(0xffcec9ff),+ featured: [+ 'autonomous/godogen',+ 'autonomous/phaser',+ 'autonomous/game-master',+ 'autonomous/voxel-worlds',+ ],+ ),+ 'Research': StoreDiscipline(+ name: 'Research',+ headline: 'Let one question\nlead to another.',+ description:+ 'Look for evidence, compare perspectives, and keep the disagreements '+ 'that matter. Give your curiosity somewhere to go deeper.',+ invitation: 'Bring a question you have been meaning to explore.',+ color: Color(0xffbce6cf),+ featured: ['autonomous/roundtable', 'autonomous/jev-browser'],+ ),+ 'Local AI': StoreDiscipline(+ name: 'Local AI',+ headline: 'Make AI\nyour own.',+ description:+ 'Run a model on your machine, compare what it can do, and find '+ 'a setup that fits your work. The next experiment can happen right at your desk.',+ invitation: 'Get to know what your own machines can do.',+ color: Color(0xffc8def5),+ featured: [+ 'autonomous/autonomous-grid',+ 'autonomous/ollama',+ 'local/ollama',+ 'autonomous/mlx-lm',+ ],+ ),+};++StoreDiscipline storeDiscipline(String name) =>+ storeDisciplines[name] ??+ StoreDiscipline(+ name: name,+ headline: 'A new craft\nis waiting.',+ description:+ 'Explore a tool, try a small idea, and see what you can make. '+ 'There is always another direction to follow.',+ invitation: 'Bring your curiosity. Start with one small project.',+ color: const Color(0xffd6e6bc),+ );++/// Bundled, unaltered outputs from store/showcase. Only shown for a matching+/// entry in this machine's catalog. The source paths are recorded with the assets.+const storeProjectAssets = <String, String>{+ 'autonomous/blender': 'assets/store/projects/blender.jpg',+ 'autonomous/text-to-cad': 'assets/store/projects/cad.jpg',+ 'autonomous/autonomous-circuit': 'assets/store/projects/circuit.jpg',+ 'autonomous/copper': 'assets/store/copper-board.png',+ 'autonomous/mujoco': 'assets/store/projects/robot.jpg',+ 'autonomous/godogen': 'assets/store/projects/game.jpg',+ 'autonomous/phaser': 'assets/store/phaser-bricks.png',+ 'autonomous/score': 'assets/store/projects/music.jpg',+ 'autonomous/marimo': 'assets/store/projects/data.jpg',+ 'autonomous/remotion': 'assets/store/projects/film.jpg',+ 'autonomous/roundtable': 'assets/store/projects/research.jpg',+ 'autonomous/marp': 'assets/store/projects/slides.jpg',+ 'autonomous/circuitjs': 'assets/store/projects/circuitjs.jpg',+ 'autonomous/yosys': 'assets/store/projects/yosys.jpg',+ 'autonomous/orca-slicer': 'assets/store/projects/orca-slicer.jpg',+ 'autonomous/autonomous-grid': 'assets/store/grid-fleet.png',+};++String? storeProjectAsset(DshEntry entry) =>+ storeProjectAssets[entry.id] ?? storeStories[entry.id]?.asset;++String? storeProjectPrompt(DshEntry entry) =>+ storeProjectExamples[entry.id]?.prompt ??+ entry.examples.firstOrNull?.prompt ??+ storeStories[entry.id]?.prompts.firstOrNull;++String? storeProjectTitle(DshEntry entry) =>+ storeProjectExamples[entry.id]?.title ??+ entry.examples.firstOrNull?.caption;++const storeRelatedDisciplines = <String, List<String>>{+ 'Coding': ['Design', 'Games', 'Science & Data'],+ 'Design': ['Engineering', 'Media', 'Games'],+ 'Engineering': ['Design', 'Simulation', 'Coding'],+ 'Media': ['Music', 'Design', 'Productivity'],+ 'Music': ['Media', 'Games', 'Coding'],+ 'Productivity': ['Research', 'Science & Data', 'Media'],+ 'Science & Data': ['Research', 'Simulation', 'Productivity'],+ 'Simulation': ['Engineering', 'Science & Data', 'Games'],+ 'Games': ['Design', 'Music', 'Simulation'],+ 'Research': ['Science & Data', 'Productivity', 'Coding'],+ 'Local AI': ['Coding', 'Research', 'Science & Data'],+};diff --git a/desktop/lib/store/store_explore_widgets.dart b/desktop/lib/store/store_explore_widgets.dartnew file mode 100644index 000000000..a92594edc--- /dev/null+++ b/desktop/lib/store/store_explore_widgets.dart@@ -0,0 +1,450 @@+import 'package:flutter/material.dart';+import 'package:flutter/services.dart';+import 'package:lucide_icons_flutter/lucide_icons.dart';++import '../core/dsh_catalog.dart';+import '../shared/theme/app_theme.dart' as grid;+import '../shared/widgets/app_icon_button.dart';+import '../widgets/engine_identity.dart';+import 'store_editorial.dart';+import 'store_exploration.dart';+import 'store_models.dart';++class StoreExploreHeading extends StatelessWidget {+ const StoreExploreHeading({+ super.key,+ required this.title,+ this.subtitle,+ this.action,+ this.onAction,+ });+ final String title;+ final String? subtitle;+ final String? action;+ final VoidCallback? onAction;++ @override+ Widget build(BuildContext context) => Row(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Expanded(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ title,+ style: TextStyle(+ fontSize: 25,+ height: 1.15,+ fontWeight: FontWeight.w700,+ letterSpacing: -.7,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ if (subtitle != null) ...[+ const SizedBox(height: 8),+ Text(+ subtitle!,+ style: TextStyle(+ fontSize: 14,+ height: 1.5,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ ],+ ],+ ),+ ),+ if (onAction != null) ...[+ const SizedBox(width: 16),+ TextButton(onPressed: onAction, child: Text(action!)),+ ],+ ],+ );+}++/// A real output where one is available, otherwise the package's actual mark.+/// A failed community image never hides the harness or makes its card unusable.+class StoreProjectArt extends StatelessWidget {+ const StoreProjectArt({+ super.key,+ required this.entry,+ this.fit = BoxFit.cover,+ });+ final DshEntry entry;+ final BoxFit fit;++ @override+ Widget build(BuildContext context) {+ final color = storeDiscipline(storeCategoryFor(entry)).color;+ final fallback = DecoratedBox(+ decoration: BoxDecoration(+ gradient: LinearGradient(+ begin: Alignment.topLeft,+ end: Alignment.bottomRight,+ colors: [color.withValues(alpha: .25), grid.AppPalette.panelBg],+ ),+ ),+ child: Center(+ child: EngineMark(engine: entry.id, displayName: entry.name, size: 76),+ ),+ );+ final asset = storeProjectAsset(entry);+ final url =+ entry.examples.map((e) => e.image).whereType<String>().firstOrNull ??+ entry.screenshots.firstOrNull;+ final uri = url == null ? null : Uri.tryParse(url);+ final Widget art;+ if (asset != null) {+ art = Image.asset(+ asset,+ fit: fit,+ excludeFromSemantics: true,+ frameBuilder: (_, child, frame, _) => frame == null ? fallback : child,+ errorBuilder: (_, _, _) => fallback,+ );+ } else if (uri?.scheme == 'https' && uri!.hasAuthority) {+ art = Image.network(+ url!,+ fit: fit,+ excludeFromSemantics: true,+ frameBuilder: (_, child, frame, _) => frame == null ? fallback : child,+ errorBuilder: (_, _, _) => fallback,+ );+ } else {+ art = fallback;+ }+ return Semantics(+ label: '${entry.name} preview',+ image: true,+ child: SizedBox.expand(child: art),+ );+ }+}++class StoreExploreCard extends StatefulWidget {+ const StoreExploreCard({+ super.key,+ required this.child,+ required this.onTap,+ required this.color,+ this.semanticLabel,+ });+ final Widget child;+ final VoidCallback onTap;+ final Color color;+ final String? semanticLabel;++ @override+ State<StoreExploreCard> createState() => _StoreExploreCardState();+}++class _StoreExploreCardState extends State<StoreExploreCard> {+ bool _hovered = false;+ bool _focused = false;++ @override+ Widget build(BuildContext context) {+ final active = _hovered || _focused;+ final radius = BorderRadius.circular(20);+ return AnimatedContainer(+ duration: MediaQuery.disableAnimationsOf(context)+ ? Duration.zero+ : const Duration(milliseconds: 150),+ decoration: BoxDecoration(+ borderRadius: radius,+ border: Border.all(+ color: active ? widget.color : grid.AppPalette.divider,+ width: 1,+ ),+ boxShadow: active+ ? [+ BoxShadow(+ color: widget.color.withValues(alpha: .08),+ blurRadius: 20,+ ),+ ]+ : [],+ ),+ child: Material(+ color: grid.AppPalette.panelBg,+ borderRadius: radius,+ clipBehavior: Clip.antiAlias,+ child: Semantics(+ label: widget.semanticLabel,+ button: true,+ child: InkWell(+ onTap: widget.onTap,+ onHover: (value) => setState(() => _hovered = value),+ onFocusChange: (value) => setState(() => _focused = value),+ focusColor: widget.color.withValues(alpha: .10),+ hoverColor: widget.color.withValues(alpha: .04),+ child: widget.child,+ ),+ ),+ ),+ );+ }+}++class StoreProjectGrid extends StatelessWidget {+ const StoreProjectGrid({+ super.key,+ required this.entries,+ required this.ratingFor,+ required this.installed,+ required this.onOpen,+ required this.onAction,+ });+ final List<DshEntry> entries;+ final StoreRating Function(DshEntry) ratingFor;+ final bool Function(String) installed;+ final ValueChanged<String> onOpen;+ final ValueChanged<DshEntry> onAction;++ @override+ Widget build(BuildContext context) => LayoutBuilder(+ builder: (context, box) {+ final scale = MediaQuery.textScalerOf(context).scale(14) / 14;+ final columns = box.maxWidth >= 1080 && scale <= 1.25+ ? 3+ : box.maxWidth >= 620 && scale <= 1.5+ ? 2+ : 1;+ final width = (box.maxWidth - (columns - 1) * 20) / columns;+ return Wrap(+ spacing: 20,+ runSpacing: 20,+ children: [+ for (final entry in entries)+ SizedBox(+ width: width,+ child: _ProjectCard(+ key: ValueKey('store-card:${entry.id}'),+ entry: entry,+ rating: ratingFor(entry),+ installed: installed(entry.id),+ onOpen: () => onOpen(entry.id),+ onAction: () => onAction(entry),+ ),+ ),+ ],+ );+ },+ );+}++class _ProjectCard extends StatelessWidget {+ const _ProjectCard({+ super.key,+ required this.entry,+ required this.rating,+ required this.installed,+ required this.onOpen,+ required this.onAction,+ });+ final DshEntry entry;+ final StoreRating rating;+ final bool installed;+ final VoidCallback onOpen;+ final VoidCallback onAction;++ @override+ Widget build(BuildContext context) {+ final scale = MediaQuery.textScalerOf(context).scale(14) / 14;+ final prompt = storeProjectPrompt(entry);+ final title = storeProjectTitle(entry);+ Future<void> copyPrompt() async {+ await Clipboard.setData(ClipboardData(text: prompt!));+ if (context.mounted) {+ ScaffoldMessenger.of(context)+ .showSnackBar(const SnackBar(content: Text('Prompt copied')));+ }+ }++ return StoreExploreCard(+ color: storeDiscipline(storeCategoryFor(entry)).color,+ onTap: onOpen,+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ AspectRatio(aspectRatio: 1.65, child: StoreProjectArt(entry: entry)),+ SizedBox(+ height: 222 * scale,+ child: Padding(+ padding: const EdgeInsets.all(20),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Row(+ children: [+ EngineMark(+ engine: entry.id,+ displayName: entry.name,+ size: 26,+ ),+ const SizedBox(width: 10),+ Expanded(+ child: Text(+ entry.name,+ maxLines: 2,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 18,+ height: 1.15,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ ),+ ],+ ),+ const SizedBox(height: 12),+ if (title != null) ...[+ Text(+ title,+ maxLines: 2,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 14,+ height: 1.3,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ const SizedBox(height: 8),+ ],+ Text(+ prompt == null ? storeBenefit(entry) : '“$prompt”',+ maxLines: title == null ? 3 : 2,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 13,+ height: 1.45,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ const Spacer(),+ Row(+ children: [+ if (!rating.isEmpty) ...[+ const Icon(+ Icons.star_rounded,+ size: 14,+ color: Color(0xffd39c44),+ ),+ const SizedBox(width: 4),+ Text(+ '${rating.average.toStringAsFixed(1)} · ${rating.count}',+ style: TextStyle(+ fontSize: 12,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ if (prompt != null) ...[+ const SizedBox(width: 8),+ AppIconButton(+ key: ValueKey('store-copy-idea:${entry.id}'),+ icon: LucideIcons.copy300,+ size: 14,+ tooltip: 'Copy prompt',+ onPressed: copyPrompt,+ ),+ ],+ ] else if (prompt != null) ...[+ TextButton.icon(+ key: ValueKey('store-copy-idea:${entry.id}'),+ onPressed: copyPrompt,+ style: TextButton.styleFrom(+ foregroundColor: grid.AppPalette.textSecondary,+ padding: const EdgeInsets.symmetric(horizontal: 4),+ minimumSize: const Size(0, 34),+ ),+ icon: const Icon(LucideIcons.copy300, size: 13),+ label: const Text(+ 'Copy prompt',+ style: TextStyle(fontSize: 12),+ ),+ ),+ ] else ...[+ Text(+ 'Explore',+ style: TextStyle(+ fontSize: 12,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ const SizedBox(width: 6),+ Icon(+ LucideIcons.arrowUpRight300,+ size: 14,+ color: grid.AppPalette.textSecondary,+ ),+ ],+ const Spacer(),+ TextButton(+ key: ValueKey('store-action:${entry.id}'),+ onPressed: onAction,+ style: TextButton.styleFrom(+ foregroundColor: grid.AppPalette.textPrimary,+ backgroundColor: grid.AppSurface.selectedFill,+ minimumSize: const Size(70, 34),+ shape: const StadiumBorder(),+ ),+ child: Text(+ entry.hasUpdate+ ? 'Update'+ : installed+ ? 'Open'+ : 'Get',+ ),+ ),+ ],+ ),+ ],+ ),+ ),+ ),+ ],+ ),+ );+ }+}++class StoreLearningNote extends StatelessWidget {+ const StoreLearningNote({super.key});++ @override+ Widget build(BuildContext context) => Container(+ padding: const EdgeInsets.all(28),+ decoration: BoxDecoration(+ border: Border(top: BorderSide(color: grid.AppPalette.divider)),+ ),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ 'Learn the next craft through the things you build.',+ style: TextStyle(+ fontSize: 23,+ height: 1.2,+ letterSpacing: -.5,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ const SizedBox(height: 12),+ Text(+ 'Give an agent an idea. Inspect what it makes. Change a detail and try again. '+ 'Your curiosity sets the direction; your judgment shapes what comes next.',+ style: TextStyle(+ fontSize: 14,+ height: 1.6,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ ],+ ),+ );+}diff --git a/desktop/lib/store/store_listing.dart b/desktop/lib/store/store_listing.dartnew file mode 100644index 000000000..59b84c0c6--- /dev/null+++ b/desktop/lib/store/store_listing.dart@@ -0,0 +1,165 @@+import 'package:flutter/material.dart';++import '../core/dsh_catalog.dart';+import '../shared/theme/app_theme.dart' as grid;+import '../widgets/engine_identity.dart';+import 'store_editorial.dart';+import 'store_models.dart';++/// Compact, responsive rows for search, the complete index, and coding agents.+class StoreListing extends StatelessWidget {+ const StoreListing({+ super.key,+ required this.entries,+ required this.ratingFor,+ required this.installed,+ required this.onOpen,+ required this.onAction,+ });+ final List<DshEntry> entries;+ final StoreRating Function(DshEntry) ratingFor;+ final bool Function(String) installed;+ final ValueChanged<String> onOpen;+ final ValueChanged<DshEntry> onAction;++ @override+ Widget build(BuildContext context) => LayoutBuilder(+ builder: (context, box) {+ final columns = box.maxWidth >= 1120+ ? 3+ : box.maxWidth >= 720+ ? 2+ : 1;+ final width = (box.maxWidth - (columns - 1) * 24) / columns;+ return Wrap(+ spacing: 24,+ children: [+ for (final entry in entries)+ SizedBox(+ width: width,+ child: _ProductRow(+ key: ValueKey('store-card:${entry.id}'),+ entry: entry,+ rating: ratingFor(entry),+ installed: installed(entry.id),+ onOpen: () => onOpen(entry.id),+ onAction: () => onAction(entry),+ ),+ ),+ ],+ );+ },+ );+}++class _ProductRow extends StatelessWidget {+ const _ProductRow({+ super.key,+ required this.entry,+ required this.rating,+ required this.installed,+ required this.onOpen,+ required this.onAction,+ });+ final DshEntry entry;+ final StoreRating rating;+ final bool installed;+ final VoidCallback onOpen;+ final VoidCallback onAction;++ @override+ Widget build(BuildContext context) => Material(+ color: Colors.transparent,+ child: InkWell(+ onTap: onOpen,+ borderRadius: BorderRadius.circular(10),+ child: Container(+ constraints: const BoxConstraints(minHeight: 94),+ padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 6),+ decoration: BoxDecoration(+ border: Border(bottom: BorderSide(color: grid.AppPalette.divider)),+ ),+ child: Row(+ children: [+ EngineMark(engine: entry.id, displayName: entry.name, size: 42),+ const SizedBox(width: 12),+ Expanded(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ mainAxisSize: MainAxisSize.min,+ children: [+ Text(+ entry.name,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 14,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ const SizedBox(height: 4),+ Text(+ storeBenefit(entry),+ maxLines: 2,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 12,+ height: 1.3,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ if (!rating.isEmpty) ...[+ const SizedBox(height: 4),+ Row(+ children: [+ Icon(+ Icons.star_rounded,+ size: 12,+ color: grid.AppPalette.textSecondary,+ ),+ const SizedBox(width: 3),+ Text(+ '${rating.average.toStringAsFixed(1)} · ${rating.count}',+ style: TextStyle(+ fontSize: 11,+ color: grid.AppPalette.textSecondary,+ ),+ ),+ ],+ ),+ ],+ ],+ ),+ ),+ const SizedBox(width: 12),+ TextButton(+ key: ValueKey('store-action:${entry.id}'),+ onPressed: entry.isViewerPackage ? onOpen : onAction,+ style: TextButton.styleFrom(+ backgroundColor: grid.AppSurface.selectedFill,+ foregroundColor: grid.AppPalette.accentOnSurface,+ minimumSize: const Size(62, 30),+ padding: const EdgeInsets.symmetric(horizontal: 14),+ shape: const StadiumBorder(),+ ),+ child: Text(+ entry.isViewerPackage+ ? 'View'+ : entry.hasUpdate+ ? 'Update'+ : installed+ ? 'Open'+ : 'Get',+ style: const TextStyle(+ fontSize: 12,+ fontWeight: FontWeight.w600,+ ),+ ),+ ),+ ],+ ),+ ),+ ),+ );+}diff --git a/desktop/lib/store/store_project_examples.dart b/desktop/lib/store/store_project_examples.dartnew file mode 100644index 000000000..33f6a024a--- /dev/null+++ b/desktop/lib/store/store_project_examples.dart@@ -0,0 +1,57 @@+// Exact prompts for the bundled artwork in assets/store/projects/.+// Sources and upstream attribution are recorded in assets/store/README.md.+// These appear only on browsing pages; package detail pages use their own examples.+const storeProjectExamples = <String, ({String title, String prompt})>{+ 'autonomous/blender': (+ title: "A little world, down to the last detail.",+ prompt: "Make a cozy isometric reading nook: a cut-away corner of a room with an armchair, a floor lamp glowing warm, a bookshelf full of colourful books, a round rug and a monstera, with evening sun through the window and a cat asleep on the rug.",+ ),+ 'autonomous/text-to-cad': (+ title: "Design parts that fit together.",+ prompt: "Design a 3D-printable planetary gear set: a 12-tooth sun, three 18-tooth planets and a 48-tooth ring gear with mounting lugs, module 1.5 and 8 mm thick, plus a carrier on steel pins. Give each part its own colour.",+ ),+ 'autonomous/autonomous-circuit': (+ title: "A macropad of your own.",+ prompt: "Design a six-key USB macropad. Start with the schematic.",+ ),+ 'autonomous/mujoco': (+ title: "Teach a robot to say hello.",+ prompt: "Make the Unitree G1 humanoid say hello: stand, raise its right hand and wave three times, then lower it and take a small bow. Record it.",+ ),+ 'autonomous/godogen': (+ title: "Make a world you can play.",+ prompt: "Make a synthwave hoverbike racer: ride down a neon grid canyon toward a striped setting sun, weave between glowing pylons, hop barriers and collect energy cores, with a boost and three shields.",+ ),+ 'autonomous/score': (+ title: "Compose without an instrument.",+ prompt: "I don't play an instrument. Make a gentle, hopeful piece with a flute melody, clarinet reply and warm cello. Let me hear each voice and save an audio sketch.",+ ),+ 'autonomous/marimo': (+ title: "Find the order inside chaos.",+ prompt: "Build a notebook that explores the Lorenz attractor: sliders for σ, ρ and β, the butterfly drawn in two projections coloured by time, and two runs started a hair apart to show how fast they diverge.",+ ),+ 'autonomous/remotion': (+ title: "Make your launch move.",+ prompt: "Make a 12 second launch video for the Harness Store with three beats: the store opens, a card flips to Get, and a spinning 3D cube lands in a pane. Bold type, smooth motion. Render it to MP4.",+ ),+ 'autonomous/roundtable': (+ title: "Explore both sides of a decision.",+ prompt: "Should our Windows port be native, or should we ship the daemon inside WSL2? One engineer on it. Evidence: the cli/ folder.",+ ),+ 'autonomous/marp': (+ title: "Take an audience to the deep sea.",+ prompt: "Make a ten-minute keynote for a science festival about the deep ocean: how deep it goes, how little of the seafloor we have mapped, and the global push to finish the map by 2030.",+ ),+ 'autonomous/circuitjs': (+ title: "Make a light blink. Understand why.",+ prompt: "Build a 555 astable LED flasher with a potentiometer that sets the rate, and scopes on the capacitor and the output.",+ ),+ 'autonomous/yosys': (+ title: "Build a tiny CPU.",+ prompt: "Build a tiny 8-bit CPU for the iCEBreaker that runs a Fibonacci program from ROM and prints every number over the USB serial port at 115200 baud; the button runs it again. Simulate it, check the serial output in the testbench and build the bitstream.",+ ),+ 'autonomous/orca-slicer': (+ title: "From a model to a print plan.",+ prompt: "Prepare this 24 mm spacer with my exported profiles, then revise the Everyday plan to four walls at 0.16 mm. Reopen the native export and show the time/material change.",+ ),+};diff --git a/desktop/lib/store/store_screen.dart b/desktop/lib/store/store_screen.dartindex 436b8cc1f..3d40dfb03 100644--- a/desktop/lib/store/store_screen.dart+++ b/desktop/lib/store/store_screen.dart@@ -12,13 +12,18 @@ import '../shared/layouts/widgets/sidebar_item.dart';import '../shared/theme/app_theme.dart' as grid;import '../shared/widgets/app_dialog.dart';import '../shared/widgets/app_icon_button.dart';+import '../shortcuts/app_keymap.dart';+import '../shortcuts/keymap.dart';import '../state/app_state.dart';import '../widgets/engine_identity.dart';import '../widgets/new_agent_dialog.dart';+import 'store_category.dart';import 'store_controller.dart';import 'store_discover.dart';import 'store_editorial.dart';+import 'store_listing.dart';import 'store_models.dart';+import 'store_search.dart';import 'store_showcase.dart';import 'store_viewers.dart';@@ -68,8 +73,7 @@ class _Viewers extends _Shelf {const _Viewers();}-/// The shelves drawn as a plain listing: everything but Discover's front page-/// and the Viewers page, which have views of their own.+/// Catalog shelves: the complete index, search, and disciplines.sealed class _Listed extends _Shelf {const _Listed();}@@ -83,11 +87,6 @@ class _Search extends _Listed {final String query;}-class _Collection extends _Listed {- const _Collection(this.collection);- final StoreCollection collection;-}-class _Category extends _Listed {const _Category(this.name);final String name;@@ -97,7 +96,17 @@ class _Category extends _Listed {/// tab). Only the visible tab is built, so switching away disposed the store's/// state: coming back reset it to Discover, with the search and the open/// product page gone. A tab should keep its place, as a browser tab does.+class _StoreVisit {+ const _StoreVisit(this.shelf, this.selected, this.query);+ final _Shelf shelf;+ final String? selected;+ final String query;+}+class _StorePlace {+ final back = <_StoreVisit>[];+ final forward = <_StoreVisit>[];+ final scroll = PageStorageBucket();_Shelf shelf = const _Discover();String? selected;String query = '';@@ -121,6 +130,8 @@ class _StoreTabState extends State<StoreTab> {late final _search = TextEditingController(text: widget.initialHarness == null ? _place.query : '',);+ final _searchFocus = FocusNode(debugLabel: 'Store search');+ final _browseFocus = FocusNode(debugLabel: 'Store navigation');Timer? _catalogRefresh;void _remember() {@@ -139,6 +150,7 @@ class _StoreTabState extends State<StoreTab> {@overridevoid initState() {super.initState();+ _remember();analytics.screenView('store', source: widget.source);// Deferred a frame: both calls notify listeners at once, and this screen// is built while the shell underneath — which listens to the same@@ -218,6 +230,8 @@ class _StoreTabState extends State<StoreTab> {_catalogRefresh?.cancel();widget.notifier.removeListener(_onAppChanged);_search.dispose();+ _searchFocus.dispose();+ _browseFocus.dispose();_store.dispose();super.dispose();}@@ -269,11 +283,11 @@ class _StoreTabState extends State<StoreTab> {..sort((a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()));return switch (shelf) {_Discover() || _All() => all.where((e) => !e.isViewerPackage).toList(),- _Search(:final query) =>- all.where((e) => !e.isViewerPackage && storeMatches(e, query)).toList(),+ _Search(:final query) => storeSearch(+ all.where((e) => !e.isViewerPackage),+ query,+ ),_Viewers() => all.where((e) => e.isViewerPackage).toList(),- _Collection(:final collection) =>- all.where((e) => !e.isViewerPackage && collection.includes(e)).toList(),_Category(:final name) =>all.where((e) => !e.isViewerPackage && storeCategoryFor(e) == name)@@ -281,23 +295,111 @@ class _StoreTabState extends State<StoreTab> {};}- void _show(_Shelf shelf) {- _search.clear();+ _StoreVisit get _visit => _StoreVisit(_shelf, _selected, _place.query);++ String _shelfKey(_Shelf shelf) => switch (shelf) {+ _Discover() => 'discover',+ _All() => 'all',+ _Search(:final query) => 'search:$query',+ _Category(:final name) => 'category:$name',+ _Viewers() => 'viewers',+ };++ bool get _canGoBack =>+ _place.back.isNotEmpty || _selected != null || _shelf is! _Discover;++ void _restore(_StoreVisit visit) {+ _shelf = visit.shelf;+ _selected = visit.selected;+ _search.value = TextEditingValue(+ text: visit.query,+ selection: TextSelection.collapsed(offset: visit.query.length),+ );+ }++ void _navigate(_StoreVisit next) {+ if (_shelfKey(next.shelf) == _shelfKey(_shelf) &&+ next.selected == _selected) {+ return;+ }+ _browseFocus.requestFocus();+ setState(() {+ _place.back.add(_visit);+ if (_place.back.length > 80) {+ _place.back.removeAt(0);+ }+ _place.forward.clear();+ _restore(next);+ });+ }++ void _goBack() {+ if (!_canGoBack) return;+ _browseFocus.requestFocus();setState(() {- _shelf = shelf;- _selected = null;+ _place.forward.add(_visit);+ _restore(+ _place.back.isEmpty+ ? const _StoreVisit(_Discover(), null, '')+ : _place.back.removeLast(),+ );});}+ void _goForward() {+ if (_place.forward.isEmpty) return;+ _browseFocus.requestFocus();+ setState(() {+ _place.back.add(_visit);+ _restore(_place.forward.removeLast());+ });+ }++ void _show(_Shelf shelf) => _navigate(_StoreVisit(shelf, null, ''));+void _openPage(String id) {analytics.screenView('store_harness', source: 'store');- setState(() => _selected = id);+ _navigate(_StoreVisit(_shelf, id, _search.text));}- void _searchChanged(String query) => setState(() {- _selected = null;- _shelf = query.trim().isEmpty ? const _Discover() : _Search(query);- });+ void _searchChanged(String query) {+ if (query.trim().isEmpty) {+ _clearSearch();+ return;+ }+ // One history entry per search, not one per keystroke. A product opened+ // from results is a separate stop and keeps the original query intact.+ setState(() {+ if (_shelf is! _Search || _selected != null) _place.back.add(_visit);+ _place.forward.clear();+ _selected = null;+ _shelf = _Search(query);+ });+ }++ void _clearSearch() {+ // Return to the discipline where this search began, including its scroll.+ final origin = _place.back.lastIndexWhere(+ (visit) => visit.shelf is! _Search,+ );+ setState(() {+ _place.forward.add(_visit);+ final next = origin < 0+ ? const _StoreVisit(_Discover(), null, '')+ : _place.back[origin];+ if (origin >= 0) _place.back.removeRange(origin, _place.back.length);+ _restore(next);+ });+ _searchFocus.requestFocus();+ }++ void _focusSearch() {+ _searchFocus.requestFocus();+ _search.selection = TextSelection(+ baseOffset: 0,+ extentOffset: _search.text.length,+ );+ }void _takeAction(DshEntry entry) {final local = widget.notifier.localMachineState;@@ -320,102 +422,168 @@ class _StoreTabState extends State<StoreTab> {@overrideWidget build(BuildContext context) {grid.AppTheme.watch(context);- return ColoredBox(- color: grid.AppPalette.windowBg,- child: ListenableBuilder(- listenable: Listenable.merge([widget.notifier, _store]),- builder: (context, _) {- final catalog = _catalog;- final selected = _selected == null ? null : catalog[_selected!];- return Row(- crossAxisAlignment: CrossAxisAlignment.stretch,- children: [- _StoreNav(- shelf: _shelf,- categories: _categories,- onSelect: _show,- search: _search,- onSearch: _searchChanged,- ),- VerticalDivider(width: 1, color: grid.AppPalette.divider),- Expanded(- child: Column(- crossAxisAlignment: CrossAxisAlignment.stretch,- children: [- Expanded(- child: selected != null- ? _ProductPage(- key: ValueKey('store-page:${selected.id}'),- entry: selected,- notifier: widget.notifier,- store: _store,- onBack: () => setState(() => _selected = null),- )- : _shelf is _Viewers- ? StoreViewers(- viewers: _shelved(const _Viewers()),- agents:- widget- .notifier- .localMachineState- ?.dsh- .entries ??- const [],- installedOn: (id) => _installedOn(id)- .map((machine) => machine.machine.displayName)- .toList(),- onOpenAgent: _openPage,- loaded:- widget- .notifier- .localMachineState- ?.dsh- .loaded ??- false,+ return KeymapRegion(+ contextKind: KeymapContext.workspace,+ actions: {+ 'navigation.back': _goBack,+ 'navigation.forward': _goForward,+ 'terminal.find': _focusSearch,+ },+ child: Focus(+ focusNode: _browseFocus,+ skipTraversal: true,+ child: ColoredBox(+ color: grid.AppPalette.windowBg,+ child: ListenableBuilder(+ listenable: Listenable.merge([widget.notifier, _store]),+ builder: (context, _) {+ final catalog = _catalog;+ final selected = _selected == null ? null : catalog[_selected!];+ final category = selected != null+ ? storeCategoryFor(selected)+ : (_shelf is _Category ? (_shelf as _Category).name : null);+ final location =+ selected?.name ??+ switch (_shelf) {+ _Discover() => 'Discover',+ _Category(:final name) => name,+ _Search() => 'Search results',+ _All() => 'All harnesses',+ _Viewers() => 'Viewers',+ };+ return Row(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ _StoreNav(+ shelf: _shelf,+ selectedCategory: category,+ hasProduct: selected != null,+ counts: {+ for (final name in _categories)+ name: catalog.values+ .where(+ (e) =>+ !e.isViewerPackage &&+ storeCategoryFor(e) == name,)- : _shelf is _Discover- ? StoreDiscover(- entries: _shelved(const _Discover()),- loaded:- widget- .notifier- .localMachineState- ?.dsh- .loaded ??- false,- ratingFor: (entry) => _store.ratingOf(- StoreController.keyFor(entry),+ .length,+ },+ categories: _categories,+ onSelect: _show,+ ),+ VerticalDivider(width: 1, color: grid.AppPalette.divider),+ Expanded(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ StoreSearch(+ controller: _search,+ focusNode: _searchFocus,+ onChanged: _searchChanged,+ autofocus: _selected == null,+ onClear: _clearSearch,+ onBack: _canGoBack ? _goBack : null,+ onForward: _place.forward.isEmpty ? null : _goForward,+ onDiscover: () => _show(const _Discover()),+ location: location,+ category: selected != null ? category : null,+ onCategory: category == null+ ? null+ : () => _show(_Category(category)),+ ),+ Expanded(+ child: PageStorage(+ bucket: _place.scroll,+ child: KeyedSubtree(+ key: PageStorageKey(+ 'store-location:${_shelfKey(_shelf)}:${_selected ?? ''}',),- installed: (id) => _installedOn(id).isNotEmpty,- onOpen: _openPage,- onAction: _takeAction,- onCollection: (collection) =>- _show(_Collection(collection)),- onAll: () => _show(const _All()),- onEngines: () => _show(const _Category('Coding')),- )- : _Shelf$View(- shelf: _shelf as _Listed,- entries: _shelved(_shelf),- store: _store,- installedOn: _installedOn,- loaded:- widget- .notifier- .localMachineState- ?.dsh- .loaded ??- false,- onOpen: _openPage,- onAction: _takeAction,+ child: selected != null+ ? _ProductPage(+ key: ValueKey(+ 'store-page:${selected.id}',+ ),+ entry: selected,+ notifier: widget.notifier,+ store: _store,+ )+ : _shelf is _Viewers+ ? StoreViewers(+ viewers: _shelved(const _Viewers()),+ agents:+ widget+ .notifier+ .localMachineState+ ?.dsh+ .entries ??+ const [],+ installedOn: (id) => _installedOn(id)+ .map(+ (machine) =>+ machine.machine.displayName,+ )+ .toList(),+ onOpenAgent: _openPage,+ loaded:+ widget+ .notifier+ .localMachineState+ ?.dsh+ .loaded ??+ false,+ )+ : _shelf is _Discover+ ? StoreDiscover(+ entries: _shelved(const _Discover()),+ loaded:+ widget+ .notifier+ .localMachineState+ ?.dsh+ .loaded ??+ false,+ ratingFor: (entry) => _store.ratingOf(+ StoreController.keyFor(entry),+ ),+ installed: (id) =>+ _installedOn(id).isNotEmpty,+ onOpen: _openPage,+ onAction: _takeAction,+ onCategory: (name) =>+ _show(_Category(name)),+ onAll: () => _show(const _All()),+ onEngines: () =>+ _show(const _Category('Coding')),+ )+ : _Shelf$View(+ shelf: _shelf as _Listed,+ categories: _categories,+ onCategory: (name) =>+ _show(_Category(name)),+ entries: _shelved(_shelf),+ store: _store,+ installedOn: _installedOn,+ loaded:+ widget+ .notifier+ .localMachineState+ ?.dsh+ .loaded ??+ false,+ onOpen: _openPage,+ onAction: _takeAction,+ ),),+ ),+ ),+ ],),- ],- ),- ),- ],- );- },+ ),+ ],+ );+ },+ ),+ ),),);}@@ -427,16 +595,18 @@ class _StoreNav extends StatelessWidget {const _StoreNav({required this.shelf,required this.categories,+ required this.selectedCategory,+ required this.hasProduct,+ required this.counts,required this.onSelect,- required this.search,- required this.onSearch,});final _Shelf shelf;final List<String> categories;+ final String? selectedCategory;+ final bool hasProduct;+ final Map<String, int> counts;final ValueChanged<_Shelf> onSelect;- final TextEditingController search;- final ValueChanged<String> onSearch;@overrideWidget build(BuildContext context) {@@ -456,52 +626,51 @@ class _StoreNav extends StatelessWidget {child: ListView(padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 22),children: [- TextField(- key: const ValueKey('store-search'),- controller: search,- onChanged: onSearch,- style: TextStyle(- fontSize: 13,- color: grid.AppPalette.textPrimary,- ),- decoration: InputDecoration(- hintText: 'Search',- isDense: true,- contentPadding: const EdgeInsets.symmetric(vertical: 10),- prefixIcon: Icon(- LucideIcons.search300,- size: 15,- color: grid.AppPalette.textSecondary,- ),- prefixIconConstraints: const BoxConstraints(minWidth: 32),- suffixIconConstraints: const BoxConstraints(minWidth: 28),- suffixIcon: search.text.isEmpty- ? null- : AppIconButton(- icon: LucideIcons.x300,- tooltip: 'Clear search',- onPressed: () {- search.clear();- onSearch('');- },- ),- ),- ),- const SizedBox(height: 18),SidebarItem(key: const ValueKey('store-shelf-discover'),icon: LucideIcons.sparkles300,label: 'Discover',- selected: shelf is _Discover,+ selected: !hasProduct && shelf is _Discover,onTap: () => onSelect(const _Discover()),),- const SizedBox(height: 16),+ SidebarItem(+ key: const ValueKey('store-shelf-all'),+ icon: LucideIcons.layoutGrid300,+ label: 'All harnesses',+ selected: !hasProduct && shelf is _All,+ onTap: () => onSelect(const _All()),+ ),+ const SizedBox(height: 22),+ Padding(+ padding: const EdgeInsets.fromLTRB(10, 0, 10, 10),+ child: Text(+ 'DISCIPLINES',+ style: TextStyle(+ fontSize: 10,+ letterSpacing: 1.4,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textFaint,+ ),+ ),+ ),for (final name in categories)SidebarItem(key: ValueKey('store-shelf-category:$name'),icon: _categoryIcon(name),label: name,- selected: shelf is _Category && shelf.name == name,+ tooltip: name,+ selected: selectedCategory == name,+ trailingAlwaysVisible: true,+ trailingWidth: 22,+ trailing: textScale > 1.2+ ? null+ : Text(+ '${counts[name]}',+ style: TextStyle(+ fontSize: 11,+ color: grid.AppPalette.textFaint,+ ),+ ),onTap: () => onSelect(_Category(name)),),],@@ -544,11 +713,13 @@ IconData _categoryIcon(String category) => switch (category) {_ => LucideIcons.shapes300,};-// The searchable catalog, categories and curated collections use the same-// rows. Discover alone has the editorial front page.+// Search and the complete index stay compact; disciplines and collections+// invite exploration through larger previews.class _Shelf$View extends StatelessWidget {const _Shelf$View({required this.shelf,+ required this.categories,+ required this.onCategory,required this.entries,required this.store,required this.installedOn,@@ -558,6 +729,8 @@ class _Shelf$View extends StatelessWidget {});final _Listed shelf;+ final List<String> categories;+ final ValueChanged<String> onCategory;final List<DshEntry> entries;final StoreController store;final List<MachineState> Function(String id) installedOn;@@ -568,77 +741,103 @@ class _Shelf$View extends StatelessWidget {String get _title => switch (shelf) {_All() => 'All harnesses',_Search() => 'Search results',- _Collection(:final collection) => collection.title,_Category(:final name) => name,};String get _subtitle => switch (shelf) {_All() => 'Find something you have always wanted to make.',_Search() => '${entries.length} result${entries.length == 1 ? '' : 's'}',- _Collection(:final collection) => collection.subtitle,_Category() =>'${entries.length} harness${entries.length == 1 ? '' : 'es'} to explore.',};@override- Widget build(BuildContext context) => SingleChildScrollView(- key: ValueKey('store-catalog:$_title'),- padding: const EdgeInsets.fromLTRB(28, 28, 28, 48),- child: Align(- alignment: Alignment.topCenter,- child: ConstrainedBox(- constraints: const BoxConstraints(maxWidth: 1440),- child: Column(- crossAxisAlignment: CrossAxisAlignment.stretch,- children: [- Text(- _title,- style: TextStyle(- fontSize: 28,- fontWeight: FontWeight.w700,- letterSpacing: -.6,- color: grid.AppPalette.textPrimary,+ Widget build(BuildContext context) {+ if (shelf is _Category) {+ return StoreCategory(+ name: _title,+ categories: categories,+ onCategory: onCategory,+ entries: entries,+ loaded: loaded,+ ratingFor: (entry) => store.ratingOf(StoreController.keyFor(entry)),+ installed: (id) => installedOn(id).isNotEmpty,+ onOpen: onOpen,+ onAction: onAction,+ );+ }+ return SingleChildScrollView(+ key: ValueKey('store-catalog:$_title'),+ padding: const EdgeInsets.fromLTRB(28, 28, 28, 48),+ child: Align(+ alignment: Alignment.topCenter,+ child: ConstrainedBox(+ constraints: const BoxConstraints(maxWidth: 1440),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ children: [+ Text(+ _title,+ style: TextStyle(+ fontSize: 28,+ fontWeight: FontWeight.w700,+ letterSpacing: -.6,+ color: grid.AppPalette.textPrimary,+ ),),- ),- const SizedBox(height: 8),- Text(- _subtitle,- style: TextStyle(- fontSize: 13,- color: grid.AppPalette.textSecondary,+ const SizedBox(height: 8),+ Text(+ _subtitle,+ style: TextStyle(+ fontSize: 13,+ color: grid.AppPalette.textSecondary,+ ),),- ),- const SizedBox(height: 24),- if (entries.isEmpty)- Padding(- padding: const EdgeInsets.symmetric(vertical: 48),- child: Text(- shelf is _Search- ? 'No matching harnesses. Try a name or something you want to make.'- : loaded- ? 'Nothing here yet.'- : 'Asking this computer…',- style: TextStyle(- fontSize: 14,- height: 1.5,- color: grid.AppPalette.textSecondary,+ const SizedBox(height: 24),+ if (entries.isEmpty)+ Padding(+ padding: const EdgeInsets.symmetric(vertical: 48),+ child: Text(+ shelf is _Search+ ? 'No matching harnesses. Try a name or something you want to make.'+ : loaded+ ? 'Nothing here yet.'+ : 'Asking this computer…',+ style: TextStyle(+ fontSize: 14,+ height: 1.5,+ color: grid.AppPalette.textSecondary,+ ),),+ )+ else+ StoreListing(+ entries: entries,+ ratingFor: (entry) =>+ store.ratingOf(StoreController.keyFor(entry)),+ installed: (id) => installedOn(id).isNotEmpty,+ onOpen: onOpen,+ onAction: onAction,),- )- else- StoreListing(- entries: entries,- ratingFor: (entry) =>- store.ratingOf(StoreController.keyFor(entry)),- installed: (id) => installedOn(id).isNotEmpty,- onOpen: onOpen,- onAction: onAction,- ),- ],+ if (entries.isEmpty && shelf is _Search)+ Wrap(+ spacing: 8,+ runSpacing: 8,+ children: [+ for (final category in categories.take(6))+ ActionChip(+ key: ValueKey('store-search-explore:$category'),+ label: Text('Explore $category'),+ onPressed: () => onCategory(category),+ ),+ ],+ ),+ ],+ ),),),- ),- );+ );+ }}class _Stars extends StatelessWidget {@@ -706,11 +905,17 @@ Future<void> openStoreAgent(String machineId, {String? prompt,}) async {+ final navigator = Navigator.of(context);final origin = notifier.activeSwarmId;notifier.newSwarm(draft: true);final target = notifier.activeSwarmId;+ // Let the new tab mount and finish autofocus before the dialog claims focus.+ // Otherwise its search can take focus behind the dialog, swallowing Escape.+ // The Store subtree is disposed by this switch, so use the surviving navigator.+ await WidgetsBinding.instance.endOfFrame;+ if (!navigator.mounted) return;final result = await showNewAgentDialog(- context,+ navigator.context,notifier,machineId,source: 'store',@@ -735,13 +940,11 @@ class _ProductPage extends StatefulWidget {required this.entry,required this.notifier,required this.store,- required this.onBack,});final DshEntry entry;final AppNotifier notifier;final StoreController store;- final VoidCallback onBack;@overrideState<_ProductPage> createState() => _ProductPageState();@@ -923,18 +1126,6 @@ class _ProductPageState extends State<_ProductPage> {child: Column(crossAxisAlignment: CrossAxisAlignment.stretch,children: [- Align(- alignment: Alignment.centerLeft,- child: TextButton.icon(- key: const ValueKey('store-back'),- onPressed: widget.onBack,- icon: const Icon(LucideIcons.arrowLeft300, size: 15),- label: const Text('Back'),- style: TextButton.styleFrom(- foregroundColor: grid.AppPalette.textSecondary,- ),- ),- ),// The name in its own light: a soft glow of the harness's colour behind the hero.DecoratedBox(decoration: BoxDecoration(diff --git a/desktop/lib/store/store_search.dart b/desktop/lib/store/store_search.dartnew file mode 100644index 000000000..fff865df2--- /dev/null+++ b/desktop/lib/store/store_search.dart@@ -0,0 +1,203 @@+import 'package:flutter/material.dart';+import 'package:lucide_icons_flutter/lucide_icons.dart';++import '../shared/theme/app_theme.dart' as grid;+import '../shared/widgets/app_icon_button.dart';+import '../shortcuts/app_keymap.dart';++/// Search and orientation stay in view while the destination scrolls below.+class StoreSearch extends StatelessWidget {+ const StoreSearch({+ super.key,+ required this.controller,+ required this.focusNode,+ required this.onChanged,+ required this.autofocus,+ required this.onClear,+ required this.onBack,+ required this.onForward,+ required this.onDiscover,+ required this.location,+ this.category,+ this.onCategory,+ });++ final TextEditingController controller;+ final FocusNode focusNode;+ final ValueChanged<String> onChanged;+ final bool autofocus;+ final VoidCallback onClear;+ final VoidCallback? onBack;+ final VoidCallback? onForward;+ final VoidCallback onDiscover;+ final String location;+ final String? category;+ final VoidCallback? onCategory;++ @override+ Widget build(BuildContext context) => LayoutBuilder(+ builder: (context, box) {+ final padding = box.maxWidth < 680 ? 20.0 : 36.0;+ final border = OutlineInputBorder(+ borderRadius: BorderRadius.circular(16),+ borderSide: BorderSide(color: grid.AppPalette.divider),+ );+ final searchHint = effectiveCommandHint(context, 'terminal.find');+ return Container(+ key: const ValueKey('store-search-header'),+ color: grid.AppPalette.windowBg,+ padding: EdgeInsets.fromLTRB(padding, 18, padding, 4),+ child: Center(+ child: ConstrainedBox(+ constraints: const BoxConstraints(maxWidth: 1440),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ TextField(+ key: const ValueKey('store-search'),+ controller: controller,+ focusNode: focusNode,+ autofocus: autofocus,+ onChanged: onChanged,+ textInputAction: TextInputAction.search,+ style: TextStyle(+ fontSize: 16,+ color: grid.AppPalette.textPrimary,+ ),+ decoration: InputDecoration(+ hintText: 'Search harnesses, tools, or ideas…',+ hintStyle: TextStyle(+ fontSize: 16,+ color: grid.AppPalette.textSecondary,+ ),+ filled: true,+ fillColor: grid.AppSurface.recess,+ isDense: true,+ contentPadding: const EdgeInsets.symmetric(+ horizontal: 18,+ vertical: 18,+ ),+ border: border,+ enabledBorder: border,+ focusedBorder: border.copyWith(+ borderSide: BorderSide(+ color: grid.AppPalette.accentOnSurface,+ width: 1.5,+ ),+ ),+ prefixIcon: Icon(+ LucideIcons.search300,+ size: 22,+ color: grid.AppPalette.textSecondary,+ ),+ prefixIconConstraints: const BoxConstraints(minWidth: 56),+ suffixIcon: controller.text.isNotEmpty+ ? Padding(+ padding: const EdgeInsets.only(right: 12),+ child: AppIconButton(+ icon: LucideIcons.x300,+ tooltip: 'Clear search',+ onPressed: onClear,+ ),+ )+ : box.maxWidth > 650 && searchHint != null+ ? Padding(+ padding: const EdgeInsets.only(right: 18),+ child: Center(+ widthFactor: 1,+ child: Text(+ searchHint,+ style: TextStyle(+ fontSize: 12,+ color: grid.AppPalette.textFaint,+ ),+ ),+ ),+ )+ : null,+ ),+ ),+ const SizedBox(height: 8),+ Row(+ children: [+ TextButton.icon(+ key: const ValueKey('store-back'),+ onPressed: onBack,+ icon: const Icon(LucideIcons.arrowLeft300, size: 16),+ label: const Text('Back'),+ style: TextButton.styleFrom(+ foregroundColor: grid.AppPalette.textSecondary,+ padding: const EdgeInsets.symmetric(horizontal: 8),+ minimumSize: const Size(0, 34),+ ),+ ),+ AppIconButton(+ key: const ValueKey('store-nav-forward'),+ icon: LucideIcons.arrowRight300,+ tooltip: 'Forward',+ onPressed: onForward,+ size: 16,+ ),+ Container(+ height: 16,+ width: 1,+ margin: const EdgeInsets.symmetric(horizontal: 12),+ color: grid.AppPalette.divider,+ ),+ if (location != 'Discover') ...[+ TextButton(+ key: const ValueKey('store-breadcrumb-discover'),+ onPressed: onDiscover,+ style: TextButton.styleFrom(+ foregroundColor: grid.AppPalette.textSecondary,+ padding: const EdgeInsets.symmetric(horizontal: 4),+ minimumSize: const Size(0, 34),+ ),+ child: const Text('Discover'),+ ),+ Icon(+ LucideIcons.chevronRight300,+ size: 13,+ color: grid.AppPalette.textFaint,+ ),+ ],+ if (category != null && box.maxWidth > 650) ...[+ TextButton(+ key: const ValueKey('store-breadcrumb-category'),+ onPressed: onCategory,+ style: TextButton.styleFrom(+ foregroundColor: grid.AppPalette.textSecondary,+ padding: const EdgeInsets.symmetric(horizontal: 4),+ minimumSize: const Size(0, 34),+ ),+ child: Text(category!),+ ),+ Icon(+ LucideIcons.chevronRight300,+ size: 13,+ color: grid.AppPalette.textFaint,+ ),+ ],+ const SizedBox(width: 6),+ Expanded(+ child: Text(+ location,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ fontSize: 12,+ fontWeight: FontWeight.w600,+ color: grid.AppPalette.textPrimary,+ ),+ ),+ ),+ ],+ ),+ ],+ ),+ ),+ ),+ );+ },+ );+}diff --git a/desktop/pubspec.yaml b/desktop/pubspec.yamlindex b5769974d..aff4faad8 100644--- a/desktop/pubspec.yaml+++ b/desktop/pubspec.yaml@@ -107,6 +107,7 @@ flutter:assets:- assets/engine-icons/- assets/store/+ - assets/store/projects/# The real app icon, shown in Settings ▸ About. Copied from the macOS# icon set (`macos/Runner/Assets.xcassets/AppIcon.appiconset`) rather than# loaded from the bundle: Flutter can't read an .icns, and About should showdiff --git a/desktop/test/store_discover_test.dart b/desktop/test/store_discover_test.dartindex 99514b5d0..804320b48 100644--- a/desktop/test/store_discover_test.dart+++ b/desktop/test/store_discover_test.dart@@ -12,11 +12,15 @@ import 'package:harness/core/config.dart';import 'package:harness/core/engine_availability.dart';import 'package:harness/core/models.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;+import 'package:harness/shared/layouts/widgets/sidebar_item.dart';+import 'package:harness/shortcuts/app_keymap.dart';+import 'package:harness/shortcuts/keymap_host.dart';import 'package:harness/widgets/agent_picker.dart';import 'package:harness/widgets/engine_identity.dart';import 'package:harness/state/app_state.dart';import 'package:harness/store/store_controller.dart';import 'package:harness/store/store_editorial.dart';+import 'package:harness/store/store_exploration.dart';import 'package:harness/store/store_models.dart';import 'package:harness/store/store_screen.dart';@@ -159,6 +163,8 @@ Future<(_App, GlobalKey)> _open(]);app.machineStates['local'] = local;app.openStore();+ final keymap = AppKeymap();+ addTearDown(keymap.dispose);final key = GlobalKey();await tester.pumpWidget(RepaintBoundary(@@ -172,10 +178,18 @@ Future<(_App, GlobalKey)> _open(child: child!,),home: Scaffold(- body: StoreTab(- notifier: app,- api: _Api(unavailable: unavailable),- initialHarness: initialHarness,+ body: KeymapProvider(+ keymap: keymap,+ child: KeymapHost(+ keymap: keymap,+ actions: const {},+ enabled: () => true,+ child: StoreTab(+ notifier: app,+ api: _Api(unavailable: unavailable),+ initialHarness: initialHarness,+ ),+ ),),),),@@ -193,12 +207,11 @@ Future<(_App, GlobalKey)> _open(}) {await precacheImage(AssetImage(asset), context);}- for (final asset in [- 'blender-studio.png',- 'copper-board.png',- 'phaser-bricks.png',- ]) {- await precacheImage(AssetImage('assets/store/$asset'), context);+ for (final asset in {+ ...storeProjectAssets.values,+ 'assets/store/blender-studio.png',+ }) {+ await precacheImage(AssetImage(asset), context);}});await tester.pumpAndSettle();@@ -208,6 +221,19 @@ Future<(_App, GlobalKey)> _open(Future<void> _capture(WidgetTester tester, GlobalKey key, String name) async {final output = Platform.environment['HARNESS_STORE_CAPTURE_DIR'];if (output == null) return;+ // Categories can decode new artwork after the initial Store frame. Wait for+ // those image providers as well before capturing, outside the fake test clock.+ final context = key.currentContext!;+ final images = tester+ .widgetList<Image>(find.byType(Image))+ .map((image) => image.image)+ .toSet();+ await tester.runAsync(() async {+ for (final provider in images) {+ await precacheImage(provider, context, onError: (_, _) {});+ }+ });+ await tester.pumpAndSettle();await tester.runAsync(() async {final image =await (key.currentContext!.findRenderObject()! as RenderRepaintBoundary)@@ -221,7 +247,7 @@ Future<void> _capture(WidgetTester tester, GlobalKey key, String name) async {void main() {test(- 'every listed harness has a browsing category and a discovery collection',+ 'every listed harness has a browsing category and a discipline invitation',() {final entries = _listedCatalog();expect(entries, isNotEmpty);@@ -232,7 +258,7 @@ void main() {reason: '${entry.id}: ${entry.category}',);expect(- storeCollections.where((collection) => collection.includes(entry)),+ storeDiscipline(storeCategoryFor(entry)).headline,isNotEmpty,reason: '${entry.id} must be discoverable beyond search',);@@ -293,6 +319,269 @@ void main() {.load();});+ testWidgets(+ 'search is ready on arrival and stays at the top while browsing',+ (tester) async {+ final (_, key) = await _open(tester);+ final search = find.byKey(const ValueKey('store-search'));+ final field = tester.widget<TextField>(search);+ expect(field.focusNode!.hasFocus, isTrue);+ final initialRect = tester.getRect(search);+ expect(initialRect.width, greaterThan(1000));+ await tester.drag(+ find.byKey(const PageStorageKey('store-discover-scroll')),+ const Offset(0, -700),+ );+ await tester.pumpAndSettle();+ expect(tester.getRect(search), initialRect);+ await _capture(tester, key, 'discover-exploration');++ await tester.tap(+ find.byKey(const ValueKey('store-shelf-category:Engineering')),+ );+ await tester.pumpAndSettle();+ expect(tester.getRect(search), initialRect);+ await tester.drag(+ find.byKey(const ValueKey('store-catalog:Engineering')),+ const Offset(0, -550),+ );+ await tester.pumpAndSettle();+ expect(tester.getRect(search), initialRect);+ await tester.enterText(search, 'mounting holes');+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-card:autonomous/text-to-cad')),+ findsOneWidget,+ );+ expect(+ find.byKey(const ValueKey('store-card:autonomous/copper')),+ findsNothing,+ );+ expect(tester.getRect(search), initialRect);+ await tester.tap(find.byTooltip('Clear search'));+ await tester.pumpAndSettle();+ expect(find.byKey(const ValueKey('store-category-hero')), findsOneWidget);+ expect(tester.widget<TextField>(search).focusNode!.hasFocus, isTrue);+ expect(tester.takeException(), isNull);+ },+ );++ test('search finds ideas in published examples as well as names', () {+ const entry = DshEntry(+ id: 'community/plotter',+ name: 'Plotter',+ engine: 'codex',+ tagline: 'Turn observations into pictures.',+ examples: [+ StoreExample(prompt: 'Visualize rainfall over the last decade.'),+ ],+ );+ expect(storeMatches(entry, 'rainfall decade'), isTrue);+ expect(storeMatches(entry, 'observations'), isTrue);+ expect(storeMatches(entry, 'rainfall circuit'), isFalse);+ });++ test('search puts a requested tool before mentions in another tool', () {+ const entries = [+ DshEntry(+ id: 'a',+ name: 'Animator',+ engine: 'codex',+ description: 'Use Blender scenes.',+ ),+ DshEntry(id: 'b', name: 'Blender', engine: 'codex'),+ DshEntry(id: 'c', name: 'Blender Helper', engine: 'codex'),+ DshEntry(id: 'd', name: 'Unrelated', engine: 'codex'),+ ];+ expect(storeSearch(entries, ' BLENDER ').map((e) => e.id), ['b', 'c', 'a']);+ expect(storeSearch(entries, 'nothing'), isEmpty);+ });++ testWidgets('an empty search offers a way into a discipline', (tester) async {+ await _open(tester);+ final search = find.byKey(const ValueKey('store-search'));+ await tester.enterText(search, 'unfindabletool');+ await tester.pumpAndSettle();+ await tester.tap(find.byKey(const ValueKey('store-search-explore:Design')));+ await tester.pumpAndSettle();+ expect(find.byKey(const ValueKey('store-catalog:Design')), findsOneWidget);+ expect(tester.widget<TextField>(search).controller!.text, isEmpty);+ expect(+ tester+ .widget<SidebarItem>(+ find.byKey(const ValueKey('store-shelf-category:Design')),+ )+ .selected,+ isTrue,+ );+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(tester.widget<TextField>(search).controller!.text, 'unfindabletool');+ });++ testWidgets(+ 'category navigation highlights the rail and restores scroll through back and forward',+ (tester) async {+ await _open(tester, height: 850);+ final discover = find.byKey(+ const PageStorageKey('store-discover-scroll'),+ );+ final categoryCard = find.byKey(+ const ValueKey('store-category:Engineering'),+ );+ await tester.ensureVisible(categoryCard);+ await tester.pumpAndSettle();+ final homeY = tester.getTopLeft(categoryCard).dy;+ await tester.tap(categoryCard);+ await tester.pumpAndSettle();+ final nav = find.byKey(+ const ValueKey('store-shelf-category:Engineering'),+ );+ expect(tester.widget<SidebarItem>(nav).selected, isTrue);+ final harness = find.byKey(+ const ValueKey('store-card:autonomous/copper'),+ );+ await tester.ensureVisible(harness);+ await tester.pumpAndSettle();+ final categoryY = tester.getTopLeft(harness).dy;+ await tester.tap(harness);+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-page:autonomous/copper')),+ findsOneWidget,+ );+ expect(tester.widget<SidebarItem>(nav).selected, isTrue);+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(tester.getTopLeft(harness).dy, closeTo(categoryY, 1));+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(discover, findsOneWidget);+ expect(tester.getTopLeft(categoryCard).dy, closeTo(homeY, 1));+ await tester.tap(find.byKey(const ValueKey('store-nav-forward')));+ await tester.pumpAndSettle();+ expect(tester.widget<SidebarItem>(nav).selected, isTrue);+ expect(tester.getTopLeft(harness).dy, closeTo(categoryY, 1));+ expect(tester.takeException(), isNull);+ },+ );++ testWidgets(+ 'search history is one stop and clearing returns to the originating category',+ (tester) async {+ await _open(tester);+ await tester.tap(+ find.byKey(const ValueKey('store-shelf-category:Engineering')),+ );+ await tester.pumpAndSettle();+ final search = find.byKey(const ValueKey('store-search'));+ for (final query in ['cop', 'copp', 'copper']) {+ await tester.enterText(search, query);+ await tester.pumpAndSettle();+ }+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-catalog:Engineering')),+ findsOneWidget,+ );+ expect(tester.widget<TextField>(search).controller!.text, isEmpty);+ await tester.tap(find.byKey(const ValueKey('store-nav-forward')));+ await tester.pumpAndSettle();+ expect(tester.widget<TextField>(search).controller!.text, 'copper');+ await tester.tap(+ find.byKey(const ValueKey('store-card:autonomous/copper')),+ );+ await tester.pumpAndSettle();+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(tester.widget<TextField>(search).controller!.text, 'copper');+ await tester.tap(find.byTooltip('Clear search'));+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-catalog:Engineering')),+ findsOneWidget,+ );+ expect(tester.widget<TextField>(search).focusNode!.hasFocus, isTrue);+ },+ );++ testWidgets('installed filter survives opening a harness and returning', (+ tester,+ ) async {+ await _open(tester);+ await tester.tap(find.byKey(const ValueKey('store-shelf-category:Design')));+ await tester.pumpAndSettle();+ final filter = find.byKey(const ValueKey('store-filter-installed'));+ await tester.ensureVisible(filter);+ await tester.tap(filter);+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-card:autonomous/text-to-cad')),+ findsNothing,+ );+ final blender = find.byKey(const ValueKey('store-card:autonomous/blender'));+ await tester.ensureVisible(blender);+ await tester.tap(blender);+ await tester.pumpAndSettle();+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(tester.widget<ChoiceChip>(filter).selected, isTrue);+ expect(+ find.byKey(const ValueKey('store-card:autonomous/text-to-cad')),+ findsNothing,+ );+ await tester.ensureVisible(find.byKey(const ValueKey('store-filter-all')));+ await tester.tap(find.byKey(const ValueKey('store-filter-all')));+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-card:autonomous/text-to-cad')),+ findsOneWidget,+ );+ });++ testWidgets(+ 'the existing Find command focuses Store search instead of a terminal',+ (tester) async {+ await _open(tester);+ await tester.tap(+ find.byKey(const ValueKey('store-shelf-category:Design')),+ );+ await tester.pumpAndSettle();+ await tester.tap(find.byKey(const ValueKey('store-category-feature')));+ await tester.pumpAndSettle();+ await tester.sendKeyDownEvent(LogicalKeyboardKey.metaLeft);+ await tester.sendKeyEvent(LogicalKeyboardKey.bracketLeft);+ await tester.sendKeyUpEvent(LogicalKeyboardKey.metaLeft);+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-catalog:Design')),+ findsOneWidget,+ );+ await tester.sendKeyDownEvent(LogicalKeyboardKey.metaLeft);+ await tester.sendKeyEvent(LogicalKeyboardKey.bracketRight);+ await tester.sendKeyUpEvent(LogicalKeyboardKey.metaLeft);+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-page:autonomous/blender')),+ findsOneWidget,+ );+ // Mouse navigation must keep keyboard commands inside the Store.+ await tester.sendKeyDownEvent(LogicalKeyboardKey.metaLeft);+ await tester.sendKeyEvent(LogicalKeyboardKey.keyF);+ await tester.sendKeyUpEvent(LogicalKeyboardKey.metaLeft);+ await tester.pumpAndSettle();+ expect(+ tester+ .widget<TextField>(find.byKey(const ValueKey('store-search')))+ .focusNode!+ .hasFocus,+ isTrue,+ );+ expect(tester.takeException(), isNull);+ },+ );+for (final (width, height, scale, brightness) in [(1440.0, 1080.0, 1.0, Brightness.dark),(1440.0, 1080.0, 1.0, Brightness.light),@@ -319,16 +608,14 @@ void main() {findsNothing,);expect(find.byKey(const ValueKey('store-nav-categories')), findsNothing);- expect(find.byKey(const ValueKey('store-shelf-all')), findsNothing);+ expect(find.byKey(const ValueKey('store-shelf-all')), findsOneWidget);expect(find.byKey(const ValueKey('store-shelf-installed')), findsNothing);expect(find.text('Harness Store'), findsNothing);expect(tester.getTopLeft(find.byKey(const ValueKey('store-card:codex'))).dy,lessThan(tester- .getTopLeft(- find.byKey(const ValueKey('store-feature:autonomous/blender')),- )+ .getTopLeft(find.byKey(const ValueKey('store-category:Design'))).dy,),reason: 'Coding is the starting point before the other disciplines',@@ -370,6 +657,17 @@ void main() {key,'discover-${width.toInt()}-${brightness.name}-${scale.toStringAsFixed(1)}',);+ await tester.tap(+ find.byKey(const ValueKey('store-shelf-category:Engineering')),+ );+ await tester.pumpAndSettle();+ expect(find.byKey(const ValueKey('store-category-hero')), findsOneWidget);+ expect(tester.takeException(), isNull);+ await _capture(+ tester,+ key,+ 'engineering-${width.toInt()}-${brightness.name}-${scale.toStringAsFixed(1)}',+ );await tester.tap(find.byKey(const ValueKey('store-viewers-button')));await tester.pumpAndSettle();expect(find.byKey(const ValueKey('store-viewers')), findsOneWidget);@@ -409,7 +707,7 @@ void main() {reason: '$category must show its actual catalog entries',);expect(tester.takeException(), isNull);- if (category == 'Research' || category == 'Music') {+ if (['Research', 'Music', 'Engineering', 'Design'].contains(category)) {await _capture(tester, key, 'category-${category.toLowerCase()}');}}@@ -417,7 +715,7 @@ void main() {);testWidgets(- 'categories group domains, collections open and search finds capabilities',+ 'discovery cards open the same category as the sidebar and search finds ideas',(tester) async {await _open(tester);await tester.tap(@@ -438,7 +736,12 @@ void main() {);await tester.tap(find.byKey(const ValueKey('store-shelf-discover')));await tester.pumpAndSettle();- await tester.tap(find.byKey(const ValueKey('store-collection:hardware')));+ await tester.ensureVisible(+ find.byKey(const ValueKey('store-category:Engineering')),+ );+ await tester.tap(+ find.byKey(const ValueKey('store-category:Engineering')),+ );await tester.pumpAndSettle();expect(find.byKey(const ValueKey('store-card:autonomous/copper')),@@ -472,7 +775,7 @@ void main() {await tester.tap(find.byTooltip('Clear search'));await tester.pumpAndSettle();expect(- find.byKey(const ValueKey('store-feature:autonomous/blender')),+ find.byKey(const ValueKey('store-catalog:Engineering')),findsOneWidget,);},@@ -498,7 +801,9 @@ void main() {),);final (_, key) = await _open(tester);- await tester.tap(find.text('Explore').first);+ await tester.tap(+ find.byKey(const ValueKey('store-feature:autonomous/blender')),+ );await tester.pumpAndSettle();expect(find.byKey(const ValueKey('store-page:autonomous/blender')),@@ -516,12 +821,61 @@ void main() {expect(find.text('Prompt copied'), findsOneWidget);});+ testWidgets(+ 'a project card copies its full prompt without opening the page',+ (tester) async {+ String? copied;+ tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(+ SystemChannels.platform,+ (call) async {+ if (call.method == 'Clipboard.setData') {+ copied = (call.arguments as Map)['text'] as String;+ }+ return null;+ },+ );+ addTearDown(+ () => tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(+ SystemChannels.platform,+ null,+ ),+ );+ final (_, key) = await _open(tester);+ await tester.tap(+ find.byKey(const ValueKey('store-shelf-category:Design')),+ );+ await tester.pumpAndSettle();+ final copy = find.byKey(+ const ValueKey('store-copy-idea:autonomous/blender'),+ );+ await tester.ensureVisible(copy);+ await tester.pumpAndSettle();+ await _capture(tester, key, 'project-prompts');+ await tester.tap(copy);+ await tester.pumpAndSettle();+ expect(+ copied,+ storeProjectPrompt(+ _catalog.firstWhere((e) => e.id == 'autonomous/blender'),+ ),+ );+ expect(copied, contains('armchair'));+ expect(+ find.byKey(const ValueKey('store-page:autonomous/blender')),+ findsNothing,+ );+ expect(find.text('Prompt copied'), findsOneWidget);+ },+ );+testWidgets('unavailable reviews do not become a release notice in discovery or detail',(tester) async {await _open(tester, unavailable: true);expect(find.textContaining('not available'), findsNothing);- await tester.tap(find.text('Explore').first);+ await tester.tap(+ find.byKey(const ValueKey('store-feature:autonomous/blender')),+ );await tester.pumpAndSettle();expect(find.text('Ratings and reviews'), findsNothing);expect(find.text('No ratings yet'), findsNothing);@@ -539,10 +893,10 @@ void main() {findsNothing,);expect(- find.byKey(const ValueKey('store-collection:hardware')),+ find.byKey(const ValueKey('store-category:Engineering')),findsNothing,);- expect(find.text('Coding'), findsNWidgets(2));+ expect(find.text('Your starting point: code.'), findsOneWidget);expect(find.byKey(const ValueKey('store-card:codex')), findsOneWidget);});@@ -555,6 +909,9 @@ void main() {);await tester.pumpAndSettle();final count = app.swarms.length;+ await tester.ensureVisible(+ find.byKey(const ValueKey('store-action:autonomous/blender')),+ );await tester.tap(find.byKey(const ValueKey('store-action:autonomous/blender')),);diff --git a/desktop/test/store_page_test.dart b/desktop/test/store_page_test.dartindex 8c9d5c52f..71587ffa1 100644--- a/desktop/test/store_page_test.dart+++ b/desktop/test/store_page_test.dart@@ -1100,10 +1100,13 @@ void main() {group('shelves', () {testWidgets(- 'See all lists every harness, and the engines See all is Code',+ 'Browse all lists every harness, and All coding agents opens Coding',(tester) async {await _open(tester);- await tester.tap(find.widgetWithText(TextButton, 'See all').first);+ await tester.ensureVisible(+ find.widgetWithText(TextButton, 'Browse all'),+ );+ await tester.tap(find.widgetWithText(TextButton, 'Browse all'));await tester.pumpAndSettle();expect(_key('store-catalog:All harnesses'), findsOneWidget);expect(@@ -1115,11 +1118,17 @@ void main() {await tester.tap(_key('store-shelf-discover'));await tester.pumpAndSettle();- await tester.tap(find.widgetWithText(TextButton, 'See all').last);+ await tester.ensureVisible(+ find.widgetWithText(TextButton, 'All coding agents'),+ );+ await tester.tap(find.widgetWithText(TextButton, 'All coding agents'));await tester.pumpAndSettle();- expect(_key('store-catalog:Code'), findsOneWidget);+ expect(_key('store-catalog:Coding'), findsOneWidget);expect(_key('store-card:autonomous/marp'), findsNothing);- expect(find.textContaining('harnesses to explore.'), findsOneWidget);+ expect(+ find.textContaining('coding agents to explore.'),+ findsOneWidget,+ );},);@@ -1148,7 +1157,7 @@ void main() {expect(find.text('1 harness to explore.'), findsOneWidget);expect(_key('store-card:someone/loom'), findsOneWidget);- await tester.tap(_key('store-shelf-category:Media'));+ await tester.tap(_key('store-shelf-category:Productivity'));await tester.pumpAndSettle();// The machine answers again without Typst while the shelf is open.app.machineStates['machine-1']!.dsh.replace(const []);@@ -1158,7 +1167,8 @@ void main() {// And with no machine left to ask, it is still asking.app.machineStates.clear();app.changed();- await tester.pumpAndSettle();+ // The loading skeleton keeps animating until the local catalog arrives.+ await tester.pump(const Duration(milliseconds: 200));expect(find.text('Asking this computer…'), findsOneWidget);},);@@ -1227,7 +1237,7 @@ void main() {);},);- await tester.tap(_key('store-shelf-category:Media'));+ await tester.tap(_key('store-shelf-category:Productivity'));await tester.pumpAndSettle();final tabs = app.swarms.length;@@ -1235,6 +1245,7 @@ void main() {_in('store-action:autonomous/typst', find.text('Get')),findsOneWidget,);+ await tester.ensureVisible(_key('store-action:autonomous/typst'));await tester.tap(_key('store-action:autonomous/typst'));await tester.pumpAndSettle();expect(_key('store-page:autonomous/typst'), findsOneWidget);@@ -1261,6 +1272,7 @@ void main() {_in('store-action:autonomous/typst', find.text('Open')),findsOneWidget,);+ await tester.ensureVisible(_key('store-action:autonomous/typst'));await tester.tap(_key('store-action:autonomous/typst'));await tester.pumpAndSettle();expect(@@ -1278,8 +1290,8 @@ void main() {});for (final (id, name, category) in [- ('autonomous/marp', 'Marp', 'Media'),- ('claude', 'Claude Code', 'Code'),+ ('autonomous/marp', 'Marp', 'Productivity'),+ ('claude', 'Claude Code', 'Coding'),]) {testWidgets('$name uses local installation state in every store listing',diff --git a/desktop/test/store_screen_test.dart b/desktop/test/store_screen_test.dartindex a0f23839b..27126b9ae 100644--- a/desktop/test/store_screen_test.dart+++ b/desktop/test/store_screen_test.dart@@ -394,6 +394,34 @@ void main() {.text,'typ',);+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(+ find.byKey(const ValueKey('store-page:autonomous/typst')),+ findsNothing,+ );+ expect(+ tester+ .widget<TextField>(find.byKey(const ValueKey('store-search')))+ .controller!+ .text,+ 'typ',+ );+ await tester.tap(find.byKey(const ValueKey('store-back')));+ await tester.pumpAndSettle();+ expect(+ find.byKey(const PageStorageKey('store-discover-scroll')),+ findsOneWidget,+ );+ await tester.tap(find.byKey(const ValueKey('store-nav-forward')));+ await tester.pumpAndSettle();+ expect(+ tester+ .widget<TextField>(find.byKey(const ValueKey('store-search')))+ .controller!+ .text,+ 'typ',+ );expect(tester.takeException(), isNull);},);diff --git a/desktop/test/store_viewers_test.dart b/desktop/test/store_viewers_test.dartindex 0a4732ad6..22246beed 100644--- a/desktop/test/store_viewers_test.dart+++ b/desktop/test/store_viewers_test.dart@@ -1,11 +1,11 @@// The store's quieter surfaces, as widgets on their own: the Viewers page// (shared previews and the agents that use them), a listing row for a viewer-// package, and a Discover collection whose harnesses have no artwork.+// package, and a Discover category whose harnesses have no artwork.import 'package:flutter/material.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness/core/dsh_catalog.dart';import 'package:harness/store/store_discover.dart';-import 'package:harness/store/store_editorial.dart';+import 'package:harness/store/store_listing.dart';import 'package:harness/store/store_models.dart';import 'package:harness/store/store_viewers.dart';import 'package:harness/widgets/engine_identity.dart';@@ -168,12 +168,12 @@ void main() {});testWidgets(- 'a collection whose harnesses have no artwork wears the first one\'s mark',+ 'a category whose harnesses have no artwork wears the first one\'s mark',(tester) async {tester.view.devicePixelRatio = 1;tester.view.physicalSize = const Size(1200, 1400);addTearDown(tester.view.reset);- StoreCollection? picked;+ String? picked;await _show(tester,StoreDiscover(@@ -190,31 +190,33 @@ void main() {installed: (_) => false,onOpen: (_) {},onAction: (_) {},- onCollection: (collection) => picked = collection,+ onCategory: (category) => picked = category,onAll: () {},onEngines: () {},),);- final play = find.byKey(const ValueKey('store-collection:play'));+ final play = find.byKey(const ValueKey('store-category:Music'));expect(play, findsOneWidget);expect(find.descendant(of: play, matching: find.byType(EngineMark)),- findsOneWidget,+ findsNWidgets(2),);expect(tester.widget<EngineMark>(- find.descendant(of: play, matching: find.byType(EngineMark)),+ find+ .descendant(of: play, matching: find.byType(EngineMark))+ .first,).engine,'autonomous/strudel',);expect(- find.descendant(of: play, matching: find.text('1 harness to explore')),+ find.descendant(of: play, matching: find.text('1 harness')),findsOneWidget,);await tester.tap(play);- expect(picked?.id, 'play');+ expect(picked, 'Music');},);}