Skip to content

feat/phase-3-shell: NavigationView shell + read-only browse#6

Merged
StuartMeeks merged 2 commits into
masterfrom
feat/phase-3-shell
May 29, 2026
Merged

feat/phase-3-shell: NavigationView shell + read-only browse#6
StuartMeeks merged 2 commits into
masterfrom
feat/phase-3-shell

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Phase 3 of the build plan. Read-only browsing of the seeded data, no authoring yet.

What's in

  • ShellViewModel + supporting VMs (HomeViewModel, CliViewModel, SettingsViewModel, CliCardViewModel, SnipCardViewModel, CliChoice) — all in Snipdeck.Core/ViewModels/. Discipline preserved: zero WinUI types in Core.
  • Search is live, case-insensitive, scopes to the current view (Home filters CLI cards + most-used; CLI view filters that CLI's Snip list). Matches across title, command template, and tags.
  • Tag list in the pane body uses an "All" sentinel for filter-off — selecting it clears the tag predicate.
  • Identicons via Jdenticon-net seeded off Cli.Id. Deterministic.
  • MainWindow hosts the new ShellPage in its content row; Mica + custom title bar carry over from Phase 2.

Stub treatments (so the UI doesn't lie about what works)

  • Snip card Copy / Edit / Delete buttons are disabled with tooltips pointing at the phase that delivers them.
  • Settings page renders all rows for Phase 6 features (storage, backups, theme, hotkey, close behaviour) as disabled SettingsCards describing what they'll do. About is the last SettingsExpander and shows app name, version (from InformationalVersion until Phase 6 wires Nerdbank.GitVersioning), and copyright (from Directory.Build.props).
  • Theme still applied once at MainWindow ctor — live theme switching lands in Phase 6.

Tests

88 Core unit tests passing (up from 63). New coverage:

  • SnipFilterTests — search, tag, trash, combined AND filter, whitespace, ordering of distinct tags.
  • IdenticonServiceTests — PNG signature, determinism, distinct seeds, size validation.
  • ShellViewModelTests — initial state, CLI switching, tag rebuild, search re-filter, OpenSettings flow.
  • HomeViewModelTests — card sorting + count, search filtering, most-used ordering/exclusions, empty document.

Stacked PRs

Master is gated. This PR is the first of four stacked:

  • #thisfeat/phase-3-shellmaster
  • nextfeat/phase-4-authoringfeat/phase-3-shell
  • nextfeat/phase-5-platformfeat/phase-4-authoring
  • nextfeat/phase-6-releasefeat/phase-5-platform

After you merge this, the next PR's base will need updating to master and a rebase. Each subsequent merge does the same.

What CI doesn't verify (please eyeball on Windows)

  • NavigationView pane layout (search + switcher + tag list + Settings button)
  • CLI cards render with identicons; Snip cards show the disabled-action treatment correctly
  • Live search filters as you type
  • Selecting a CLI from the switcher swaps content; selecting a tag filters
  • Clicking Settings shows the stub page with About at the bottom

🤖 Generated with Claude Code

StuartMeeks and others added 2 commits May 29, 2026 17:04
Core view models in Snipdeck.Core/ViewModels/:
  - ShellViewModel owns the shell's cross-cutting state (CLI switcher choices,
    search text, selected tag with an "All" sentinel, current content VM).
  - HomeViewModel builds CLI cards and a most-used Snips list (top 6 by
    UsageCount, then LastUsedAt desc, hidden when nothing's been used).
  - CliViewModel exposes the filtered Snip list, favourites bubbled to the
    top.
  - SettingsViewModel stub backs the About expander.
  - CliCardViewModel, SnipCardViewModel, CliChoice support types.

Core services:
  - SnipFilter: pure case-insensitive search (title + template + tags) + tag
    filter + trash exclusion + DistinctTagsFor.
  - IdenticonService: Jdenticon-net seeded off Cli.Id so renaming a CLI
    doesn't change its icon.

App-side WinUI:
  - ShellPage hosts the NavigationView: pane header (AutoSuggestBox +
    CliChoice ComboBox), pane body tag list (sentinel "All" + per-CLI tags),
    pane footer Settings button, content area driven by a
    ShellContentTemplateSelector keyed on view-model type.
  - Identicon UserControl (DP-driven, lazy BitmapImage from PNG bytes).
  - CliCard (identicon + name + snip count).
  - SnipCard (title, monospace template preview, tag chips, favourite star,
    Copy/Edit/Delete buttons disabled with "Phase 4/5" tooltips).
  - Settings page stub via SettingsCard/SettingsExpander with About as the
    last expander; version falls back to assembly InformationalVersion until
    NBGV lands in Phase 6.
  - MainWindow now hosts the ShellPage in its content row.

Converters: BoolToVisibilityConverter, CountToVisibilityConverter.

Tests cover SnipFilter, IdenticonService, ShellViewModel state transitions,
HomeViewModel construction. 88 passing (up from 63).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rtial on WinRT-interface types

x:Bind in a DataTemplate resolves bindings via the bound DataContext instance,
so SettingsViewModel.AppName / TaglineDisplay can't be static — CS0176 in the
generated code. Switch them back to instance properties with a narrow
#pragma to silence CA1822 (they're cheap and only live while Settings is
open).

CsWinRT1028 wants types that implement WinRT interfaces (IValueConverter,
DataTemplateSelector) marked partial so its source generator can emit the
marshalling glue. Add 'partial' to BoolToVisibilityConverter,
CountToVisibilityConverter, and ShellContentTemplateSelector.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit c47c95a into master May 29, 2026
2 checks passed
@StuartMeeks StuartMeeks deleted the feat/phase-3-shell branch May 29, 2026 22:48
StuartMeeks added a commit that referenced this pull request May 29, 2026
feat/phase-4-authoring: authoring + parameter-fill flyout (stacked on #6)
@StuartMeeks StuartMeeks mentioned this pull request May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant