Skip to content

feat(ui): add configurable secondary color settings - #116

Merged
timcogan merged 1 commit into
masterfrom
feat/configurable-secondary-color
Aug 21, 2026
Merged

feat(ui): add configurable secondary color settings#116
timcogan merged 1 commit into
masterfrom
feat/configurable-secondary-color

Conversation

@timcogan

@timcogan timcogan commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a Settings panel for configuring visible metadata fields and the secondary overlay color.
    • Desktop applications save these preferences; browser sessions retain them temporarily.
    • Added reset-to-default support and validation for color settings.
    • Applied the selected color consistently to measurements, history and selection indicators, GSPS/SR graphics, and labels.
  • Bug Fixes

    • Improved metadata popup positioning and visual-state handling.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 845e57bc-3074-4089-ab62-58f621ea2ad0

📥 Commits

Reviewing files that changed from the base of the PR and between d1401a7 and 6a88e2b.

📒 Files selected for processing (5)
  • DESIGN.md
  • src/app.rs
  • src/app/history.rs
  • src/app/measurement.rs
  • src/app/metadata.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The application now stores a configurable secondary color with metadata settings, provides a Settings popup with reset support, and applies the color to measurements, history highlights, mammography borders, GSPS graphics, and SR graphics and labels. Desktop settings persist; browser settings last for the current session.

Changes

Secondary color settings and rendering

Layer / File(s) Summary
Unified settings contract and persistence
DESIGN.md, src/app.rs
Settings now include a validated secondary color and visible metadata fields. Loading, serialization, defaults, fallback behavior, and round-trip tests cover the unified settings format.
Settings popup and application wiring
src/app.rs, src/app/metadata.rs
The titlebar opens a centered Settings popup. The popup edits or resets the secondary color. Metadata changes use unified settings persistence.
Secondary color rendering propagation
src/app.rs, src/app/history.rs, src/app/measurement.rs
Measurements, history highlights, mammography borders, GSPS graphics, and SR graphics and labels now use the configured secondary color.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6a88e

This UI configuration change has no supplied evidence of a correctness, security, availability, or deployment risk at the current head; no actionable merge-blocking risk remains beyond completing the normal Rust checks.

Sequence Diagram(s)

sequenceDiagram
  participant DicomViewerApp
  participant Titlebar
  participant SettingsPopup
  participant settings.toml
  Titlebar->>DicomViewerApp: open Settings
  DicomViewerApp->>SettingsPopup: render current settings
  SettingsPopup->>DicomViewerApp: edit or reset secondary color
  DicomViewerApp->>settings.toml: save unified settings
  DicomViewerApp->>DicomViewerApp: apply color to overlays and indicators
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided, so the required summary, testing details, screenshots, and checklist are missing. Add a description with the required Summary, Testing, Screenshots, and Checklist sections, including test results and sanitized screenshots for the visible UI changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 19.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 4 files. (1 skipped: 1 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: configurable secondary color settings for the UI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/configurable-secondary-color

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@timcogan
timcogan merged commit fcdafc2 into master Aug 21, 2026
11 checks passed
@timcogan
timcogan deleted the feat/configurable-secondary-color branch August 21, 2026 21:54
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