Skip to content

Add time display picker to Dashboard and Lite toolbars#646

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/time-display-picker
Mar 20, 2026
Merged

Add time display picker to Dashboard and Lite toolbars#646
erikdarlingdata merged 1 commit intodevfrom
feature/time-display-picker

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

@erikdarlingdata erikdarlingdata commented Mar 20, 2026

Summary

  • Times picker on both Dashboard and Lite global toolbars: Server Time, Local Time, UTC
  • All timestamp columns across all grids update instantly when switching modes
  • Dashboard persists the preference via UserPreferencesService
  • Uses existing ServerTimeConverter + ServerTimeHelper.CurrentDisplayMode — no new converters needed

Test plan

  • Dashboard builds: 0 errors
  • Lite builds: 0 errors
  • Picker syncs with Settings window preference on load
  • Switching modes refreshes all grid timestamps without re-querying

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a timestamp display mode selector allowing users to choose how times are displayed: Server Time, Local Time, or UTC.
    • User preference is automatically saved and persists across sessions.

Both apps now have a "Times: [Server Time | Local Time | UTC]" ComboBox
on the global toolbar. Changing the mode:
- Updates ServerTimeHelper.CurrentDisplayMode
- Refreshes all DataGrid timestamp columns via Items.Refresh()
- Dashboard persists the preference via UserPreferencesService

The existing ServerTimeConverter already reads CurrentDisplayMode, so
all timestamp columns update instantly without re-querying.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 1756c62 into dev Mar 20, 2026
3 of 4 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4719d473-a546-4404-8f32-5ca507b8d83b

📥 Commits

Reviewing files that changed from the base of the PR and between 85201a6 and d9e2c9e.

📒 Files selected for processing (5)
  • Dashboard/Controls/QueryPerformanceContent.xaml.cs
  • Dashboard/ServerTab.xaml
  • Dashboard/ServerTab.xaml.cs
  • Lite/Controls/ServerTab.xaml
  • Lite/Controls/ServerTab.xaml.cs

📝 Walkthrough

Walkthrough

The PR adds time-display mode selection controls and event handlers to both Dashboard and Lite variants, enabling users to switch between Server Time, Local Time, and UTC display formats. A new refresh method triggers DataGrid binding updates to force timestamp converter re-evaluation after mode changes.

Changes

Cohort / File(s) Summary
Dashboard QueryPerformance Refresh
Dashboard/Controls/QueryPerformanceContent.xaml.cs
Added RefreshGridBindings() method to refresh bindings for 7 DataGrids (QueryStats, ProcStats, QueryStore, QueryStoreRegressions, ActiveQueries, CurrentActiveQueries, LongRunningQueryPatterns).
Dashboard Time Display Mode
Dashboard/ServerTab.xaml, Dashboard/ServerTab.xaml.cs
Added UI controls (ComboBox with Server Time/Local Time/UTC options) to ServerTab header toolbar; initialized selection based on ServerTimeHelper.CurrentDisplayMode; implemented TimeDisplayMode_SelectionChanged handler with mode mapping, preference persistence via _preferencesService, and DataGrid binding refresh via PerformanceTab.RefreshGridBindings().
Lite Time Display Mode
Lite/Controls/ServerTab.xaml, Lite/Controls/ServerTab.xaml.cs
Added matching time-display mode selector UI and handler logic to Lite variant; initializes selection and triggers .Items.Refresh() on multiple DataGrids (query, procedure, store, blocked, deadlock, running jobs, collection health, log) to re-evaluate timestamp formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/time-display-picker
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@erikdarlingdata erikdarlingdata deleted the feature/time-display-picker branch April 10, 2026 19:00
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