@botbuddy/react 0.26.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -62,7 +62,7 @@ interface BotBuddyConfig {
62
62
  apiKey?: string;
63
63
  /** Dashboard URL for OAuth popup (defaults to https://app.bot-buddy.ai) */
64
64
  dashboardUrl?: string;
65
- /** Supabase project URL for realtime subscriptions (optional) */
65
+ /** Ignored since 0.28.0 (BOT-3492): the widget re-reads the active run every 15 s. Kept for compatibility. */
66
66
  supabaseUrl?: string;
67
67
  /** Hostnames where test-only 2FA helpers must be suppressed regardless of environment string */
68
68
  productionHostnames?: string[];
@@ -149,6 +149,16 @@ interface ReleaseNoteFilter {
149
149
  label: string;
150
150
  values: string[];
151
151
  }
152
+ /** BOT-3724: a note's Linear project (the team's feed only; never customers'). */
153
+ interface ReleaseNoteProject {
154
+ /** The project's identifier, e.g. "P-ENT-98"; also the Project filter's value (`?tag=project:<id>`). */
155
+ id: string;
156
+ name: string | null;
157
+ /** 0–100 as of the read, else null. */
158
+ percent_complete: number | null;
159
+ }
160
+ /** BOT-3724: the feed's optional `?since=` window (`all`, or no parameter, is the whole feed). It keys on the latest delivery time: released_at, else delivery_since, else merged_at. */
161
+ type ReleaseNotesSince = "1h" | "24h" | "7d" | "30d" | "90d" | "all";
152
162
  /** BOT-3169: `draft_on_your_branch` (local) and `in_this_preview` (preview) mark the viewer's own branch drafts. BOT-3167: `in_staging`. BOT-3168: `released`. BOT-3428: `rolled_back` (production moved back past the change). */
153
163
  type ReleaseNoteDeliveryBadge = "not_bound" | "draft_on_branch" | "draft_on_pr" | "merged" | "draft_on_your_branch" | "in_this_preview" | "in_staging" | "released" | "rolled_back";
154
164
  /** BOT-3635: the "Try it" part of a pack: where to find the change (an app path or https URL, plus its screen name), what to do, and what to look for. */
@@ -204,6 +214,10 @@ interface ReleaseNoteEntry {
204
214
  pack?: ReleaseNotePackView | null;
205
215
  /** BOT-3763: the team's feed only: the feature flag that gates the change, else null. Never sent to customers. Absent from older servers. */
206
216
  feature_flag?: ReleaseNoteFeatureFlag | null;
217
+ /** BOT-3724: when the note's change merged (UTC ISO; the latest merge of several pull requests), null until every live pull request merged. Absent from older servers. */
218
+ merged_at?: string | null;
219
+ /** BOT-3724: the Linear project of the note's ticket, with % complete as of the read, else null. Absent from older servers. */
220
+ project?: ReleaseNoteProject | null;
207
221
  created_at: string;
208
222
  updated_at: string;
209
223
  }
@@ -634,14 +648,14 @@ interface WidgetAuth {
634
648
  declare function useWidgetAuth(dashboardUrl: string): WidgetAuth;
635
649
 
636
650
  /**
637
- * Lightweight Supabase Realtime subscription using raw WebSocket.
638
- * Listens for INSERT/UPDATE/DELETE on test_runs and test_run_cases
639
- * filtered by the active test run ID, then calls onUpdate().
651
+ * Re-reads the active test run every 15 s while one is open, then calls onUpdate().
640
652
  *
641
- * Requires config.supabaseUrl to be set (e.g. "https://api.bot-buddy.ai").
642
- * Falls back to polling every 15s if WebSocket is unavailable.
653
+ * BOT-3492: the hook no longer opens a Realtime WebSocket. BotBuddy's Realtime
654
+ * table publication is empty, and the widget's anon key cannot read test_runs
655
+ * (BOT-793), so that socket never delivered an update. `config.supabaseUrl` is
656
+ * accepted for compatibility and ignored.
643
657
  */
644
- declare function useRealtimeRefresh(config: BotBuddyConfig, testRunId: string | null | undefined, onUpdate: () => void): void;
658
+ declare function useRealtimeRefresh(_config: BotBuddyConfig, testRunId: string | null | undefined, onUpdate: () => void): void;
645
659
 
646
660
  interface UseReleaseNotesOptions {
647
661
  endpoint: string;
@@ -686,4 +700,4 @@ declare function useReleaseNoteAnnouncements({ feed, viewer }: UseReleaseNoteAnn
686
700
 
687
701
  declare const RELEASE_NOTES_TOKENS: readonly ReleaseNotesToken[];
688
702
 
689
- export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFeatureFlag, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
703
+ export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFeatureFlag, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteProject, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSince, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
package/dist/index.d.ts CHANGED
@@ -62,7 +62,7 @@ interface BotBuddyConfig {
62
62
  apiKey?: string;
63
63
  /** Dashboard URL for OAuth popup (defaults to https://app.bot-buddy.ai) */
64
64
  dashboardUrl?: string;
65
- /** Supabase project URL for realtime subscriptions (optional) */
65
+ /** Ignored since 0.28.0 (BOT-3492): the widget re-reads the active run every 15 s. Kept for compatibility. */
66
66
  supabaseUrl?: string;
67
67
  /** Hostnames where test-only 2FA helpers must be suppressed regardless of environment string */
68
68
  productionHostnames?: string[];
@@ -149,6 +149,16 @@ interface ReleaseNoteFilter {
149
149
  label: string;
150
150
  values: string[];
151
151
  }
152
+ /** BOT-3724: a note's Linear project (the team's feed only; never customers'). */
153
+ interface ReleaseNoteProject {
154
+ /** The project's identifier, e.g. "P-ENT-98"; also the Project filter's value (`?tag=project:<id>`). */
155
+ id: string;
156
+ name: string | null;
157
+ /** 0–100 as of the read, else null. */
158
+ percent_complete: number | null;
159
+ }
160
+ /** BOT-3724: the feed's optional `?since=` window (`all`, or no parameter, is the whole feed). It keys on the latest delivery time: released_at, else delivery_since, else merged_at. */
161
+ type ReleaseNotesSince = "1h" | "24h" | "7d" | "30d" | "90d" | "all";
152
162
  /** BOT-3169: `draft_on_your_branch` (local) and `in_this_preview` (preview) mark the viewer's own branch drafts. BOT-3167: `in_staging`. BOT-3168: `released`. BOT-3428: `rolled_back` (production moved back past the change). */
153
163
  type ReleaseNoteDeliveryBadge = "not_bound" | "draft_on_branch" | "draft_on_pr" | "merged" | "draft_on_your_branch" | "in_this_preview" | "in_staging" | "released" | "rolled_back";
154
164
  /** BOT-3635: the "Try it" part of a pack: where to find the change (an app path or https URL, plus its screen name), what to do, and what to look for. */
@@ -204,6 +214,10 @@ interface ReleaseNoteEntry {
204
214
  pack?: ReleaseNotePackView | null;
205
215
  /** BOT-3763: the team's feed only: the feature flag that gates the change, else null. Never sent to customers. Absent from older servers. */
206
216
  feature_flag?: ReleaseNoteFeatureFlag | null;
217
+ /** BOT-3724: when the note's change merged (UTC ISO; the latest merge of several pull requests), null until every live pull request merged. Absent from older servers. */
218
+ merged_at?: string | null;
219
+ /** BOT-3724: the Linear project of the note's ticket, with % complete as of the read, else null. Absent from older servers. */
220
+ project?: ReleaseNoteProject | null;
207
221
  created_at: string;
208
222
  updated_at: string;
209
223
  }
@@ -634,14 +648,14 @@ interface WidgetAuth {
634
648
  declare function useWidgetAuth(dashboardUrl: string): WidgetAuth;
635
649
 
636
650
  /**
637
- * Lightweight Supabase Realtime subscription using raw WebSocket.
638
- * Listens for INSERT/UPDATE/DELETE on test_runs and test_run_cases
639
- * filtered by the active test run ID, then calls onUpdate().
651
+ * Re-reads the active test run every 15 s while one is open, then calls onUpdate().
640
652
  *
641
- * Requires config.supabaseUrl to be set (e.g. "https://api.bot-buddy.ai").
642
- * Falls back to polling every 15s if WebSocket is unavailable.
653
+ * BOT-3492: the hook no longer opens a Realtime WebSocket. BotBuddy's Realtime
654
+ * table publication is empty, and the widget's anon key cannot read test_runs
655
+ * (BOT-793), so that socket never delivered an update. `config.supabaseUrl` is
656
+ * accepted for compatibility and ignored.
643
657
  */
644
- declare function useRealtimeRefresh(config: BotBuddyConfig, testRunId: string | null | undefined, onUpdate: () => void): void;
658
+ declare function useRealtimeRefresh(_config: BotBuddyConfig, testRunId: string | null | undefined, onUpdate: () => void): void;
645
659
 
646
660
  interface UseReleaseNotesOptions {
647
661
  endpoint: string;
@@ -686,4 +700,4 @@ declare function useReleaseNoteAnnouncements({ feed, viewer }: UseReleaseNoteAnn
686
700
 
687
701
  declare const RELEASE_NOTES_TOKENS: readonly ReleaseNotesToken[];
688
702
 
689
- export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFeatureFlag, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
703
+ export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFeatureFlag, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteProject, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSince, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };