A new kind of rule warning would light the icon and be said nowhere

Closed
#208 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #231 by @JWhite212 — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift
Domain
accessibility

Research direction

Read Sources/NotificationCore/RuleWarnings.swift and Sources/NotificationCore/OnCallCheck.swift at the stated branch point, then verify the listed pins and confirm the cited code has not changed. Replace the filters with exhaustive switches while preserving every current line and finding in order; the issue specifies unchanged existing tests and the build and test commands to run. Stop if any stated stop condition is met.

Written by the indexing model from the issue text.

Description

enhancement

Audit row: R18, Safe under the frozen suite (added by #193). Line numbers are those of 4553590. Find the code by what it says, and re-run every pin command on the branch point.

What is wrong. RuleWarnings.menuLines and OnCallCheck.ruleWarningFindings pick out each kind of warning with a filter, shortcutName != nil and kind == .cannotPlay (RuleWarnings.swift:172-173, OnCallCheck.swift:292, :296). A third kind would still count on the icon (StatusGlyph's rule-warning count) and be said in neither place. The rest of the project uses a switch with no default for this.

Behaviour that must survive. Every line and finding the two give now, in the same order.

The change. Each groups the warnings with a switch over RuleWarning.Kind with no default. Owner after: RuleWarnings, OnCallCheck.

In scope: Sources/NotificationCore/RuleWarnings.swift, Sources/NotificationCore/OnCallCheck.swift.

Out of scope, however tempting: The warnings' words, and adding a kind.

Frozen side: the tests. Every existing test passes unchanged; new tests are added.

Pins (counts at 4553590):

  • grep -rn 'shortcutName != nil\|kind == .cannotPlay' Sources | wc -l → 5.
  • grep -rn '"RuleWarnings.swift"\|"OnCallCheck.swift"' Tests Scripts | wc -l → 0.

Check, on the branch:

  • swift build --build-tests -Xswiftc -warnings-as-errors: no warning.
  • swift test --skip-build: 0 failures, the count unchanged.

Stop, and say so here before going on, if: the code cited has already changed; a pin appears that is not listed; a file outside the scope is needed; or any existing test would have to change.

Hold: not merged before v1.1.0 is tagged (owner, 2026-11-06). It changes the app's code, and a code change restarts the go/no-go bar's two weeks.

Prevention: Ownership recorded: the compiler names every place a new kind must be said.

Size: S.

Dominant language
Swift
Stars
2
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
152

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JWhite212/SignalLadder

All issues in JWhite212/SignalLadder

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.