Skip to content

Add independent Pin to Dock feature and fix Save Logs to Desktop#153

Merged
michaeljolley merged 1 commit into
mainfrom
dev/mjolley/fix-dock-pinning-and-logs
Jul 8, 2026
Merged

Add independent Pin to Dock feature and fix Save Logs to Desktop#153
michaeljolley merged 1 commit into
mainfrom
dev/mjolley/fix-dock-pinning-and-logs

Conversation

@michaeljolley

Copy link
Copy Markdown
Contributor

Resolves the two problems reported in #142.

Problem 1: No "Pin to Dock" option on a location

Dock bands were driven by the Favorites list, and there was no dedicated pin action on a location. The "Pin to Dock" the reporter saw was Command Palette's generic pin of the top-level launcher, not a per-city pin.

Fix: Dock pinning is now its own feature, decoupled from Favorites:

  • New DockPinsManager store (own JSON file under LocalApplicationData\Microsoft.CmdPal), mirroring FavoritesManager.
  • New PinToDockCommand / UnpinFromDockCommand on every location, plus a "Docked" tag.
  • GetDockBands() now reads from the dock-pin store instead of favorites.
  • A one-time migration seeds dock pins from existing favorites so current users keep their dock content.
  • New resource strings added across all 15 locales.

Problem 2: "Save Logs to Desktop" silently did nothing

On Store/MSIX installs the logger wrote to a read-only program folder, so Directory.CreateDirectory threw (swallowed), no logs were ever created, and the zip step was skipped.

Fix:

  • RollingFileLogger writes to a writable LocalApplicationData\Microsoft.CmdPal\WeatherLogs path.
  • SaveLogsCommand always creates a zip (with a Desktop -> UserProfile fallback) and shows a confirmation toast.

Testing

  • Build succeeds.
  • Full test suite passes (317/317), including new DockPinsManagerTests.
  • Updated existing test callers for the new WeatherListPage constructor and refreshed the README.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Resolves the two problems reported in issue #142:

- Dock pinning is now its own feature, decoupled from Favorites. Adds a
  DockPinsManager store, Pin to Dock / Unpin from Dock commands on each
  location, a Docked tag, and repoints GetDockBands() at the dock-pin
  store. Existing favorites are migrated into dock pins once so current
  users keep their dock content.
- Save Logs to Desktop now works. RollingFileLogger writes to a writable
  LocalApplicationData path instead of the read-only install directory,
  and SaveLogsCommand always produces a zip and shows a confirmation toast.

Adds DockPinsManager tests, updates existing test callers and the README.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@michaeljolley michaeljolley merged commit 33e77c5 into main Jul 8, 2026
1 check passed
@michaeljolley michaeljolley deleted the dev/mjolley/fix-dock-pinning-and-logs branch July 8, 2026 02:06
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