Repository navigation
feat(extensions): show urgent badges on the widget and colour-code Pylon rows - #232
Open
CameronCarlin wants to merge 8 commits into
Open
CameronCarlin wants to merge 8 commits into
CameronCarlin wants to merge 8 commits into
Conversation
Extension tab keys now route through a pure extensionTabKeyAction, per AGENTS.md's testing rules, and a held key no longer starts work twice: holding Return reopened links and holding a letter re-ran its action. Arrows still repeat. The widget chip opens its tab through PanelNav.openGlance, which uses the transient expand, and both are covered by tests that drive real entry points and real NSEvents.
An issue whose owner is out of office is labelled "ours (X away)" and
escalates like an unowned one. A customer's short closing message
("thanks, all good") shows "close?" in grey instead of counting as
owed. The mine/everyone filter moves from m to f: m is mute on
StackNudge's list pages, and AGENTS.md asks for one meaning per key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This lets an extension opt in to a small chip on the widget. With
"glance": truein its manifest, the pill shows that extension's header badge (its tab label, the badge text andtrailing), but only while the badge's tone iswarningordanger.An extension doesn't produce anything new: it's the same badge its tab already renders. For example, the Pylon tab's "2 DUE · 12m" becomes visible without opening the panel.
glancedefaults tofalse, and hosts that predate it ignore the field.neutralandsuccessbadges never show, so a "CLEAR" or a plain count doesn't sit on the widget all day.+Ncounts the rest.expandFromCompact), so widget mode stays on. The expand button, by contrast, leaves widget mode for good.ViewThatFits, so it shows "Pylon 2 DUE 12m", then "2 DUE 12m", then "2 DUE", and truncates only as a last resort. The tooltip and accessibility label always carry everything.Pylon 1.1.0
"glance": true, so the widget shows its "N DUE · 12m" or "N LATE" while a first response is due or missed.waiting_on_engineeringstate) are now their own kind of row.F, notM.Mis mute on StackNudge's list pages, andAGENTS.mdasks for one meaning per key.Extension tab keys
The second pass came from an audit against
AGENTS.md's keyboard and testing rules:PanelController.extensionTabKeyAction, with a(for: NSEvent)form, as the Testing rules ask.AGENTS.md's list of those functions now includes it.PanelNav.openGlance, so a test can drive the real entry point.Changes
ExtensionManifest: an optionalglancefield, last and defaulted, so existing memberwise constructions are untouched.ExtensionHost:ExtensionGlance, the derivation (glance(for:pane:)), and publish-on-change through a newonGlancesChangedcallback. This is the same pattern asonTabsChanged.PanelNav.extensionGlances, wired inPanelController, andPanelNav.openGlancefor the chip's click.Panel.swift:ExtensionTabKeyActionandextensionTabKeyAction, which the extension tab's key branch now calls.CompactView: the chip, in both the sessions and usage layouts, plusglanceToShowas a pure function so it can be tested.docs/extensions.md: the manifest field and a short "The widget" section.Testing
22 new Swift tests:
ExtensionManifestTests: the field is off unless asked for.ExtensionHostTests: opted-in and urgent only, no document means no glance, publish only on change, survives a transient failure, removed with its extension.CompactGlanceTests: severity, tab order and the+Ncount. A click drivesopenGlancewith a fullSettingsActionsand checks three things: the transient expand happens before the mode flips, the tab opens, and widget mode isn't left.ExtensionTabKeyTests: raw key codes and realNSEvents. They cover Return and numpad Enter, letters (lowercased), held keys swallowed, arrows repeating, ⌘R once and not while held, other combinations passed through to the app, a key with no character swallowed, and device flags masked.The full CI set, run locally:
build.shfor arm64 and x86_64, with 0 compiler warningsmake test-without-xcodeRendering. The real
CompactViewwas rendered offscreen withImageRendererfor six cases: no glance, warning in sessions mode, danger with+1, usage mode, a very long badge, and light mode. That's how the first version's "Pyl… 2 D… 12m" truncation was caught and replaced with theViewThatFitsfallbacks.Not tested yet: clicking the chip in a running app. I didn't replace the installed signed build with an ad-hoc one to try it.
Pylon: 97 offline tests (15 new), on Python 3.14 and 3.9.6. The new ones cover engineering rows, away owners, sign-off hints, and refetching a stale cached preview. A live, read-only check confirmed Pylon accepts the nested
and/orfilter, at its documented depth limit of 3.Checklist
make buildpasses on arm64 and x86_64, with no compiler warnings.docs/extensions.mdis updated.main(merged in, including feat(panel): Settings… in the menu bar menu and ⌘, to open Settings #227's⌘,, which is global and handled before a tab sees the key).