Skip to content

Add spec for enhanced notification categorization - #14

Closed
shanselman with Copilot wants to merge 14 commits into
masterfrom
copilot/enhance-notification-categorization
Closed

Add spec for enhanced notification categorization#14
shanselman with Copilot wants to merge 14 commits into
masterfrom
copilot/enhance-notification-categorization

Conversation

Copilot AI commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

The current keyword-only notification categorization misclassifies chat responses and lacks channel/agent awareness. This PR documents a more robust categorization approach that prioritizes structured metadata and user-configurable rules.

  • Spec overview
    • Defines layered categorization pipeline (chat toggle → structured metadata → user rules → keyword fallback).
  • Data model & settings
    • Specifies notification metadata fields, settings additions, and migration defaults.
  • UI & mapping guidance
    • Outlines minimal settings UI changes and channel/category mappings.

Example (proposed user rule format):

{
  "pattern": "invoice|receipt",
  "isRegex": true,
  "category": "email",
  "enabled": true
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Enhanced notification categorization system</issue_title>
<issue_description>## Current Behavior

Notifications are categorized by simple keyword matching in the message content:

  • Health: blood sugar, glucose, cgm, mg/dl
  • Urgent: urgent, critical, emergency
  • Reminder: reminder
  • Email: email, inbox, gmail
  • Calendar: calendar, meeting, event
  • Build: build, ci, deploy
  • Stock: stock, in stock, available now
  • Info: everything else (default)

Problem

This approach can be confusing - if Claude's response mentions 'email' while answering a general question, it gets categorized as an email notification.

Proposed Improvements

  1. Folder/Channel-based categorization - categorize by which channel/session the message came from
  2. Agent-based categorization - different notification settings per agent
  3. User-defined rules - regex or keyword rules that users can customize
  4. Smart categorization - use the gateway's intent/context if available
  5. Separate chat toggle - simple on/off for all chat responses vs. system notifications

Notes

Current keyword-based system is documented in Settings UI with explanatory text.</issue_description>

<agent_instructions>Consider how you’d implement this. Make a spec </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 13 commits February 2, 2026 07:32
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance notification categorization system Add spec for enhanced notification categorization Feb 2, 2026
Copilot AI requested a review from shanselman February 2, 2026 07:38
@shanselman shanselman closed this Feb 8, 2026
@shanselman
shanselman deleted the copilot/enhance-notification-categorization branch February 8, 2026 02:22
RBrid added a commit to RBrid/openclaw-windows-node that referenced this pull request May 22, 2026
Fixes from dual-model code review on user/regisb/WSLInstall1 branch.

openclaw#1 + openclaw#2 + openclaw#6: SuppressNodeAutoApprove (process-global bool, racy, idempotency-fragile) replaced with IDisposable AcquireNodeAutoApproveSuppression() using volatile int + Interlocked counter. Token Dispose is idempotent via Interlocked.Exchange. Local-loopback URL gate scopes suppression to ws://localhost / ws://127.* so manual operator connects to remote gateways still surface their pending-approval toast.

openclaw#3: ElevatedWslPlatformInstaller.RunDefaultAsync now wraps WaitForExitAsync in try/catch(OperationCanceledException), attempts best-effort Kill(entireProcessTree:true) on the launcher (will fail for the elevated child — documented), then rethrows so the engine surfaces Cancelled cleanly.

openclaw#4: ConfigureWslInstance failure remap to wsl_firstboot_config_failed_after_install is now gated on a stderr-signature check (LooksLikePostInstallKernelIssue: WslRegisterDistribution, Hyper-V, 0x80370102, kernel, vmcompute, LxssManager, instance-is-corrupted, etc). Unrelated configure failures (apt repo issues, script bugs) keep their original error code so users don't get a misleading 'reboot to fix' suggestion.

openclaw#5 + openclaw#15: New tests — Engine_SelfHeal_ResetsCancelledStatus, Engine_ConfigureFails_AfterJustInstalled_DoesNotRemapUnrelatedFailure, LooksLikePostInstallKernelIssue_MatchesKnownKernelSignatures, PairAsync_AwaitsConfiguredDelay, PairAsync_CancellationDuringDelay_Propagates.

openclaw#7: OnboardingV2Bridge now treats LocalGatewaySetupStatus.RequiresAdmin like other terminal/blocking statuses — surfaces error message via LocalizeFailureMessage and suppresses the running-phase info card.

openclaw#8: WslPlatformInstall DefaultPostInstallProbeAttempts comment rewritten to reflect real worst case (~33s, but typically 1–2 probes) rather than the misleading '6 × 500ms = 3s'.

openclaw#9: Extracted WslInstallCycleIssueCodes static class with const issue codes + IReadOnlySet<string> All. Replaced 5 duplicated string literals (top-level self-heal RemoveAll + 4 EnsureWslEnabled outcome branches) with the constants.

openclaw#10: CreateLocalOnly factory now reads OPENCLAW_PAIR_RETRY_DELAY_MS env var at wire-up and passes it as SettingsWindowsTrayNodeProvisioner pairRetryDelay so operators can tune the retry without rebuilding.

openclaw#11: LocalizeFailureMessage now exposes an isGenericFallback signal; MaybeAppendSetupDiagnosticsHint skips the 'Setup diagnostics: …' wrap when we returned the V2_Progress_GenericFailure placeholder (the generic message already directs to logs).

openclaw#13: SetupExistingGatewayClassifier.ClassifyAsync accepts an optional IOpenClawLogger so WSL probe failures surface in the diagnostic stream instead of being silently swallowed by NullLogger.

openclaw#14: ComputeInfoMessage phase predicate tightened to (status==Running && phase<=EnsureWslEnabled) so the 'Check system' hint stops once the engine moves past EnsureWslEnabled, including transient non-Running states between phases.

openclaw#16: Preflight port-probe (host-side TCP check) now runs unconditionally rather than being gated on WSL platform.State==Installed, so users find out about host-side port conflicts before spending 30+ seconds on WSL install.

Validation: build.ps1 green; Shared 1891/29 skipped, Tray 1217 (+5), Connection 229 all pass; ARM64 publish succeeds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Enhanced notification categorization system

2 participants