Skip to content

feat(notifications): add hosted file-based in-IDE notifications#566

Draft
araarush wants to merge 3 commits into
aws:mainfrom
araarush:ai7-eclipse-notifications
Draft

feat(notifications): add hosted file-based in-IDE notifications#566
araarush wants to merge 3 commits into
aws:mainfrom
araarush:ai7-eclipse-notifications

Conversation

@araarush

Copy link
Copy Markdown

Summary

Adds hosted file-based in-IDE notifications to the Amazon Q Eclipse plugin, bringing it to parity with the
other Amazon Q IDE plugins (VS Code, JetBrains, Visual Studio), which already support this capability. This lets
operators proactively notify users of known issues and available fixes directly in the IDE, without requiring
users to check GitHub or external channels.

On startup (after the language server is ready), a background service polls a hosted JSON file over HTTPS every
10 minutes and shows targeted in-IDE toast notifications based on configurable display conditions.

What it does

  • Polling + fetch: a 10-minute self-rescheduling poll with ETag-based conditional GET and on-disk caching,
    reusing the existing HttpClientFactory / manifest-fetcher patterns. The fetcher is total (never throws) and
    degrades gracefully — an absent/404/empty/malformed endpoint, or a network failure, resolves to "show nothing"
    and is only logged (no error dialog, no crash). Supports a file:// endpoint for local development.
  • Schema + condition DSL: parses the shared 2.x "combined" notification schema, including a polymorphic
    condition expression language (==, !=, >, >=, <, <=, anyOf, noneOf, and, or, not).
  • Rules engine: gates display on compute / os / ide / extension / authx conditions. Uses semantic
    version comparison for IDE and extension versions; development (SNAPSHOT) builds and not-installed extensions
    are never shown.
  • UI: Info/Warning notifications auto-dismiss; Critical notifications persist until dismissed. Action buttons
    (open URL / update / open changelog) plus a "More" dialog and an explicit "Dismiss". Dismissals persist for
    60 days; emergency notifications re-show until dismissed.
  • Kill switch: a new "Show Amazon Q notifications" preference (default on) that disables polling entirely.
  • Telemetry: emits toolkit_showNotification / toolkit_invokeAction, independent of notification polling and
    respecting the existing telemetry opt-in.

Scope

  • This PR is the client implementation only. The hosted notification content file it reads is managed
    separately and is not part of this change; until that content exists the client is a safe no-op (verified).
  • New code lives in a self-contained notifications package; the only edits to existing files are minimal wiring
    (start polling on startup, stop cleanly on shutdown) plus two preference constants and two URL constants.

Testing

  • 470 unit tests pass; checkstyle and JaCoCo coverage gates pass. New tests cover schema/DSL parsing, the
    rules engine (all operators, semver, SNAPSHOT/none-installed rules, auth matching), the fetcher's full
    degradation matrix (200/304/404/malformed/timeout/file://) via an injected mock HttpClient, dismissal
    persistence + cleanup, and the filtering/dedup/startup-once logic.
  • Manual cross-platform verification: rendering, action buttons, dismissal-across-restart, and graceful
    degradation confirmed on macOS, Windows, and Linux (all three SWT backends), across the oldest and newest
    supported Eclipse releases. Both severities, all action buttons, persistence, and error-log cleanliness
    verified on each.

Notes for reviewers

  • The notification content file being absent today is intentional — this change ships the mechanism; content is
    delivered out-of-band and the client shows nothing until it exists.

araarush added 3 commits July 13, 2026 11:54
Adds a client-side notifications feature to the Eclipse plugin, matching the
schema and behavior of the other Amazon Q IDE plugins. On startup (after the
language server is ready) a background poller fetches a hosted JSON file over
HTTPS every 10 minutes and shows targeted in-IDE toasts.

- Schema 2.x "combined" payload model + a polymorphic condition DSL
  (==, !=, >, >=, <, <=, anyOf, noneOf, and, or, not) with a single Jackson
  deserializer.
- Rules engine gates display on compute/os/ide/extension/authx conditions
  (semver for ide/extension versions; SNAPSHOT builds and not-installed
  extensions are never shown).
- ETag-cached fetcher that degrades gracefully: any failure (absent file,
  403/404, empty, malformed, offline) resolves to "show nothing" and only logs.
  Supports a file:// endpoint for local testing.
- Toasts: Info/Warning auto-dismiss; Critical persists until dismissed.
  Actions: ShowUrl, UpdateExtension, OpenChangelog, plus More and Dismiss.
  Dismissals persist for 60 days; emergencies re-show until dismissed.
- User preference "Show Amazon Q notifications" (default on) as a kill switch;
  telemetry (toolkit_showNotification / toolkit_invokeAction) is independent of
  notification polling and respects the telemetry opt-in.
- 42 unit tests covering parsing, the DSL, rules, fetch/degradation, dismissal,
  and filtering/dedup.

Wired into LspStartupActivity (start) and Activator.stop (clean shutdown).
The OpenChangelog notification action opened
https://github.com/aws/amazon-q-eclipse/blob/main/CHANGELOG.md, which 404s (there is no
CHANGELOG.md in the repo). Point AMAZON_Q_CHANGELOG_URL at the GitHub releases page
(the de-facto changelog for the repo) so 'View changelog' resolves.
Replace an internal-only reference in the CRITICAL-persistence javadoc with a
provider-neutral phrasing; no behavior change.
@araarush

Copy link
Copy Markdown
Author
Screen.Recording.2026-07-16.at.11.05.01.AM.mov

Demonstration of notification functionality

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.

1 participant