PagerDuty proxy parity (#1945) - #1948
Conversation
52f2bb1 to
80e8ac5
Compare
…through a proxy Closes #1945 pagerduty_proxy threads the sibling channels' exact shape end to end: IAlertSettings, the send (was proxyAddress: null unconditionally), the test buttons, both Settings windows with a proxy row, Lite's plain settings.json pref, and Darling's non-secret column tier - V43 migration, both column lists, upsert $19, the viewer round-trip, the managed-roles and provisioning grants, and a V43 probe sentinel so the viewer's version gate reads the store honestly (the gate/pin tests caught exactly the two spots the StorageVersion-bump discipline says they exist to catch). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
80e8ac5 to
8199581
Compare
| <TextBlock Grid.Row="2" Grid.Column="0" Text="Proxy Address:" VerticalAlignment="Center" | ||
| Foreground="{DynamicResource ForegroundBrush}" Margin="0,0,8,4"/> | ||
| <TextBox Grid.Row="2" Grid.Column="1" x:Name="PagerDutyProxyAddressBox" Margin="0,0,0,4" | ||
| ToolTip="Optional. HTTP proxy for reaching PagerDuty (e.g. http://proxy.corp.local:8080). Leave blank to connect directly."/> | ||
|
|
||
| <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" Margin="0,4,0,0"> |
There was a problem hiding this comment.
Bug: this grid's Grid.RowDefinitions still only declares 3 rows, but content now uses Grid.Row="3" (this StackPanel).
The PagerDuty Grid above (line ~636) declares only 3 <RowDefinition Height="Auto"/> entries (indices 0-2). This hunk adds a new row-2 (Proxy Address) and moves the test-button StackPanel to row 3 — but no 4th RowDefinition was added, so row 3 has no allocated height. The button/status text will render collapsed or overlapping the Proxy Address field instead of appearing below it.
Looks like the row that should have been added here landed in the wrong grid instead: the Teams grid earlier in this file (~line 554) picked up an extra, unused RowDefinition with mismatched indentation (20 spaces vs. its siblings' 24) — that block only uses rows 0-2, so the addition there is harmless clutter, but it's the edit that belongs in this PagerDuty grid.
Lite/Windows/SettingsWindow.xaml's equivalent PagerDuty grid correctly has 4 RowDefinitions — this is a Lite/Darling parity gap from what looks like a misapplied patch.
Fix: add a 4th <RowDefinition Height="Auto"/> to this grid's Grid.RowDefinitions, and drop the stray one from the Teams grid.
Review summaryReviewed the PagerDuty proxy parity work end to end (settings model, migration, viewer probe, grants, both Settings windows, both apps' test-button wiring). Correctness / Lite-Darling parity: Found one real bug — left an inline comment on Everything else checks out:
No SQL injection, secrets-handling, or missing-index concerns found (raw T-SQL/PL-pgSQL surface in this PR is limited to the additive |
| <RowDefinition Height="Auto"/> | ||
| <RowDefinition Height="Auto"/> | ||
| <RowDefinition Height="Auto"/> | ||
| <RowDefinition Height="Auto"/> |
There was a problem hiding this comment.
This 4th RowDefinition was added to the Teams grid by this PR, but the Teams grid only uses rows 0-2 (Webhook URL, Proxy Address, test button) — it's unused here. This looks like a misplaced edit for the row that the PagerDuty grid actually needs further down (see the comment around line 639) since it now uses Grid.Row="3".
| <RowDefinition Height="Auto"/> | |
| <RowDefinition Height="Auto"/> | |
| </Grid.RowDefinitions> |
| <TextBox Grid.Row="2" Grid.Column="1" x:Name="PagerDutyProxyAddressBox" Margin="0,0,0,4" | ||
| ToolTip="Optional. HTTP proxy for reaching PagerDuty (e.g. http://proxy.corp.local:8080). Leave blank to connect directly."/> | ||
|
|
||
| <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" Margin="0,4,0,0"> |
There was a problem hiding this comment.
This StackPanel now uses Grid.Row="3", but the enclosing Grid.RowDefinitions above (around line 636-639) still only declares 3 rows (0-2). WPF clamps an out-of-range Grid.Row to the last defined row, so this StackPanel (Send Test Notification button + status text) will render on top of row 2 — the new Proxy Address textbox — instead of getting its own row.
It looks like the 4th RowDefinition this grid needs was accidentally added to the Teams grid instead (flagged separately at line 554), which doesn't need it. Compare with Lite's equivalent PagerDuty grid (Lite/Windows/SettingsWindow.xaml), which correctly has 4 RowDefinitions for the same 4 rows.
| PagerDutyWebhookEnabledCheckBox.IsChecked = App.PagerDutyWebhookEnabled; | ||
| PagerDutyRoutingKeyBox.Text = App.PagerDutyRoutingKey; | ||
| PagerDutyEuRegionCheckBox.IsChecked = App.PagerDutyUseEuRegion; | ||
| PagerDutyProxyAddressBox.Text = App.PagerDutyProxyAddress; |
There was a problem hiding this comment.
UpdatePagerDutyControlStates() (further down, around line 1161-1167) never toggles PagerDutyProxyAddressBox.IsEnabled. Every sibling channel does this — UpdateTeamsControlStates/UpdateSlackControlStates/UpdateGenericControlStates all set their *ProxyAddressBox.IsEnabled = enabled; — and Darling's own UpdatePagerDutyControlStates (added in this PR) does set PagerDutyProxyAddressBox.IsEnabled = enabled;. As written, Lite's PagerDuty proxy textbox stays enabled/editable even when "Enable PagerDuty notifications" is unchecked — a within-app sibling-channel inconsistency and a Lite/Darling parity drift.
Suggested fix in UpdatePagerDutyControlStates():
| PagerDutyProxyAddressBox.Text = App.PagerDutyProxyAddress; | |
| PagerDutyProxyAddressBox.Text = App.PagerDutyProxyAddress; |
(and add PagerDutyProxyAddressBox.IsEnabled = enabled; next to PagerDutyEuRegionCheckBox.IsEnabled = enabled; in UpdatePagerDutyControlStates())
Review: PagerDuty proxy parity (#1945)Solid, narrowly-scoped follow-through on #1943 — threads Found two concrete bugs, both left inline:
No security concerns beyond what's already inherent to the shared |
…e PagerDuty grid, and Lite's proxy box joins the enable toggle The XAML edit dropped the new RowDefinition into the Teams grid, so the PagerDuty test button (Grid.Row 3) clamped onto row 2 and rendered on top of the proxy box. Moved to the grid that uses it. Lite's UpdatePagerDutyControlStates now toggles the proxy box like every sibling channel does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review: PagerDuty proxy parity (#1945)Went through the full diff column-by-column across both apps. This is a clean, mechanical follow-through — I could not find a correctness, Lite/Darling parity, or security issue. What I verified:
Minor, non-blocking nits (not worth blocking on):
No missing-index or other DMV-folklore suggestions, per repo convention. Nice, thorough parity work. |
Follow-through on #1943: pagerduty_proxy threads the sibling channels' exact shape end to end - IAlertSettings, the send call (was proxyAddress: null unconditionally), both test buttons, both Settings windows with a proxy row, Lite's plain settings.json pref, Darling's non-secret column tier (V43 migration, both viewer column lists, upsert $19, round-trip, managed-roles + provisioning grants), and a V43 viewer probe sentinel. The version-gate and migration-pin tests caught exactly their two designed spots and were updated with the arm. Lite 1952/1952, Darling 4040/4050 (10 usual gated skips) on a live rig, all apps 0 warnings.
🤖 Generated with Claude Code