@bbearai/react-native 0.9.0 → 0.9.1

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.js CHANGED
@@ -12793,55 +12793,66 @@ var BugBearClient = class {
12793
12793
  ...pendingResult.data || [],
12794
12794
  ...completedResult.data || []
12795
12795
  ];
12796
- const mapItem = (item) => ({
12797
- id: item.id,
12798
- status: item.status,
12799
- startedAt: item.started_at,
12800
- skipReason: item.skip_reason,
12801
- isVerification: item.is_verification || false,
12802
- originalReportId: item.original_report_id,
12803
- testCase: {
12804
- id: item.test_case.id,
12805
- title: item.test_case.title,
12806
- testKey: item.test_case.test_key,
12807
- description: item.test_case.description,
12808
- steps: item.test_case.steps,
12809
- expectedResult: item.test_case.expected_result,
12810
- priority: item.test_case.priority,
12811
- targetRoute: item.test_case.target_route,
12812
- track: item.test_case.track ? {
12813
- id: item.test_case.track.id,
12814
- name: item.test_case.track.name,
12815
- icon: item.test_case.track.icon,
12816
- color: item.test_case.track.color,
12817
- testTemplate: item.test_case.track.test_template,
12818
- rubricMode: item.test_case.track.rubric_mode || "pass_fail",
12819
- description: item.test_case.track.description
12820
- } : void 0,
12821
- group: item.test_case.group ? {
12822
- id: item.test_case.group.id,
12823
- name: item.test_case.group.name,
12824
- description: item.test_case.group.description,
12825
- sortOrder: item.test_case.group.sort_order
12826
- } : void 0,
12827
- role: item.test_case.role ? {
12828
- id: item.test_case.role.id,
12829
- name: item.test_case.role.name,
12830
- slug: item.test_case.role.slug,
12831
- color: item.test_case.role.color,
12832
- description: item.test_case.role.description,
12833
- loginHint: item.test_case.role.login_hint
12834
- } : void 0,
12835
- platforms: item.test_case.platforms || void 0
12836
- }
12837
- });
12838
- const mapped = allData.filter((item) => {
12839
- if (!item.test_case) {
12840
- console.warn("BugBear: Assignment returned without test_case", { id: item.id });
12841
- return false;
12842
- }
12843
- return true;
12844
- }).map(mapItem);
12796
+ const mapItem = (item) => {
12797
+ const tc = item.test_case;
12798
+ return {
12799
+ id: item.id,
12800
+ status: item.status,
12801
+ startedAt: item.started_at,
12802
+ skipReason: item.skip_reason,
12803
+ isVerification: item.is_verification || false,
12804
+ originalReportId: item.original_report_id,
12805
+ testCase: tc ? {
12806
+ id: tc.id,
12807
+ title: tc.title,
12808
+ testKey: tc.test_key,
12809
+ description: tc.description,
12810
+ steps: tc.steps,
12811
+ expectedResult: tc.expected_result,
12812
+ priority: tc.priority,
12813
+ targetRoute: tc.target_route,
12814
+ track: tc.track ? {
12815
+ id: tc.track.id,
12816
+ name: tc.track.name,
12817
+ icon: tc.track.icon,
12818
+ color: tc.track.color,
12819
+ testTemplate: tc.track.test_template,
12820
+ rubricMode: tc.track.rubric_mode || "pass_fail",
12821
+ description: tc.track.description
12822
+ } : void 0,
12823
+ group: tc.group ? {
12824
+ id: tc.group.id,
12825
+ name: tc.group.name,
12826
+ description: tc.group.description,
12827
+ sortOrder: tc.group.sort_order
12828
+ } : void 0,
12829
+ role: tc.role ? {
12830
+ id: tc.role.id,
12831
+ name: tc.role.name,
12832
+ slug: tc.role.slug,
12833
+ color: tc.role.color,
12834
+ description: tc.role.description,
12835
+ loginHint: tc.role.login_hint
12836
+ } : void 0,
12837
+ platforms: tc.platforms || void 0
12838
+ } : {
12839
+ // Standalone verification assignment (bug reported without a test case)
12840
+ id: item.original_report_id || item.id,
12841
+ title: item.notes || "Bug Verification",
12842
+ testKey: "VERIFY",
12843
+ description: "Verify that the reported bug has been fixed",
12844
+ steps: [],
12845
+ expectedResult: "The bug should no longer be reproducible",
12846
+ priority: "P1",
12847
+ targetRoute: void 0,
12848
+ track: void 0,
12849
+ group: void 0,
12850
+ role: void 0,
12851
+ platforms: void 0
12852
+ }
12853
+ };
12854
+ };
12855
+ const mapped = allData.map(mapItem);
12845
12856
  mapped.sort((a, b) => {
12846
12857
  if (a.isVerification && !b.isVerification) return -1;
12847
12858
  if (!a.isVerification && b.isVerification) return 1;
@@ -13355,7 +13366,11 @@ var BugBearClient = class {
13355
13366
  verifiedByName: row.verified_by_name || void 0,
13356
13367
  verifiedAt: row.verified_at || void 0,
13357
13368
  originalBugId: row.original_bug_id || void 0,
13358
- originalBugTitle: row.original_bug_title || void 0
13369
+ originalBugTitle: row.original_bug_title || void 0,
13370
+ resolutionNotes: row.resolution_notes || void 0,
13371
+ fixCommitSha: row.code_context?.fix?.commit_sha || void 0,
13372
+ fixCommitMessage: row.code_context?.fix?.commit_message || void 0,
13373
+ fixFilesChanged: row.code_context?.fix?.files_changed || void 0
13359
13374
  }));
