Trim comments across Rust and webapp source to direct one-liners (ticket 030)
Pass over src/*.rs, webapp/src/**, and the in-app "?" docs prose: condensed multi-paragraph doc comments to single lines that state the non-obvious why, deleted comments that only restated adjacent code, and tightened the Docs.tsx help-panel wording. No logic, structure, or code formatting changed — verified via cargo test (143 passed) and tsc -b && vite build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
3cef6dc8ae
commit
00c21c8032
@@ -24,9 +24,7 @@ const OPS: { value: CompareOp; label: string }[] = [
|
||||
{ value: 'ne', label: '!=' },
|
||||
]
|
||||
|
||||
/// Parses a plain millisecond number or a humantime-style duration like
|
||||
/// `30s`/`5m`/`1h` into milliseconds. Mirrors the backend's `window_ms`
|
||||
/// field without pulling in a full humantime parser for the webapp.
|
||||
/// Parses a plain millisecond number or a humantime-style duration (`30s`/`5m`/`1h`) to mirror the backend's `window_ms` without a full humantime parser here.
|
||||
function parseWindowMs(input: string): number | null {
|
||||
const trimmed = input.trim()
|
||||
if (!trimmed) return null
|
||||
@@ -119,8 +117,6 @@ function formFromRule(rule: AlertRule): FormState {
|
||||
return base
|
||||
}
|
||||
|
||||
/// Validates the form's condition-specific fields, returning an error
|
||||
/// message (or null if valid) plus the built `AlertCondition` when valid.
|
||||
function buildCondition(form: FormState): { error: string | null; condition: AlertCondition | null } {
|
||||
switch (form.kind) {
|
||||
case 'immediate':
|
||||
|
||||
Reference in New Issue
Block a user