13360
13375
  } catch (err) {
13361
13376
  console.error("BugBear: Error fetching issues", err);
@@ -17937,7 +17952,10 @@ function IssueListScreen({ nav, category }) {
17937
17952
  styles5.tab,
17938
17953
  { borderBottomColor: isActive ? catConfig.accent : "transparent" }
17939
17954
  ],
17940
- onPress: () => setActiveCategory(cat),
17955
+ onPress: () => {
17956
+ setActiveCategory(cat);
17957
+ nav.replace({ name: "ISSUE_LIST", category: cat });
17958
+ },
17941
17959
  activeOpacity: 0.7
17942
17960
  },
17943
17961
  /* @__PURE__ */ import_react18.default.createElement(import_react_native17.Text, { style: [
@@ -18248,7 +18266,14 @@ function IssueDetailScreen({ nav, issue }) {
18248
18266
  activeOpacity: 0.7
18249
18267
  },
18250
18268
  /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.reopenCancelText }, "Cancel")
18251
- ))), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.screenshotSection }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ import_react19.default.createElement(import_react_native18.TouchableOpacity, { key: i, onPress: () => import_react_native18.Linking.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Image, { source: { uri: url }, style: styles5.screenshotThumb }))))), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.metaSection }, issue.reporterName && /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))), dashboardUrl && /* @__PURE__ */ import_react19.default.createElement(
18269
+ ))), issue.status === "ready_to_test" && (issue.fixCommitSha || issue.resolutionNotes) && /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: {
18270
+ backgroundColor: "rgba(59, 130, 246, 0.1)",
18271
+ borderWidth: 1,
18272
+ borderColor: "rgba(96, 165, 250, 0.2)",
18273
+ borderRadius: 8,
18274
+ padding: 12,
18275
+ marginBottom: 12
18276
+ } }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: { flexDirection: "row", alignItems: "center", gap: 6, marginBottom: 8 } }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: { fontSize: 13 } }, "\u{1F527}"), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: { fontSize: 12, fontWeight: "600", color: "#60a5fa" } }, "Fix Details")), issue.resolutionNotes ? /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: { fontSize: 12, color: colors.textSecondary, marginBottom: 6, lineHeight: 17 } }, issue.resolutionNotes) : null, issue.fixCommitSha ? /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: { fontSize: 11, color: colors.textDim, fontFamily: "monospace" } }, "Commit: ", issue.fixCommitSha.slice(0, 7), issue.fixCommitMessage && ` \u2014 ${issue.fixCommitMessage}`) : null, issue.fixFilesChanged && issue.fixFilesChanged.length > 0 ? /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: { fontSize: 11, color: colors.textDim, marginTop: 4 } }, issue.fixFilesChanged.length, " file", issue.fixFilesChanged.length > 1 ? "s" : "", " changed") : null), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.screenshotSection }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ import_react19.default.createElement(import_react_native18.TouchableOpacity, { key: i, onPress: () => import_react_native18.Linking.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Image, { source: { uri: url }, style: styles5.screenshotThumb }))))), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.View, { style: styles5.metaSection }, issue.reporterName && /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ import_react19.default.createElement(import_react_native18.Text, { style: styles5.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))), dashboardUrl && /* @__PURE__ */ import_react19.default.createElement(
18252
18277
  import_react_native18.TouchableOpacity,
18253
18278
  {
18254
18279
  style: styles5.dashboardLink,
package/dist/index.mjs CHANGED
@@ -12760,55 +12760,66 @@ var BugBearClient = class {
12760
12760
  ...pendingResult.data || [],
12761
12761
  ...completedResult.data || []
12762
12762
  ];
12763
- const mapItem = (item) => ({
12764
- id: item.id,
12765
- status: item.status,
12766
- startedAt: item.started_at,
12767
- skipReason: item.skip_reason,
12768
- isVerification: item.is_verification || false,
12769
- originalReportId: item.original_report_id,
12770
- testCase: {
12771
- id: item.test_case.id,
12772
- title: item.test_case.title,
12773
- testKey: item.test_case.test_key,
12774
- description: item.test_case.description,
12775
- steps: item.test_case.steps,
12776
- expectedResult: item.test_case.expected_result,
12777
- priority: item.test_case.priority,
12778
- targetRoute: item.test_case.target_route,
12779
- track: item.test_case.track ? {
12780
- id: item.test_case.track.id,
12781
- name: item.test_case.track.name,
12782
- icon: item.test_case.track.icon,
12783
- color: item.test_case.track.color,
12784
- testTemplate: item.test_case.track.test_template,
12785
- rubricMode: item.test_case.track.rubric_mode || "pass_fail",
12786
- description: item.test_case.track.description
12787
- } : void 0,
12788
- group: item.test_case.group ? {
12789
- id: item.test_case.group.id,
12790
- name: item.test_case.group.name,
12791
- description: item.test_case.group.description,
12792
- sortOrder: item.test_case.group.sort_order
12793
- } : void 0,
12794
- role: item.test_case.role ? {
12795
- id: item.test_case.role.id,
12796
- name: item.test_case.role.name,
12797
- slug: item.test_case.role.slug,
12798
- color: item.test_case.role.color,
12799
- description: item.test_case.role.description,
12800
- loginHint: item.test_case.role.login_hint
12801
- } : void 0,
12802
- platforms: item.test_case.platforms || void 0
12803
- }
12804
- });
12805
- const mapped = allData.filter((item) => {
12806
- if (!item.test_case) {
12807
- console.warn("BugBear: Assignment returned without test_case", { id: item.id });
12808
- return false;
12809
- }
12810
- return true;
12811
- }).map(mapItem);
12763
+ const mapItem = (item) => {
12764
+ const tc = item.test_case;
12765
+ return {
12766
+ id: item.id,
12767
+ status: item.status,
12768
+ startedAt: item.started_at,
12769
+ skipReason: item.skip_reason,
12770
+ isVerification: item.is_verification || false,
12771
+ originalReportId: item.original_report_id,
12772
+ testCase: tc ? {
12773
+ id: tc.id,
12774
+ title: tc.title,
12775
+ testKey: tc.test_key,
12776
+ description: tc.description,
12777
+ steps: tc.steps,
12778
+ expectedResult: tc.expected_result,
12779
+ priority: tc.priority,
12780
+ targetRoute: tc.target_route,
12781
+ track: tc.track ? {
12782
+ id: tc.track.id,
12783
+ name: tc.track.name,
12784
+ icon: tc.track.icon,
12785
+ color: tc.track.color,
12786
+ testTemplate: tc.track.test_template,
12787
+ rubricMode: tc.track.rubric_mode || "pass_fail",
12788
+ description: tc.track.description
12789
+ } : void 0,
12790
+ group: tc.group ? {
12791
+ id: tc.group.id,
12792
+ name: tc.group.name,
12793
+ description: tc.group.description,
12794
+ sortOrder: tc.group.sort_order
12795
+ } : void 0,
12796
+ role: tc.role ? {
12797
+ id: tc.role.id,
12798
+ name: tc.role.name,
12799
+ slug: tc.role.slug,
12800
+ color: tc.role.color,
12801
+ description: tc.role.description,
12802
+ loginHint: tc.role.login_hint
12803
+ } : void 0,
12804
+ platforms: tc.platforms || void 0
12805
+ } : {
12806
+ // Standalone verification assignment (bug reported without a test case)
12807
+ id: item.original_report_id || item.id,
12808
+ title: item.notes || "Bug Verification",
12809
+ testKey: "VERIFY",
12810
+ description: "Verify that the reported bug has been fixed",
12811
+ steps: [],
12812
+ expectedResult: "The bug should no longer be reproducible",
12813
+ priority: "P1",
12814
+ targetRoute: void 0,
12815
+ track: void 0,
12816
+ group: void 0,
12817
+ role: void 0,
12818
+ platforms: void 0
12819
+ }
12820
+ };
12821
+ };
12822
+ const mapped = allData.map(mapItem);
12812
12823
  mapped.sort((a, b) => {
12813
12824
  if (a.isVerification && !b.isVerification) return -1;
12814
12825
  if (!a.isVerification && b.isVerification) return 1;
@@ -13322,7 +13333,11 @@ var BugBearClient = class {
13322
13333
  verifiedByName: row.verified_by_name || void 0,
13323
13334
  verifiedAt: row.verified_at || void 0,
13324
13335
  originalBugId: row.original_bug_id || void 0,
13325
- originalBugTitle: row.original_bug_title || void 0
13336
+ originalBugTitle: row.original_bug_title || void 0,
13337
+ resolutionNotes: row.resolution_notes || void 0,
13338
+ fixCommitSha: row.code_context?.fix?.commit_sha || void 0,
13339
+ fixCommitMessage: row.code_context?.fix?.commit_message || void 0,
13340
+ fixFilesChanged: row.code_context?.fix?.files_changed || void 0
13326
13341
  }));
13327
13342
  } catch (err) {
13328
13343
  console.error("BugBear: Error fetching issues", err);
@@ -17919,7 +17934,10 @@ function IssueListScreen({ nav, category }) {
17919
17934
  styles5.tab,
17920
17935
  { borderBottomColor: isActive ? catConfig.accent : "transparent" }
17921
17936
  ],
17922
- onPress: () => setActiveCategory(cat),
17937
+ onPress: () => {
17938
+ setActiveCategory(cat);
17939
+ nav.replace({ name: "ISSUE_LIST", category: cat });
17940
+ },
17923
17941
  activeOpacity: 0.7
17924
17942
  },
17925
17943
  /* @__PURE__ */ React16.createElement(Text14, { style: [
@@ -18230,7 +18248,14 @@ function IssueDetailScreen({ nav, issue }) {
18230
18248
  activeOpacity: 0.7
18231
18249
  },
18232
18250
  /* @__PURE__ */ React17.createElement(Text15, { style: styles5.reopenCancelText }, "Cancel")
18233
- ))), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ React17.createElement(View17, { style: styles5.screenshotSection }, /* @__PURE__ */ React17.createElement(Text15, { style: styles5.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ React17.createElement(View17, { style: styles5.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ React17.createElement(TouchableOpacity14, { key: i, onPress: () => Linking4.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ React17.createElement(Image3, { source: { uri: url }, style: styles5.screenshotThumb }))))), /* @__PURE__ */ React17.createElement(View17, { style: styles5.metaSection }, issue.reporterName && /* @__PURE__ */ React17.createElement(Text15, { style: styles5.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ React17.createElement(Text15, { style: styles5.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))), dashboardUrl && /* @__PURE__ */ React17.createElement(
18251
+ ))), issue.status === "ready_to_test" && (issue.fixCommitSha || issue.resolutionNotes) && /* @__PURE__ */ React17.createElement(View17, { style: {
18252
+ backgroundColor: "rgba(59, 130, 246, 0.1)",
18253
+ borderWidth: 1,
18254
+ borderColor: "rgba(96, 165, 250, 0.2)",
18255
+ borderRadius: 8,
18256
+ padding: 12,
18257
+ marginBottom: 12
18258
+ } }, /* @__PURE__ */ React17.createElement(View17, { style: { flexDirection: "row", alignItems: "center", gap: 6, marginBottom: 8 } }, /* @__PURE__ */ React17.createElement(Text15, { style: { fontSize: 13 } }, "\u{1F527}"), /* @__PURE__ */ React17.createElement(Text15, { style: { fontSize: 12, fontWeight: "600", color: "#60a5fa" } }, "Fix Details")), issue.resolutionNotes ? /* @__PURE__ */ React17.createElement(Text15, { style: { fontSize: 12, color: colors.textSecondary, marginBottom: 6, lineHeight: 17 } }, issue.resolutionNotes) : null, issue.fixCommitSha ? /* @__PURE__ */ React17.createElement(Text15, { style: { fontSize: 11, color: colors.textDim, fontFamily: "monospace" } }, "Commit: ", issue.fixCommitSha.slice(0, 7), issue.fixCommitMessage && ` \u2014 ${issue.fixCommitMessage}`) : null, issue.fixFilesChanged && issue.fixFilesChanged.length > 0 ? /* @__PURE__ */ React17.createElement(Text15, { style: { fontSize: 11, color: colors.textDim, marginTop: 4 } }, issue.fixFilesChanged.length, " file", issue.fixFilesChanged.length > 1 ? "s" : "", " changed") : null), issue.screenshotUrls && issue.screenshotUrls.length > 0 && /* @__PURE__ */ React17.createElement(View17, { style: styles5.screenshotSection }, /* @__PURE__ */ React17.createElement(Text15, { style: styles5.screenshotLabel }, "Screenshots (", issue.screenshotUrls.length, ")"), /* @__PURE__ */ React17.createElement(View17, { style: styles5.screenshotRow }, issue.screenshotUrls.map((url, i) => /* @__PURE__ */ React17.createElement(TouchableOpacity14, { key: i, onPress: () => Linking4.openURL(url), activeOpacity: 0.7 }, /* @__PURE__ */ React17.createElement(Image3, { source: { uri: url }, style: styles5.screenshotThumb }))))), /* @__PURE__ */ React17.createElement(View17, { style: styles5.metaSection }, issue.reporterName && /* @__PURE__ */ React17.createElement(Text15, { style: styles5.metaText }, "Reported by ", issue.reporterName), /* @__PURE__ */ React17.createElement(Text15, { style: styles5.metaTextSmall }, "Created ", formatRelativeTime(issue.createdAt), " ", "\xB7", " Updated ", formatRelativeTime(issue.updatedAt))), dashboardUrl && /* @__PURE__ */ React17.createElement(
18234
18259
  TouchableOpacity14,
18235
18260
  {
18236
18261
  style: styles5.dashboardLink,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/react-native",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "BugBear React Native components for mobile apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",