lazyreview 1.0.70 → 1.0.71

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.
Files changed (2) hide show
  1. package/dist/cli.js +1390 -795
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -9601,14 +9601,14 @@ var require_react_reconciler_production = __commonJS({
9601
9601
  }
9602
9602
  var exports2 = {};
9603
9603
  "use strict";
9604
- var React68 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
9604
+ var React70 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
9605
9605
  /* @__PURE__ */ Symbol.for("react.scope");
9606
9606
  var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
9607
9607
  /* @__PURE__ */ Symbol.for("react.legacy_hidden");
9608
9608
  /* @__PURE__ */ Symbol.for("react.tracing_marker");
9609
9609
  var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
9610
9610
  /* @__PURE__ */ Symbol.for("react.view_transition");
9611
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React68.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
9611
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React70.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
9612
9612
  $$$config.cloneMutableInstance;
9613
9613
  var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
9614
9614
  $$$config.cloneMutableTextInstance;
@@ -22201,14 +22201,14 @@ var require_react_reconciler_development = __commonJS({
22201
22201
  }
22202
22202
  var exports2 = {};
22203
22203
  "use strict";
22204
- var React68 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
22204
+ var React70 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
22205
22205
  /* @__PURE__ */ Symbol.for("react.scope");
22206
22206
  var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
22207
22207
  /* @__PURE__ */ Symbol.for("react.legacy_hidden");
22208
22208
  /* @__PURE__ */ Symbol.for("react.tracing_marker");
22209
22209
  var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
22210
22210
  /* @__PURE__ */ Symbol.for("react.view_transition");
22211
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React68.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
22211
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React70.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
22212
22212
  $$$config.cloneMutableInstance;
22213
22213
  var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
22214
22214
  $$$config.cloneMutableTextInstance;
@@ -24835,18 +24835,18 @@ var require_react_jsx_runtime_development = __commonJS({
24835
24835
  function isValidElement2(object3) {
24836
24836
  return "object" === typeof object3 && null !== object3 && object3.$$typeof === REACT_ELEMENT_TYPE;
24837
24837
  }
24838
- var React68 = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React68.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
24838
+ var React70 = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React70.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
24839
24839
  return null;
24840
24840
  };
24841
- React68 = {
24841
+ React70 = {
24842
24842
  react_stack_bottom_frame: function(callStackForError) {
24843
24843
  return callStackForError();
24844
24844
  }
24845
24845
  };
24846
24846
  var specialPropKeyWarningShown;
24847
24847
  var didWarnAboutElementRef = {};
24848
- var unknownOwnerDebugStack = React68.react_stack_bottom_frame.bind(
24849
- React68,
24848
+ var unknownOwnerDebugStack = React70.react_stack_bottom_frame.bind(
24849
+ React70,
24850
24850
  UnknownOwner
24851
24851
  )();
24852
24852
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
@@ -32537,7 +32537,7 @@ var require_core = __commonJS({
32537
32537
  return match15 && match15.index === 0;
32538
32538
  }
32539
32539
  var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
32540
- function join7(regexps, separator = "|") {
32540
+ function join8(regexps, separator = "|") {
32541
32541
  let numCaptures = 0;
32542
32542
  return regexps.map((regex2) => {
32543
32543
  numCaptures += 1;
@@ -32841,7 +32841,7 @@ var require_core = __commonJS({
32841
32841
  this.exec = () => null;
32842
32842
  }
32843
32843
  const terminators = this.regexes.map((el) => el[1]);
32844
- this.matcherRe = langRe(join7(terminators), true);
32844
+ this.matcherRe = langRe(join8(terminators), true);
32845
32845
  this.lastIndex = 0;
32846
32846
  }
32847
32847
  /** @param {string} s */
@@ -83064,7 +83064,7 @@ var measureElement = (node) => ({
83064
83064
  var measure_element_default = measureElement;
83065
83065
 
83066
83066
  // src/app.tsx
83067
- var import_react115 = __toESM(require_react(), 1);
83067
+ var import_react117 = __toESM(require_react(), 1);
83068
83068
 
83069
83069
  // node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/subscribable.js
83070
83070
  var Subscribable = class {
@@ -113962,6 +113962,30 @@ var KeybindingsSchema = Schema_exports.Struct({
113962
113962
  var GitLabConfigSchema = Schema_exports.Struct({
113963
113963
  host: Schema_exports.optionalWith(Schema_exports.String, { default: () => "https://gitlab.com" })
113964
113964
  });
113965
+ var GitHubConfigSchema = Schema_exports.Struct({
113966
+ hosts: Schema_exports.optionalWith(Schema_exports.Array(Schema_exports.String), { default: () => [] })
113967
+ });
113968
+ var HostMappingSchema = Schema_exports.Struct({
113969
+ host: Schema_exports.String,
113970
+ provider: Schema_exports.Union(
113971
+ Schema_exports.Literal("github"),
113972
+ Schema_exports.Literal("gitlab"),
113973
+ Schema_exports.Literal("bitbucket"),
113974
+ Schema_exports.Literal("azure"),
113975
+ Schema_exports.Literal("gitea")
113976
+ )
113977
+ });
113978
+ var GitLabProviderConfigSchema = Schema_exports.Struct({
113979
+ hosts: Schema_exports.optionalWith(Schema_exports.Array(Schema_exports.String), { default: () => [] })
113980
+ });
113981
+ var ProvidersConfigSchema = Schema_exports.Struct({
113982
+ github: Schema_exports.optionalWith(GitHubConfigSchema, {
113983
+ default: () => ({ hosts: [] })
113984
+ }),
113985
+ gitlab: Schema_exports.optionalWith(GitLabProviderConfigSchema, {
113986
+ default: () => ({ hosts: [] })
113987
+ })
113988
+ });
113965
113989
  var RecentRepoSchema = Schema_exports.Struct({
113966
113990
  owner: Schema_exports.String,
113967
113991
  repo: Schema_exports.String,
@@ -114019,6 +114043,15 @@ var AppConfig = class extends Schema_exports.Class("AppConfig")({
114019
114043
  }),
114020
114044
  notifyOnReviewRequest: Schema_exports.optionalWith(Schema_exports.Boolean, {
114021
114045
  default: () => true
114046
+ }),
114047
+ providers: Schema_exports.optionalWith(ProvidersConfigSchema, {
114048
+ default: () => ({
114049
+ github: { hosts: [] },
114050
+ gitlab: { hosts: [] }
114051
+ })
114052
+ }),
114053
+ hostMappings: Schema_exports.optionalWith(Schema_exports.Array(HostMappingSchema), {
114054
+ default: () => []
114022
114055
  })
114023
114056
  }) {
114024
114057
  };
@@ -127905,7 +127938,8 @@ var DEFAULT_KEYBINDINGS = {
127905
127938
  openInBrowser: "o",
127906
127939
  copyUrl: "y",
127907
127940
  editTitle: "T",
127908
- toggleDraft: "W"
127941
+ toggleDraft: "W",
127942
+ labels: "L"
127909
127943
  },
127910
127944
  conversations: {
127911
127945
  newComment: "c",
@@ -131659,7 +131693,9 @@ function resolveTokenInfo() {
131659
131693
  function getGitHubUser(token) {
131660
131694
  return Effect_exports.tryPromise({
131661
131695
  try: async () => {
131662
- const response = await fetch("https://api.github.com/user", {
131696
+ const baseUrl = getState().baseUrl ?? "https://api.github.com";
131697
+ const apiUrl = baseUrl.endsWith("/api/v3") ? baseUrl : baseUrl;
131698
+ const response = await fetch(`${apiUrl}/user`, {
131663
131699
  headers: {
131664
131700
  Authorization: `Bearer ${token}`,
131665
131701
  Accept: "application/vnd.github+json"
@@ -132147,7 +132183,7 @@ var ErrorBoundary2 = class extends import_react73.default.Component {
132147
132183
  };
132148
132184
 
132149
132185
  // src/screens/PRDetailScreen.tsx
132150
- var import_react95 = __toESM(require_react(), 1);
132186
+ var import_react97 = __toESM(require_react(), 1);
132151
132187
 
132152
132188
  // src/services/GitHubApiTypes.ts
132153
132189
  var GitHubApi = class extends Context_exports.Tag("GitHubApi")() {
@@ -132249,7 +132285,20 @@ function useTokenExpired() {
132249
132285
 
132250
132286
  // src/services/GitHubApiHelpers.ts
132251
132287
  var MAX_PAGES = 20;
132252
- var BASE_URL = "https://api.github.com";
132288
+ var DEFAULT_BASE_URL = "https://api.github.com";
132289
+ var DEFAULT_GRAPHQL_URL = "https://api.github.com/graphql";
132290
+ function getGitHubRestUrl(baseUrl) {
132291
+ return baseUrl ?? DEFAULT_BASE_URL;
132292
+ }
132293
+ function getGitHubGraphqlUrl(baseUrl) {
132294
+ if (!baseUrl || baseUrl === DEFAULT_BASE_URL) {
132295
+ return DEFAULT_GRAPHQL_URL;
132296
+ }
132297
+ if (baseUrl.endsWith("/api/v3")) {
132298
+ return baseUrl.replace(/\/api\/v3$/, "/api/graphql");
132299
+ }
132300
+ return `${baseUrl}/graphql`;
132301
+ }
132253
132302
  function parseRetryAfter(headers) {
132254
132303
  const retryAfter = headers.get("Retry-After");
132255
132304
  if (!retryAfter) return void 0;
@@ -132276,8 +132325,8 @@ var SearchResultSchema = Schema_exports.Struct({
132276
132325
  incomplete_results: Schema_exports.Boolean,
132277
132326
  items: Schema_exports.Array(PullRequest)
132278
132327
  });
132279
- function fetchGitHub(path, token, schema) {
132280
- const url3 = `${BASE_URL}${path}`;
132328
+ function fetchGitHub(path, token, schema, baseUrl) {
132329
+ const url3 = `${getGitHubRestUrl(baseUrl)}${path}`;
132281
132330
  const decode8 = Schema_exports.decodeUnknownSync(schema);
132282
132331
  return Effect_exports.tryPromise({
132283
132332
  try: async () => {
@@ -132306,8 +132355,8 @@ function fetchGitHub(path, token, schema) {
132306
132355
  }
132307
132356
  });
132308
132357
  }
132309
- function mutateGitHub(method, path, token, body) {
132310
- const url3 = `${BASE_URL}${path}`;
132358
+ function mutateGitHub(method, path, token, body, baseUrl) {
132359
+ const url3 = `${getGitHubRestUrl(baseUrl)}${path}`;
132311
132360
  return Effect_exports.tryPromise({
132312
132361
  try: async () => {
132313
132362
  const response = await fetch(url3, {
@@ -132336,8 +132385,8 @@ function mutateGitHub(method, path, token, body) {
132336
132385
  }
132337
132386
  });
132338
132387
  }
132339
- function mutateGitHubJson(method, path, token, body) {
132340
- const url3 = `${BASE_URL}${path}`;
132388
+ function mutateGitHubJson(method, path, token, body, baseUrl) {
132389
+ const url3 = `${getGitHubRestUrl(baseUrl)}${path}`;
132341
132390
  return Effect_exports.tryPromise({
132342
132391
  try: async () => {
132343
132392
  const response = await fetch(url3, {
@@ -132375,8 +132424,8 @@ function mutateGitHubJson(method, path, token, body) {
132375
132424
  }
132376
132425
  });
132377
132426
  }
132378
- function graphqlGitHub(token, query, variables) {
132379
- const url3 = "https://api.github.com/graphql";
132427
+ function graphqlGitHub(token, query, variables, baseUrl) {
132428
+ const url3 = getGitHubGraphqlUrl(baseUrl);
132380
132429
  return Effect_exports.tryPromise({
132381
132430
  try: async () => {
132382
132431
  const response = await fetch(url3, {
@@ -132433,12 +132482,12 @@ function parseLinkHeader(header) {
132433
132482
  }
132434
132483
  return null;
132435
132484
  }
132436
- function fetchGitHubPaginated(path, token, schema) {
132485
+ function fetchGitHubPaginated(path, token, schema, baseUrl) {
132437
132486
  const decode8 = Schema_exports.decodeUnknownSync(Schema_exports.Array(schema));
132438
132487
  return Effect_exports.tryPromise({
132439
132488
  try: async () => {
132440
132489
  const allItems = [];
132441
- let url3 = `${BASE_URL}${path}`;
132490
+ let url3 = `${getGitHubRestUrl(baseUrl)}${path}`;
132442
132491
  let pageCount = 0;
132443
132492
  if (!url3.includes("per_page=")) {
132444
132493
  url3 += url3.includes("?") ? "&per_page=100" : "?per_page=100";
@@ -132475,12 +132524,13 @@ function fetchGitHubPaginated(path, token, schema) {
132475
132524
  }
132476
132525
  });
132477
132526
  }
132478
- function fetchGitHubSearchPaginated(query, token) {
132527
+ function fetchGitHubSearchPaginated(query, token, baseUrl) {
132479
132528
  const decode8 = Schema_exports.decodeUnknownSync(SearchResultSchema);
132480
132529
  return Effect_exports.tryPromise({
132481
132530
  try: async () => {
132482
132531
  const allItems = [];
132483
- let url3 = `${BASE_URL}/search/issues?q=${encodeURIComponent(query)}&per_page=100`;
132532
+ const restBase = getGitHubRestUrl(baseUrl);
132533
+ let url3 = `${restBase}/search/issues?q=${encodeURIComponent(query)}&per_page=100`;
132484
132534
  let pageCount = 0;
132485
132535
  while (url3 && pageCount < MAX_PAGES) {
132486
132536
  pageCount++;
@@ -133141,6 +133191,34 @@ var GitHubApiLive = Layer_exports.effect(
133141
133191
  { pullRequestId: nodeId }
133142
133192
  );
133143
133193
  }),
133194
+ getLabels: (owner, repo) => Effect_exports.gen(function* () {
133195
+ validateOwner(owner);
133196
+ validateRepo(repo);
133197
+ const token = yield* auth.getToken();
133198
+ return yield* fetchGitHubPaginated(
133199
+ `/repos/${owner}/${repo}/labels`,
133200
+ token,
133201
+ Schema_exports.Struct({
133202
+ id: Schema_exports.Number,
133203
+ name: Schema_exports.String,
133204
+ color: Schema_exports.String,
133205
+ description: Schema_exports.NullOr(Schema_exports.String),
133206
+ default: Schema_exports.optionalWith(Schema_exports.Boolean, { default: () => false })
133207
+ })
133208
+ );
133209
+ }),
133210
+ setLabels: (owner, repo, prNumber, labels) => Effect_exports.gen(function* () {
133211
+ validateOwner(owner);
133212
+ validateRepo(repo);
133213
+ validateNumber(prNumber);
133214
+ const token = yield* auth.getToken();
133215
+ yield* mutateGitHub(
133216
+ "PUT",
133217
+ `/repos/${owner}/${repo}/issues/${prNumber}/labels`,
133218
+ token,
133219
+ { labels: [...labels] }
133220
+ );
133221
+ }),
133144
133222
  getCurrentUser: () => Effect_exports.gen(function* () {
133145
133223
  const token = yield* auth.getToken();
133146
133224
  return yield* fetchGitHub(
@@ -133345,6 +133423,13 @@ var useMarkReadyForReview = createGitHubMutation({
133345
133423
  ...invalidatePRLists()
133346
133424
  ]
133347
133425
  });
133426
+ var useSetLabels = createGitHubMutation({
133427
+ effect: (api, p) => api.setLabels(p.owner, p.repo, p.prNumber, p.labels),
133428
+ invalidateKeys: (p) => [
133429
+ ["pr", p.owner, p.repo, p.prNumber],
133430
+ ...invalidatePRLists()
133431
+ ]
133432
+ });
133348
133433
 
133349
133434
  // src/hooks/useGitHub.ts
133350
133435
  function usePullRequests(owner, repo, options) {
@@ -133544,6 +133629,21 @@ function useCurrentUser() {
133544
133629
  staleTime: Infinity
133545
133630
  });
133546
133631
  }
133632
+ function useRepoLabels(owner, repo, options) {
133633
+ const enabledFlag = options?.enabled ?? true;
133634
+ return useQuery({
133635
+ queryKey: ["repo-labels", owner, repo],
133636
+ queryFn: () => runEffect(
133637
+ Effect_exports.gen(function* () {
133638
+ const api = yield* CodeReviewApi;
133639
+ return yield* api.getLabels(owner, repo);
133640
+ })
133641
+ ),
133642
+ enabled: enabledFlag && !!owner && !!repo,
133643
+ staleTime: 5 * 60 * 1e3
133644
+ // 5 minutes - labels don't change often
133645
+ });
133646
+ }
133547
133647
 
133548
133648
  // src/hooks/useReviewActions.ts
133549
133649
  var import_react75 = __toESM(require_react(), 1);
@@ -135687,8 +135787,18 @@ function deriveScrollOffset(selectedIndex, viewportHeight, itemCount) {
135687
135787
  return offset;
135688
135788
  }
135689
135789
 
135690
- // src/components/common/MarkdownText.tsx
135691
- var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
135790
+ // src/components/common/markdown-parser.ts
135791
+ function isTableSeparator(line) {
135792
+ return /^\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/.test(line.trim());
135793
+ }
135794
+ function isTableStart(allLines, index) {
135795
+ return allLines[index].includes("|") && index + 1 < allLines.length && isTableSeparator(allLines[index + 1]);
135796
+ }
135797
+ function computeIndentLevel(line) {
135798
+ const indentMatch = line.match(/^(\s*)/);
135799
+ const indent = indentMatch ? indentMatch[1].length : 0;
135800
+ return Math.floor(indent / 2);
135801
+ }
135692
135802
  function parseBlocks(text) {
135693
135803
  const lines = text.split("\n");
135694
135804
  const blocks = [];
@@ -135732,22 +135842,54 @@ function parseBlocks(text) {
135732
135842
  blocks.push({ type: "blockquote", lines: quoteLines });
135733
135843
  continue;
135734
135844
  }
135845
+ if (line.includes("|") && i + 1 < lines.length && isTableSeparator(lines[i + 1])) {
135846
+ const tableLines = [];
135847
+ while (i < lines.length && lines[i].includes("|")) {
135848
+ tableLines.push(lines[i]);
135849
+ i++;
135850
+ }
135851
+ blocks.push({ type: "table", lines: tableLines });
135852
+ continue;
135853
+ }
135854
+ if (/^\s*[-*+]\s\[[ xX]]\s/.test(line)) {
135855
+ const taskLines = [];
135856
+ while (i < lines.length && /^\s*[-*+]\s\[[ xX]]\s/.test(lines[i])) {
135857
+ taskLines.push(lines[i].replace(/^\s*[-*+]\s/, ""));
135858
+ i++;
135859
+ }
135860
+ blocks.push({ type: "tasklist", lines: taskLines });
135861
+ continue;
135862
+ }
135735
135863
  if (/^\s*[-*+]\s/.test(line)) {
135736
135864
  const listLines = [];
135865
+ const indentLevels = [];
135737
135866
  while (i < lines.length && /^\s*[-*+]\s/.test(lines[i])) {
135867
+ indentLevels.push(computeIndentLevel(lines[i]));
135738
135868
  listLines.push(lines[i].replace(/^\s*[-*+]\s/, ""));
135739
135869
  i++;
135740
135870
  }
135741
- blocks.push({ type: "list", ordered: false, lines: listLines });
135871
+ blocks.push({
135872
+ type: "list",
135873
+ ordered: false,
135874
+ lines: listLines,
135875
+ indentLevels
135876
+ });
135742
135877
  continue;
135743
135878
  }
135744
135879
  if (/^\s*\d+\.\s/.test(line)) {
135745
135880
  const listLines = [];
135881
+ const indentLevels = [];
135746
135882
  while (i < lines.length && /^\s*\d+\.\s/.test(lines[i])) {
135883
+ indentLevels.push(computeIndentLevel(lines[i]));
135747
135884
  listLines.push(lines[i].replace(/^\s*\d+\.\s/, ""));
135748
135885
  i++;
135749
135886
  }
135750
- blocks.push({ type: "list", ordered: true, lines: listLines });
135887
+ blocks.push({
135888
+ type: "list",
135889
+ ordered: true,
135890
+ lines: listLines,
135891
+ indentLevels
135892
+ });
135751
135893
  continue;
135752
135894
  }
135753
135895
  if (line.trim() === "") {
@@ -135755,7 +135897,7 @@ function parseBlocks(text) {
135755
135897
  continue;
135756
135898
  }
135757
135899
  const paraLines = [];
135758
- while (i < lines.length && lines[i].trim() !== "" && !lines[i].startsWith("#") && !lines[i].startsWith("```") && !lines[i].startsWith(">") && !/^\s*[-*+]\s/.test(lines[i]) && !/^\s*\d+\.\s/.test(lines[i]) && !/^[-*_]{3,}\s*$/.test(lines[i])) {
135900
+ while (i < lines.length && lines[i].trim() !== "" && !lines[i].startsWith("#") && !lines[i].startsWith("```") && !lines[i].startsWith(">") && !/^\s*[-*+]\s/.test(lines[i]) && !/^\s*\d+\.\s/.test(lines[i]) && !/^[-*_]{3,}\s*$/.test(lines[i]) && !isTableStart(lines, i)) {
135759
135901
  paraLines.push(lines[i]);
135760
135902
  i++;
135761
135903
  }
@@ -135765,6 +135907,28 @@ function parseBlocks(text) {
135765
135907
  }
135766
135908
  return blocks;
135767
135909
  }
135910
+ function parseTaskList(lines) {
135911
+ const items = lines.map((line) => {
135912
+ const checked = /^\[x]/i.test(line);
135913
+ const text = line.replace(/^\[[ xX]]\s?/, "");
135914
+ return { checked, text };
135915
+ });
135916
+ const completed = items.filter((item) => item.checked).length;
135917
+ return { completed, total: items.length, items };
135918
+ }
135919
+ function parseTable(lines) {
135920
+ if (lines.length === 0) {
135921
+ return { headers: [], rows: [], columnWidths: [] };
135922
+ }
135923
+ const parseCells = (line) => line.split("|").map((cell) => cell.trim()).filter((cell) => cell.length > 0);
135924
+ const headers = parseCells(lines[0]);
135925
+ const rows = lines.slice(2).map(parseCells);
135926
+ const columnWidths = headers.map((header, colIdx) => {
135927
+ const dataWidths = rows.map((row) => (row[colIdx] ?? "").length);
135928
+ return Math.max(header.length, ...dataWidths);
135929
+ });
135930
+ return { headers, rows, columnWidths };
135931
+ }
135768
135932
  function parseInline(text) {
135769
135933
  const segments = [];
135770
135934
  let remaining = text;
@@ -135775,6 +135939,12 @@ function parseInline(text) {
135775
135939
  remaining = remaining.slice(codeMatch[0].length);
135776
135940
  continue;
135777
135941
  }
135942
+ const strikeMatch = remaining.match(/^~~(.+?)~~/);
135943
+ if (strikeMatch) {
135944
+ segments.push({ type: "strikethrough", text: strikeMatch[1] });
135945
+ remaining = remaining.slice(strikeMatch[0].length);
135946
+ continue;
135947
+ }
135778
135948
  const boldMatch = remaining.match(/^(\*\*|__)(.+?)\1/);
135779
135949
  if (boldMatch) {
135780
135950
  segments.push({ type: "bold", text: boldMatch[2] });
@@ -135787,13 +135957,23 @@ function parseInline(text) {
135787
135957
  remaining = remaining.slice(italicMatch[0].length);
135788
135958
  continue;
135789
135959
  }
135960
+ const imageMatch = remaining.match(/^!\[([^\]]*)]\(([^)]+)\)/);
135961
+ if (imageMatch) {
135962
+ segments.push({
135963
+ type: "image",
135964
+ text: imageMatch[1],
135965
+ url: imageMatch[2]
135966
+ });
135967
+ remaining = remaining.slice(imageMatch[0].length);
135968
+ continue;
135969
+ }
135790
135970
  const linkMatch = remaining.match(/^\[([^\]]+)]\(([^)]+)\)/);
135791
135971
  if (linkMatch) {
135792
135972
  segments.push({ type: "link", text: linkMatch[1], url: linkMatch[2] });
135793
135973
  remaining = remaining.slice(linkMatch[0].length);
135794
135974
  continue;
135795
135975
  }
135796
- const nextSpecial = remaining.search(/[`*_\[]/);
135976
+ const nextSpecial = remaining.search(/[`*_\[!~]/);
135797
135977
  if (nextSpecial === -1) {
135798
135978
  segments.push({ type: "text", text: remaining });
135799
135979
  break;
@@ -135808,6 +135988,9 @@ function parseInline(text) {
135808
135988
  }
135809
135989
  return segments;
135810
135990
  }
135991
+
135992
+ // src/components/common/MarkdownText.tsx
135993
+ var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
135811
135994
  function InlineContent({ text }) {
135812
135995
  const theme14 = useTheme();
135813
135996
  const segments = parseInline(text);
@@ -135821,65 +136004,107 @@ function InlineContent({ text }) {
135821
136004
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.accent, inverse: true, children: ` ${seg.text} ` }, i);
135822
136005
  case "link":
135823
136006
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.info, underline: true, children: seg.text }, i);
136007
+ case "strikethrough":
136008
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, dimColor: true, strikethrough: true, children: seg.text }, i);
136009
+ case "image":
136010
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, italic: true, children: seg.text ? `[img: ${seg.text}]` : "[img]" }, i);
135824
136011
  default:
135825
136012
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.text, children: seg.text }, i);
135826
136013
  }
135827
136014
  }) });
135828
136015
  }
136016
+ function BlockRenderer({
136017
+ block
136018
+ }) {
136019
+ const theme14 = useTheme();
136020
+ switch (block.type) {
136021
+ case "heading": {
136022
+ const isH1 = block.level === 1;
136023
+ const isH2 = block.level === 2;
136024
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
136025
+ Text,
136026
+ {
136027
+ bold: true,
136028
+ color: isH1 || isH2 ? theme14.colors.accent : theme14.colors.secondary,
136029
+ underline: isH1,
136030
+ children: block.lines[0]
136031
+ }
136032
+ );
136033
+ }
136034
+ case "code":
136035
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
136036
+ Box_default,
136037
+ {
136038
+ flexDirection: "column",
136039
+ borderStyle: "single",
136040
+ borderColor: theme14.colors.border,
136041
+ paddingX: 1,
136042
+ children: [
136043
+ block.language && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: block.language }),
136044
+ block.lines.map((line, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.text, children: line }, j))
136045
+ ]
136046
+ }
136047
+ );
136048
+ case "blockquote":
136049
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { paddingLeft: 1, children: [
136050
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.border, children: "| " }),
136051
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", children: block.lines.map((line, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: line }, j)) })
136052
+ ] });
136053
+ case "list":
136054
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", paddingLeft: 1, children: block.lines.map((line, j) => {
136055
+ const indent = block.indentLevels?.[j] ?? 0;
136056
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, paddingLeft: indent * 2, children: [
136057
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, children: block.ordered ? `${j + 1}.` : "-" }),
136058
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: line })
136059
+ ] }, j);
136060
+ }) });
136061
+ case "tasklist": {
136062
+ const taskResult = parseTaskList(block.lines);
136063
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
136064
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.info, bold: true, children: `Tasks: ${taskResult.completed}/${taskResult.total} complete` }),
136065
+ taskResult.items.map((item, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, children: [
136066
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
136067
+ Text,
136068
+ {
136069
+ color: item.checked ? theme14.colors.success : theme14.colors.muted,
136070
+ children: item.checked ? "[x]" : "[ ]"
136071
+ }
136072
+ ),
136073
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
136074
+ Text,
136075
+ {
136076
+ color: item.checked ? theme14.colors.muted : theme14.colors.text,
136077
+ dimColor: item.checked,
136078
+ children: item.text
136079
+ }
136080
+ )
136081
+ ] }, j))
136082
+ ] });
136083
+ }
136084
+ case "table": {
136085
+ const tableResult = parseTable(block.lines);
136086
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
136087
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: tableResult.headers.map((h, ci) => h.padEnd(tableResult.columnWidths[ci] ?? 0)).join(" | ") }),
136088
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.border, children: tableResult.columnWidths.map((w) => "-".repeat(w)).join("-+-") }),
136089
+ tableResult.rows.map((row, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.text, children: row.map(
136090
+ (cell, ci) => cell.padEnd(tableResult.columnWidths[ci] ?? 0)
136091
+ ).join(" | ") }, j))
136092
+ ] });
136093
+ }
136094
+ case "hr":
136095
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.border, children: "\u2500".repeat(40) });
136096
+ case "paragraph":
136097
+ default:
136098
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: block.lines.join(" ") }) });
136099
+ }
136100
+ }
135829
136101
  function MarkdownText({ content }) {
135830
136102
  const theme14 = useTheme();
135831
136103
  if (!content || content.trim() === "") {
135832
136104
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, italic: true, children: "No description provided." });
135833
136105
  }
135834
136106
  const blocks = parseBlocks(stripAnsi2(content));
135835
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", gap: 1, children: blocks.map((block, i) => {
135836
- switch (block.type) {
135837
- case "heading": {
135838
- const isH1 = block.level === 1;
135839
- const isH2 = block.level === 2;
135840
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
135841
- Text,
135842
- {
135843
- bold: true,
135844
- color: isH1 || isH2 ? theme14.colors.accent : theme14.colors.secondary,
135845
- underline: isH1,
135846
- children: block.lines[0]
135847
- },
135848
- i
135849
- );
135850
- }
135851
- case "code":
135852
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
135853
- Box_default,
135854
- {
135855
- flexDirection: "column",
135856
- borderStyle: "single",
135857
- borderColor: theme14.colors.border,
135858
- paddingX: 1,
135859
- children: [
135860
- block.language && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: block.language }),
135861
- block.lines.map((line, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.text, children: line }, j))
135862
- ]
135863
- },
135864
- i
135865
- );
135866
- case "blockquote":
135867
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { paddingLeft: 1, children: [
135868
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.border, children: "| " }),
135869
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", children: block.lines.map((line, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: line }, j)) })
135870
- ] }, i);
135871
- case "list":
135872
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", paddingLeft: 1, children: block.lines.map((line, j) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, children: [
135873
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.muted, children: block.ordered ? `${j + 1}.` : "-" }),
135874
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: line })
135875
- ] }, j)) }, i);
135876
- case "hr":
135877
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme14.colors.border, children: "\u2500".repeat(40) }, i);
135878
- case "paragraph":
135879
- default:
135880
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InlineContent, { text: block.lines.join(" ") }) }, i);
135881
- }
135882
- }) });
136107
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexDirection: "column", gap: 1, children: blocks.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BlockRenderer, { block }, i)) });
135883
136108
  }
135884
136109
 
135885
136110
  // src/components/pr/ReviewSummary.tsx
@@ -136068,7 +136293,7 @@ function DescriptionTab({
136068
136293
  }
136069
136294
 
136070
136295
  // src/components/pr/FilesTab.tsx
136071
- var import_react85 = __toESM(require_react(), 1);
136296
+ var import_react86 = __toESM(require_react(), 1);
136072
136297
 
136073
136298
  // src/hooks/useViewedFiles.ts
136074
136299
  var import_react81 = __toESM(require_react(), 1);
@@ -137613,8 +137838,92 @@ function FileItem({
137613
137838
  ] });
137614
137839
  }
137615
137840
 
137616
- // src/components/pr/FilesTab.tsx
137841
+ // src/components/pr/DiffStatsSummary.tsx
137842
+ var import_react85 = __toESM(require_react(), 1);
137617
137843
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
137844
+ function computeDiffStats(files) {
137845
+ let totalAdditions = 0;
137846
+ let totalDeletions = 0;
137847
+ for (const file2 of files) {
137848
+ totalAdditions += file2.additions;
137849
+ totalDeletions += file2.deletions;
137850
+ }
137851
+ return {
137852
+ totalFiles: files.length,
137853
+ totalAdditions,
137854
+ totalDeletions
137855
+ };
137856
+ }
137857
+ function getFileExtension(filename) {
137858
+ const basename = filename.split("/").pop() ?? filename;
137859
+ const dotIndex = basename.lastIndexOf(".");
137860
+ if (dotIndex <= 0) return "(no ext)";
137861
+ return basename.slice(dotIndex);
137862
+ }
137863
+ function getExtensionBreakdown(files) {
137864
+ if (files.length === 0) return [];
137865
+ const counts = /* @__PURE__ */ new Map();
137866
+ for (const file2 of files) {
137867
+ const ext = getFileExtension(file2.filename);
137868
+ counts.set(ext, (counts.get(ext) ?? 0) + 1);
137869
+ }
137870
+ return [...counts.entries()].map(([ext, count]) => ({ ext, count })).sort((a, b) => b.count - a.count);
137871
+ }
137872
+ function getTopFilesByChanges(files, n) {
137873
+ if (files.length === 0) return [];
137874
+ return [...files].map((f) => ({
137875
+ filename: f.filename.split("/").pop() ?? f.filename,
137876
+ totalChanges: f.additions + f.deletions
137877
+ })).sort((a, b) => b.totalChanges - a.totalChanges).slice(0, n);
137878
+ }
137879
+ function formatExtensionBreakdown(breakdown) {
137880
+ if (breakdown.length === 0) return "";
137881
+ return breakdown.map((e) => `${e.count} ${e.ext}`).join(", ");
137882
+ }
137883
+ function formatTopFiles(top) {
137884
+ if (top.length === 0) return "";
137885
+ return top.map((f) => `${f.filename} (${f.totalChanges})`).join(", ");
137886
+ }
137887
+ function DiffStatsSummary({
137888
+ files
137889
+ }) {
137890
+ const theme14 = useTheme();
137891
+ const stats = (0, import_react85.useMemo)(() => computeDiffStats(files), [files]);
137892
+ const extensionBreakdown = (0, import_react85.useMemo)(
137893
+ () => getExtensionBreakdown(files),
137894
+ [files]
137895
+ );
137896
+ const topFiles = (0, import_react85.useMemo)(() => getTopFilesByChanges(files, 3), [files]);
137897
+ if (files.length === 0) return null;
137898
+ const extText = formatExtensionBreakdown(extensionBreakdown);
137899
+ const topText = formatTopFiles(topFiles);
137900
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { gap: 1, flexWrap: "nowrap", children: [
137901
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.accent, bold: true, children: [
137902
+ stats.totalFiles,
137903
+ " files"
137904
+ ] }),
137905
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.success, children: [
137906
+ "+",
137907
+ stats.totalAdditions
137908
+ ] }),
137909
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.error, children: [
137910
+ "-",
137911
+ stats.totalDeletions
137912
+ ] }),
137913
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
137914
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.text, wrap: "truncate-end", children: extText }),
137915
+ topText && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
137916
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
137917
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.muted, wrap: "truncate-end", children: [
137918
+ "Top: ",
137919
+ topText
137920
+ ] })
137921
+ ] })
137922
+ ] }) });
137923
+ }
137924
+
137925
+ // src/components/pr/FilesTab.tsx
137926
+ var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
137618
137927
  function fuzzyMatch(filename, query) {
137619
137928
  const lower = filename.toLowerCase();
137620
137929
  const q = query.toLowerCase();
@@ -137643,18 +137952,18 @@ function FilesTab({
137643
137952
  const { setInputActive } = useInputFocus();
137644
137953
  const { markViewed, toggleViewed, isViewed, getViewedCount } = useViewedFiles();
137645
137954
  const viewportHeight = Math.max(1, (stdout?.rows ?? 24) - 13);
137646
- const FILES_TREE_HEADER_LINES = 4;
137955
+ const FILES_TREE_HEADER_LINES = 5;
137647
137956
  const treeViewportMaxHeight = Math.max(
137648
137957
  1,
137649
137958
  (stdout?.rows ?? 24) - 18 - FILES_TREE_HEADER_LINES
137650
137959
  );
137651
- const [focusPanel, setFocusPanel] = (0, import_react85.useState)("tree");
137652
- const [selectedFileIndex, setSelectedFileIndex] = (0, import_react85.useState)(0);
137653
- const [diffMode, setDiffMode] = (0, import_react85.useState)("unified");
137960
+ const [focusPanel, setFocusPanel] = (0, import_react86.useState)("tree");
137961
+ const [selectedFileIndex, setSelectedFileIndex] = (0, import_react86.useState)(0);
137962
+ const [diffMode, setDiffMode] = (0, import_react86.useState)("unified");
137654
137963
  const visual = useVisualSelect();
137655
- const containerRef = (0, import_react85.useRef)(null);
137656
- const [measuredWidth, setMeasuredWidth] = (0, import_react85.useState)(0);
137657
- import_react85.default.useEffect(() => {
137964
+ const containerRef = (0, import_react86.useRef)(null);
137965
+ const [measuredWidth, setMeasuredWidth] = (0, import_react86.useState)(0);
137966
+ import_react86.default.useEffect(() => {
137658
137967
  if (containerRef.current) {
137659
137968
  const { width } = measure_element_default(containerRef.current);
137660
137969
  setMeasuredWidth((prev) => prev === width ? prev : width);
@@ -137664,27 +137973,27 @@ function FilesTab({
137664
137973
  const containerWidth = measuredWidth > 0 ? measuredWidth : terminalWidth;
137665
137974
  const effectiveDiffMode = diffMode === "side-by-side" && containerWidth < SIDE_BY_SIDE_MIN_WIDTH ? "unified" : diffMode;
137666
137975
  const crossFileSearch = useCrossFileSearch(files);
137667
- const [isFiltering, setIsFiltering] = (0, import_react85.useState)(false);
137668
- const [filterQuery, setFilterQuery] = (0, import_react85.useState)("");
137669
- const [activeFilter, setActiveFilter] = (0, import_react85.useState)("");
137670
- const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react85.useState)(0);
137976
+ const [isFiltering, setIsFiltering] = (0, import_react86.useState)(false);
137977
+ const [filterQuery, setFilterQuery] = (0, import_react86.useState)("");
137978
+ const [activeFilter, setActiveFilter] = (0, import_react86.useState)("");
137979
+ const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react86.useState)(0);
137671
137980
  const treePanelWidth = Math.max(32, Math.floor(containerWidth * 0.3));
137672
137981
  const diffContentWidth = Math.max(10, containerWidth - treePanelWidth - 8);
137673
- const filteredFiles = (0, import_react85.useMemo)(() => {
137982
+ const filteredFiles = (0, import_react86.useMemo)(() => {
137674
137983
  if (!activeFilter && !isFiltering) return files;
137675
137984
  const query = isFiltering ? filterQuery : activeFilter;
137676
137985
  if (!query) return files;
137677
137986
  return files.filter((f) => fuzzyMatch(f.filename, query));
137678
137987
  }, [files, activeFilter, filterQuery, isFiltering]);
137679
- const filteredTree = (0, import_react85.useMemo)(
137988
+ const filteredTree = (0, import_react86.useMemo)(
137680
137989
  () => buildFileTree(filteredFiles),
137681
137990
  [filteredFiles]
137682
137991
  );
137683
- const fileOrder = (0, import_react85.useMemo)(
137992
+ const fileOrder = (0, import_react86.useMemo)(
137684
137993
  () => flattenTreeToFiles(filteredTree),
137685
137994
  [filteredTree]
137686
137995
  );
137687
- const displayRows = (0, import_react85.useMemo)(
137996
+ const displayRows = (0, import_react86.useMemo)(
137688
137997
  () => buildDisplayRows(filteredTree, 0, { current: 0 }),
137689
137998
  [filteredTree]
137690
137999
  );
@@ -137710,12 +138019,12 @@ function FilesTab({
137710
138019
  treeScrollOffset,
137711
138020
  treeScrollOffset + treeViewportHeight
137712
138021
  );
137713
- import_react85.default.useEffect(() => {
138022
+ import_react86.default.useEffect(() => {
137714
138023
  if (isActive2) {
137715
138024
  setScreenContext(focusPanel === "tree" ? "pr-detail-files-tree" : "pr-detail-files-diff");
137716
138025
  }
137717
138026
  }, [focusPanel, isActive2]);
137718
- import_react85.default.useEffect(() => {
138027
+ import_react86.default.useEffect(() => {
137719
138028
  if (focusPanel === "tree") {
137720
138029
  setSelectedFileIndex(treeSelectedIndex);
137721
138030
  }
@@ -137723,43 +138032,43 @@ function FilesTab({
137723
138032
  const selectedFile = fileOrder[selectedFileIndex] ?? fileOrder[0] ?? null;
137724
138033
  const selectedFilename = selectedFile?.filename ?? null;
137725
138034
  const selectedPatch = selectedFile?.patch ?? null;
137726
- const hunks = (0, import_react85.useMemo)(
138035
+ const hunks = (0, import_react86.useMemo)(
137727
138036
  () => selectedPatch ? parseDiffPatch(selectedPatch) : [],
137728
138037
  [selectedPatch]
137729
138038
  );
137730
- const commentIdKey = (0, import_react85.useMemo)(() => {
138039
+ const commentIdKey = (0, import_react86.useMemo)(() => {
137731
138040
  if (!comments || comments.length === 0 || !selectedFilename) return "";
137732
138041
  const fileComments = comments.filter((c) => c.path === selectedFilename);
137733
138042
  const ids3 = fileComments.map((c) => `${c.id}:${c.body.length}`).join(",");
137734
138043
  const threadIds = reviewThreads ? reviewThreads.map((t) => `${t.id}:${t.isResolved ? 1 : 0}`).join(",") : "";
137735
138044
  return `${ids3}|${threadIds}`;
137736
138045
  }, [comments, reviewThreads, selectedFilename]);
137737
- const commentsByLine = (0, import_react85.useMemo)(
138046
+ const commentsByLine = (0, import_react86.useMemo)(
137738
138047
  () => buildCommentsByLine(comments, reviewThreads, selectedFilename ?? void 0),
137739
138048
  // eslint-disable-next-line react-hooks/exhaustive-deps
137740
138049
  [commentIdKey, selectedFilename]
137741
138050
  );
137742
- const allRows = (0, import_react85.useMemo)(
138051
+ const allRows = (0, import_react86.useMemo)(
137743
138052
  () => buildDiffRows(hunks, commentsByLine),
137744
138053
  [hunks, commentsByLine]
137745
138054
  );
137746
- const sideBySideRows = (0, import_react85.useMemo)(
138055
+ const sideBySideRows = (0, import_react86.useMemo)(
137747
138056
  () => effectiveDiffMode === "side-by-side" ? buildSideBySideRows(hunks, commentsByLine) : [],
137748
138057
  [hunks, effectiveDiffMode, commentsByLine]
137749
138058
  );
137750
138059
  const totalDiffLines = effectiveDiffMode === "side-by-side" ? sideBySideRows.length : allRows.length;
137751
138060
  const search = useDiffSearch(effectiveDiffMode, allRows, sideBySideRows);
137752
- import_react85.default.useEffect(() => {
138061
+ import_react86.default.useEffect(() => {
137753
138062
  setDiffScrollOffsetX(0);
137754
138063
  search.resetOnFileChange();
137755
138064
  }, [selectedFileIndex]);
137756
- import_react85.default.useEffect(() => {
138065
+ import_react86.default.useEffect(() => {
137757
138066
  const file2 = fileOrder[selectedFileIndex];
137758
138067
  if (file2 && prUrl) {
137759
138068
  markViewed(prUrl, file2.filename);
137760
138069
  }
137761
138070
  }, [selectedFileIndex, fileOrder, prUrl, markViewed]);
137762
- import_react85.default.useEffect(() => {
138071
+ import_react86.default.useEffect(() => {
137763
138072
  if (!initialFile) return;
137764
138073
  const targetIndex = fileOrder.findIndex((f) => f.filename === initialFile);
137765
138074
  if (targetIndex >= 0) {
@@ -137768,7 +138077,7 @@ function FilesTab({
137768
138077
  }
137769
138078
  onInitialFileConsumed?.();
137770
138079
  }, [initialFile, fileOrder, onInitialFileConsumed]);
137771
- const maxDiffLineLength = (0, import_react85.useMemo)(
138080
+ const maxDiffLineLength = (0, import_react86.useMemo)(
137772
138081
  () => computeMaxDiffLineLength(allRows),
137773
138082
  [allRows]
137774
138083
  );
@@ -137776,7 +138085,7 @@ function FilesTab({
137776
138085
  10,
137777
138086
  Math.floor((diffContentWidth - 1) / 2)
137778
138087
  );
137779
- const maxDiffLineLengthSbs = (0, import_react85.useMemo)(
138088
+ const maxDiffLineLengthSbs = (0, import_react86.useMemo)(
137780
138089
  () => computeMaxSbsLineLength(sideBySideRows),
137781
138090
  [sideBySideRows]
137782
138091
  );
@@ -137826,11 +138135,11 @@ function FilesTab({
137826
138135
  currentUser
137827
138136
  });
137828
138137
  if (files.length === 0) {
137829
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EmptyState, { message: "No files changed" });
138138
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(EmptyState, { message: "No files changed" });
137830
138139
  }
137831
138140
  const isPanelFocused = focusPanel === "tree" && isActive2;
137832
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { ref: containerRef, flexDirection: "row", flexGrow: 1, children: [
137833
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
138141
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { ref: containerRef, flexDirection: "row", flexGrow: 1, children: [
138142
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
137834
138143
  Box_default,
137835
138144
  {
137836
138145
  flexDirection: "column",
@@ -137841,24 +138150,25 @@ function FilesTab({
137841
138150
  borderStyle: "single",
137842
138151
  borderColor: focusPanel === "tree" && isActive2 ? theme14.colors.accent : theme14.colors.border,
137843
138152
  children: [
137844
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, children: [
137845
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Files" }),
137846
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.muted, children: activeFilter || isFiltering ? `(${filteredFiles.length} of ${files.length})` : `(${files.length})` }),
137847
- prUrl && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.success, children: [
138153
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, children: [
138154
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Files" }),
138155
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.muted, children: activeFilter || isFiltering ? `(${filteredFiles.length} of ${files.length})` : `(${files.length})` }),
138156
+ prUrl && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.success, children: [
137848
138157
  getViewedCount(prUrl),
137849
138158
  "/",
137850
138159
  files.length,
137851
138160
  " viewed"
137852
138161
  ] }),
137853
- activeFilter && !isFiltering && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.warning, children: [
138162
+ activeFilter && !isFiltering && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.warning, children: [
137854
138163
  "[/",
137855
138164
  activeFilter,
137856
138165
  "]"
137857
138166
  ] })
137858
138167
  ] }),
137859
- isFiltering && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { paddingX: 1, children: [
137860
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.accent, children: "/" }),
137861
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138168
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DiffStatsSummary, { files }),
138169
+ isFiltering && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingX: 1, children: [
138170
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.accent, children: "/" }),
138171
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137862
138172
  TextInput,
137863
138173
  {
137864
138174
  defaultValue: filterQuery,
@@ -137867,7 +138177,7 @@ function FilesTab({
137867
138177
  }
137868
138178
  )
137869
138179
  ] }),
137870
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138180
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137871
138181
  Box_default,
137872
138182
  {
137873
138183
  flexDirection: "column",
@@ -137880,27 +138190,27 @@ function FilesTab({
137880
138190
  flexShrink: 1,
137881
138191
  children: visibleRows.map((row, i) => {
137882
138192
  const rowIndex = treeScrollOffset + i;
137883
- return row.type === "dir" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138193
+ return row.type === "dir" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137884
138194
  Box_default,
137885
138195
  {
137886
138196
  width: "100%",
137887
138197
  minWidth: 0,
137888
138198
  overflow: "hidden",
137889
138199
  paddingLeft: row.indent * 2,
137890
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { wrap: "truncate-end", color: theme14.colors.muted, children: [
138200
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { wrap: "truncate-end", color: theme14.colors.muted, children: [
137891
138201
  row.name,
137892
138202
  "/"
137893
138203
  ] })
137894
138204
  },
137895
138205
  `row-${rowIndex}`
137896
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138206
+ ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137897
138207
  Box_default,
137898
138208
  {
137899
138209
  width: "100%",
137900
138210
  minWidth: 0,
137901
138211
  overflow: "hidden",
137902
138212
  paddingLeft: row.indent * 2,
137903
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138213
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137904
138214
  FileItem,
137905
138215
  {
137906
138216
  item: row.file,
@@ -137918,7 +138228,7 @@ function FilesTab({
137918
138228
  ]
137919
138229
  }
137920
138230
  ),
137921
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
138231
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
137922
138232
  Box_default,
137923
138233
  {
137924
138234
  flexDirection: "column",
@@ -137928,37 +138238,37 @@ function FilesTab({
137928
138238
  borderStyle: "single",
137929
138239
  borderColor: focusPanel === "diff" && isActive2 ? theme14.colors.accent : theme14.colors.border,
137930
138240
  children: [
137931
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 2, overflow: "hidden", children: [
137932
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { wrap: "truncate-end", color: theme14.colors.accent, bold: true, children: selectedFile?.filename ?? "No file selected" }),
137933
- selectedFile && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { gap: 1, children: [
137934
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.diffAdd, children: [
138241
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 2, overflow: "hidden", children: [
138242
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { wrap: "truncate-end", color: theme14.colors.accent, bold: true, children: selectedFile?.filename ?? "No file selected" }),
138243
+ selectedFile && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { gap: 1, children: [
138244
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.diffAdd, children: [
137935
138245
  "+",
137936
138246
  selectedFile.additions
137937
138247
  ] }),
137938
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.diffDel, children: [
138248
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.diffDel, children: [
137939
138249
  "-",
137940
138250
  selectedFile.deletions
137941
138251
  ] })
137942
138252
  ] }),
137943
- effectiveDiffMode === "side-by-side" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.info, children: "[split]" }),
137944
- maxDiffScrollX > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.muted, children: "[left/right h-scroll]" }),
137945
- visual.visualStart != null && focusPanel === "diff" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.warning, bold: true, children: "-- VISUAL LINE --" }),
137946
- search.activeDiffSearch && !search.isDiffSearching && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.warning, children: [
138253
+ effectiveDiffMode === "side-by-side" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.info, children: "[split]" }),
138254
+ maxDiffScrollX > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.muted, children: "[left/right h-scroll]" }),
138255
+ visual.visualStart != null && focusPanel === "diff" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.warning, bold: true, children: "-- VISUAL LINE --" }),
138256
+ search.activeDiffSearch && !search.isDiffSearching && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.warning, children: [
137947
138257
  "[/",
137948
138258
  search.activeDiffSearch,
137949
138259
  "] ",
137950
138260
  search.diffSearchMatches.length > 0 ? `${search.currentSearchMatchIndex + 1}/${search.diffSearchMatches.length}` : "no matches"
137951
138261
  ] }),
137952
- crossFileSearch.activeQuery && !crossFileSearch.isSearching && !search.activeDiffSearch && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { color: theme14.colors.info, children: [
138262
+ crossFileSearch.activeQuery && !crossFileSearch.isSearching && !search.activeDiffSearch && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.info, children: [
137953
138263
  "[F:",
137954
138264
  crossFileSearch.activeQuery,
137955
138265
  "] ",
137956
138266
  crossFileSearch.matches.length > 0 ? `${crossFileSearch.currentIndex + 1}/${crossFileSearch.matches.length} (${crossFileSearch.matchedFileCount()} files)` : "no matches"
137957
138267
  ] })
137958
138268
  ] }),
137959
- crossFileSearch.isSearching && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { paddingX: 1, children: [
137960
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.info, children: "F/" }),
137961
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138269
+ crossFileSearch.isSearching && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingX: 1, children: [
138270
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.info, children: "F/" }),
138271
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137962
138272
  TextInput,
137963
138273
  {
137964
138274
  defaultValue: crossFileSearch.query,
@@ -137967,9 +138277,9 @@ function FilesTab({
137967
138277
  }
137968
138278
  )
137969
138279
  ] }),
137970
- search.isDiffSearching && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Box_default, { paddingX: 1, children: [
137971
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme14.colors.accent, children: "/" }),
137972
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138280
+ search.isDiffSearching && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingX: 1, children: [
138281
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.accent, children: "/" }),
138282
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137973
138283
  TextInput,
137974
138284
  {
137975
138285
  defaultValue: search.diffSearchQuery,
@@ -137978,7 +138288,7 @@ function FilesTab({
137978
138288
  }
137979
138289
  )
137980
138290
  ] }),
137981
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, minWidth: 0, overflow: "hidden", children: effectiveDiffMode === "side-by-side" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138291
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, minWidth: 0, overflow: "hidden", children: effectiveDiffMode === "side-by-side" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137982
138292
  SideBySideDiffView,
137983
138293
  {
137984
138294
  rows: sideBySideRows,
@@ -137991,7 +138301,7 @@ function FilesTab({
137991
138301
  scrollOffsetX: Math.min(diffScrollOffsetX, maxDiffScrollXSbs),
137992
138302
  searchMatchIndices: search.diffSearchMatchSet.size > 0 ? search.diffSearchMatchSet : void 0
137993
138303
  }
137994
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
138304
+ ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
137995
138305
  DiffView,
137996
138306
  {
137997
138307
  allRows,
@@ -138013,7 +138323,7 @@ function FilesTab({
138013
138323
  }
138014
138324
 
138015
138325
  // src/components/pr/TimelineItemView.tsx
138016
- var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
138326
+ var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
138017
138327
  function TimelineItemView({
138018
138328
  item,
138019
138329
  isFocus
@@ -138035,7 +138345,7 @@ function TimelineItemView({
138035
138345
  const { icon, color } = item.type === "review" ? getStateIcon(item.state) : item.type === "issue_comment" ? { icon: "#", color: theme14.colors.secondary } : { icon: "~", color: theme14.colors.info };
138036
138346
  const stateLabel = item.type === "review" && item.state ? item.state.toLowerCase().replace("_", " ") : item.type === "issue_comment" ? "commented" : "";
138037
138347
  const location = item.type === "comment" && item.path ? ` on ${item.path}${item.line != null ? `:${item.line}` : ""}` : "";
138038
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
138348
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
138039
138349
  Box_default,
138040
138350
  {
138041
138351
  flexDirection: "column",
@@ -138045,33 +138355,33 @@ function TimelineItemView({
138045
138355
  gap: 1,
138046
138356
  overflow: "hidden",
138047
138357
  children: [
138048
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "row", children: [
138049
- isFocus && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.accent, children: "> " }),
138050
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color, children: icon }),
138051
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { children: " " }),
138052
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: item.isResolved ? theme14.colors.muted : theme14.colors.secondary, bold: true, dimColor: item.isResolved, children: item.user }),
138053
- stateLabel ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
138054
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { children: " " }),
138055
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color, children: stateLabel })
138358
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "row", children: [
138359
+ isFocus && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme14.colors.accent, children: "> " }),
138360
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color, children: icon }),
138361
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { children: " " }),
138362
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: item.isResolved ? theme14.colors.muted : theme14.colors.secondary, bold: true, dimColor: item.isResolved, children: item.user }),
138363
+ stateLabel ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
138364
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { children: " " }),
138365
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color, children: stateLabel })
138056
138366
  ] }) : null,
138057
- item.isResolved && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
138058
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { children: " " }),
138059
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "[Resolved]" })
138367
+ item.isResolved && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
138368
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { children: " " }),
138369
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "[Resolved]" })
138060
138370
  ] }),
138061
- location ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme14.colors.muted, children: location }) : null,
138062
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme14.colors.muted, children: [
138371
+ location ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme14.colors.muted, children: location }) : null,
138372
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme14.colors.muted, children: [
138063
138373
  " - ",
138064
138374
  timeAgo(item.date)
138065
138375
  ] })
138066
138376
  ] }),
138067
- item.body ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { paddingLeft: isFocus ? 3 : 2, marginTop: 0, width: "80%", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MarkdownText, { content: item.isResolved ? `~~${item.body}~~` : item.body }) }) : null
138377
+ item.body ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: isFocus ? 3 : 2, marginTop: 0, width: "80%", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MarkdownText, { content: item.isResolved ? `~~${item.body}~~` : item.body }) }) : null
138068
138378
  ]
138069
138379
  }
138070
138380
  );
138071
138381
  }
138072
138382
 
138073
138383
  // src/components/pr/ConversationsTab.tsx
138074
- var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
138384
+ var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
138075
138385
  function buildTimeline(pr, comments, reviews, reviewThreads, issueComments) {
138076
138386
  const items = [];
138077
138387
  const threadByCommentId = /* @__PURE__ */ new Map();
@@ -138212,8 +138522,8 @@ function ConversationsTab({
138212
138522
  );
138213
138523
  const scrollOffset = deriveScrollOffset(selectedIndex, viewportHeight, timeline.length);
138214
138524
  const visibleItems = timeline.slice(scrollOffset, scrollOffset + viewportHeight);
138215
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, overflow: "hidden", children: [
138216
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
138525
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, overflow: "hidden", children: [
138526
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
138217
138527
  Box_default,
138218
138528
  {
138219
138529
  flexDirection: "row",
@@ -138221,14 +138531,14 @@ function ConversationsTab({
138221
138531
  paddingX: 1,
138222
138532
  paddingY: 0,
138223
138533
  marginBottom: 1,
138224
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme14.colors.accent, bold: true, children: [
138534
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme14.colors.accent, bold: true, children: [
138225
138535
  "Timeline (",
138226
138536
  timeline.length,
138227
138537
  " items)"
138228
138538
  ] })
138229
138539
  }
138230
138540
  ),
138231
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
138541
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
138232
138542
  Box_default,
138233
138543
  {
138234
138544
  flexDirection: "column",
@@ -138236,7 +138546,7 @@ function ConversationsTab({
138236
138546
  overflow: "hidden",
138237
138547
  height: viewportHeight,
138238
138548
  minHeight: viewportHeight,
138239
- children: timeline.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme14.colors.muted, children: "No conversations yet" }) }) : visibleItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
138549
+ children: timeline.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme14.colors.muted, children: "No conversations yet" }) }) : visibleItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
138240
138550
  TimelineItemView,
138241
138551
  {
138242
138552
  item,
@@ -138250,7 +138560,7 @@ function ConversationsTab({
138250
138560
  }
138251
138561
 
138252
138562
  // src/components/pr/CommitsTab.tsx
138253
- var import_react87 = __toESM(require_react(), 1);
138563
+ var import_react88 = __toESM(require_react(), 1);
138254
138564
 
138255
138565
  // src/utils/terminal.ts
138256
138566
  import { execFile as execFile2, execFileSync as execFileSync2 } from "child_process";
@@ -138296,17 +138606,17 @@ function copyToClipboard(text) {
138296
138606
  }
138297
138607
 
138298
138608
  // src/components/pr/CommitDiffView.tsx
138299
- var import_react86 = __toESM(require_react(), 1);
138609
+ var import_react87 = __toESM(require_react(), 1);
138300
138610
 
138301
138611
  // src/components/common/LoadingIndicator.tsx
138302
- var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
138612
+ var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
138303
138613
  function LoadingIndicator({
138304
138614
  message = "Loading..."
138305
138615
  }) {
138306
138616
  const theme14 = useTheme();
138307
138617
  const { stdout } = use_stdout_default();
138308
138618
  const height = stdout?.rows ?? 24;
138309
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
138619
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138310
138620
  Box_default,
138311
138621
  {
138312
138622
  flexDirection: "column",
@@ -138314,16 +138624,16 @@ function LoadingIndicator({
138314
138624
  alignItems: "center",
138315
138625
  height: height - 4,
138316
138626
  flexGrow: 1,
138317
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { gap: 1, children: [
138318
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Spinner, {}),
138319
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme14.colors.accent, children: message })
138627
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { gap: 1, children: [
138628
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Spinner, {}),
138629
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme14.colors.accent, children: message })
138320
138630
  ] })
138321
138631
  }
138322
138632
  );
138323
138633
  }
138324
138634
 
138325
138635
  // src/components/pr/CommitDiffView.tsx
138326
- var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
138636
+ var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
138327
138637
  function CommitDiffView({
138328
138638
  files,
138329
138639
  commitSha,
@@ -138337,16 +138647,16 @@ function CommitDiffView({
138337
138647
  const terminalWidth = stdout?.columns ?? 120;
138338
138648
  const viewportHeight = Math.max(1, (stdout?.rows ?? 24) - 13);
138339
138649
  const treeViewportMaxHeight = Math.max(1, (stdout?.rows ?? 24) - 18);
138340
- const [focusPanel, setFocusPanel] = (0, import_react86.useState)("tree");
138341
- const [selectedFileIndex, setSelectedFileIndex] = (0, import_react86.useState)(0);
138342
- const [diffMode, setDiffMode] = (0, import_react86.useState)("unified");
138343
- const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react86.useState)(0);
138650
+ const [focusPanel, setFocusPanel] = (0, import_react87.useState)("tree");
138651
+ const [selectedFileIndex, setSelectedFileIndex] = (0, import_react87.useState)(0);
138652
+ const [diffMode, setDiffMode] = (0, import_react87.useState)("unified");
138653
+ const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react87.useState)(0);
138344
138654
  const effectiveDiffMode = diffMode === "side-by-side" && terminalWidth < SIDE_BY_SIDE_MIN_WIDTH ? "unified" : diffMode;
138345
138655
  const treePanelWidth = Math.max(32, Math.floor(terminalWidth * 0.3));
138346
138656
  const diffContentWidth = Math.max(10, terminalWidth - treePanelWidth - 8);
138347
- const fileTree = (0, import_react86.useMemo)(() => buildFileTree(files), [files]);
138348
- const fileOrder = (0, import_react86.useMemo)(() => flattenTreeToFiles(fileTree), [fileTree]);
138349
- const displayRows = (0, import_react86.useMemo)(
138657
+ const fileTree = (0, import_react87.useMemo)(() => buildFileTree(files), [files]);
138658
+ const fileOrder = (0, import_react87.useMemo)(() => flattenTreeToFiles(fileTree), [fileTree]);
138659
+ const displayRows = (0, import_react87.useMemo)(
138350
138660
  () => buildDisplayRows(fileTree, 0, { current: 0 }),
138351
138661
  [fileTree]
138352
138662
  );
@@ -138369,30 +138679,30 @@ function CommitDiffView({
138369
138679
  treeScrollOffset,
138370
138680
  treeScrollOffset + treeViewportHeight
138371
138681
  );
138372
- import_react86.default.useEffect(() => {
138682
+ import_react87.default.useEffect(() => {
138373
138683
  if (focusPanel === "tree") {
138374
138684
  setSelectedFileIndex(treeSelectedIndex);
138375
138685
  }
138376
138686
  }, [treeSelectedIndex, focusPanel]);
138377
- import_react86.default.useEffect(() => {
138687
+ import_react87.default.useEffect(() => {
138378
138688
  setDiffScrollOffsetX(0);
138379
138689
  }, [selectedFileIndex]);
138380
138690
  const selectedFile = fileOrder[selectedFileIndex] ?? fileOrder[0] ?? null;
138381
138691
  const selectedPatch = selectedFile?.patch ?? null;
138382
- const hunks = (0, import_react86.useMemo)(
138692
+ const hunks = (0, import_react87.useMemo)(
138383
138693
  () => selectedPatch ? parseDiffPatch(selectedPatch) : [],
138384
138694
  [selectedPatch]
138385
138695
  );
138386
- const allRows = (0, import_react86.useMemo)(
138696
+ const allRows = (0, import_react87.useMemo)(
138387
138697
  () => buildDiffRows(hunks, void 0),
138388
138698
  [hunks]
138389
138699
  );
138390
- const sideBySideRows = (0, import_react86.useMemo)(
138700
+ const sideBySideRows = (0, import_react87.useMemo)(
138391
138701
  () => effectiveDiffMode === "side-by-side" ? buildSideBySideRows(hunks, void 0) : [],
138392
138702
  [hunks, effectiveDiffMode]
138393
138703
  );
138394
138704
  const totalDiffLines = effectiveDiffMode === "side-by-side" ? sideBySideRows.length : allRows.length;
138395
- const maxDiffLineLength = (0, import_react86.useMemo)(
138705
+ const maxDiffLineLength = (0, import_react87.useMemo)(
138396
138706
  () => computeMaxDiffLineLength(allRows),
138397
138707
  [allRows]
138398
138708
  );
@@ -138400,7 +138710,7 @@ function CommitDiffView({
138400
138710
  10,
138401
138711
  Math.floor((diffContentWidth - 1) / 2)
138402
138712
  );
138403
- const maxDiffLineLengthSbs = (0, import_react86.useMemo)(
138713
+ const maxDiffLineLengthSbs = (0, import_react87.useMemo)(
138404
138714
  () => computeMaxSbsLineLength(sideBySideRows),
138405
138715
  [sideBySideRows]
138406
138716
  );
@@ -138438,19 +138748,19 @@ function CommitDiffView({
138438
138748
  { isActive: isActive2 }
138439
138749
  );
138440
138750
  if (isLoading) {
138441
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LoadingIndicator, { message: "Loading commit diff..." });
138751
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LoadingIndicator, { message: "Loading commit diff..." });
138442
138752
  }
138443
138753
  if (files.length === 0) {
138444
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EmptyState, { message: "No files changed in this commit" });
138754
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyState, { message: "No files changed in this commit" });
138445
138755
  }
138446
138756
  const shortSha = commitSha.slice(0, 7);
138447
138757
  const shortMessage = commitMessage.split("\n")[0] ?? "";
138448
138758
  const isPanelFocused = focusPanel === "tree" && isActive2;
138449
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
138450
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, marginBottom: 0, children: [
138451
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme14.colors.warning, bold: true, children: shortSha }),
138452
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme14.colors.text, bold: true, wrap: "truncate", children: shortMessage }),
138453
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: theme14.colors.muted, children: [
138759
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
138760
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, marginBottom: 0, children: [
138761
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.warning, bold: true, children: shortSha }),
138762
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.text, bold: true, wrap: "truncate", children: shortMessage }),
138763
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme14.colors.muted, children: [
138454
138764
  "(",
138455
138765
  files.length,
138456
138766
  " file",
@@ -138458,8 +138768,8 @@ function CommitDiffView({
138458
138768
  ")"
138459
138769
  ] })
138460
138770
  ] }),
138461
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
138462
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
138771
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
138772
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
138463
138773
  Box_default,
138464
138774
  {
138465
138775
  flexDirection: "column",
@@ -138470,15 +138780,15 @@ function CommitDiffView({
138470
138780
  borderStyle: "single",
138471
138781
  borderColor: focusPanel === "tree" && isActive2 ? theme14.colors.accent : theme14.colors.border,
138472
138782
  children: [
138473
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, children: [
138474
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Files" }),
138475
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: theme14.colors.muted, children: [
138783
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 1, children: [
138784
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Files" }),
138785
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme14.colors.muted, children: [
138476
138786
  "(",
138477
138787
  files.length,
138478
138788
  ")"
138479
138789
  ] })
138480
138790
  ] }),
138481
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138791
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138482
138792
  Box_default,
138483
138793
  {
138484
138794
  flexDirection: "column",
@@ -138491,27 +138801,27 @@ function CommitDiffView({
138491
138801
  flexShrink: 1,
138492
138802
  children: visibleRows.map((row, i) => {
138493
138803
  const rowIndex = treeScrollOffset + i;
138494
- return row.type === "dir" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138804
+ return row.type === "dir" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138495
138805
  Box_default,
138496
138806
  {
138497
138807
  width: "100%",
138498
138808
  minWidth: 0,
138499
138809
  overflow: "hidden",
138500
138810
  paddingLeft: row.indent * 2,
138501
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { wrap: "truncate-end", color: theme14.colors.muted, children: [
138811
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { wrap: "truncate-end", color: theme14.colors.muted, children: [
138502
138812
  row.name,
138503
138813
  "/"
138504
138814
  ] })
138505
138815
  },
138506
138816
  `row-${rowIndex}`
138507
- ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138817
+ ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138508
138818
  Box_default,
138509
138819
  {
138510
138820
  width: "100%",
138511
138821
  minWidth: 0,
138512
138822
  overflow: "hidden",
138513
138823
  paddingLeft: row.indent * 2,
138514
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138824
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138515
138825
  FileItem,
138516
138826
  {
138517
138827
  item: row.file,
@@ -138528,7 +138838,7 @@ function CommitDiffView({
138528
138838
  ]
138529
138839
  }
138530
138840
  ),
138531
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
138841
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
138532
138842
  Box_default,
138533
138843
  {
138534
138844
  flexDirection: "column",
@@ -138538,21 +138848,21 @@ function CommitDiffView({
138538
138848
  borderStyle: "single",
138539
138849
  borderColor: focusPanel === "diff" && isActive2 ? theme14.colors.accent : theme14.colors.border,
138540
138850
  children: [
138541
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 2, overflow: "hidden", children: [
138542
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { wrap: "truncate-end", color: theme14.colors.accent, bold: true, children: selectedFile?.filename ?? "No file selected" }),
138543
- selectedFile && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { gap: 1, children: [
138544
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: theme14.colors.diffAdd, children: [
138851
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { paddingX: 1, paddingY: 0, gap: 2, overflow: "hidden", children: [
138852
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { wrap: "truncate-end", color: theme14.colors.accent, bold: true, children: selectedFile?.filename ?? "No file selected" }),
138853
+ selectedFile && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { gap: 1, children: [
138854
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme14.colors.diffAdd, children: [
138545
138855
  "+",
138546
138856
  selectedFile.additions
138547
138857
  ] }),
138548
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: theme14.colors.diffDel, children: [
138858
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme14.colors.diffDel, children: [
138549
138859
  "-",
138550
138860
  selectedFile.deletions
138551
138861
  ] })
138552
138862
  ] }),
138553
- effectiveDiffMode === "side-by-side" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme14.colors.info, children: "[split]" })
138863
+ effectiveDiffMode === "side-by-side" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.info, children: "[split]" })
138554
138864
  ] }),
138555
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, minWidth: 0, overflow: "hidden", children: effectiveDiffMode === "side-by-side" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138865
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, minWidth: 0, overflow: "hidden", children: effectiveDiffMode === "side-by-side" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138556
138866
  SideBySideDiffView,
138557
138867
  {
138558
138868
  rows: sideBySideRows,
@@ -138564,7 +138874,7 @@ function CommitDiffView({
138564
138874
  contentWidth: diffContentWidthSbs,
138565
138875
  scrollOffsetX: Math.min(diffScrollOffsetX, maxDiffScrollXSbs)
138566
138876
  }
138567
- ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
138877
+ ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138568
138878
  DiffView,
138569
138879
  {
138570
138880
  allRows,
@@ -138586,7 +138896,7 @@ function CommitDiffView({
138586
138896
  }
138587
138897
 
138588
138898
  // src/components/pr/CommitsTab.tsx
138589
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
138899
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
138590
138900
  function CommitItem({
138591
138901
  commit,
138592
138902
  isFocus
@@ -138596,7 +138906,7 @@ function CommitItem({
138596
138906
  const message = stripAnsi2(commit.commit.message.split("\n")[0] ?? "");
138597
138907
  const author = commit.author?.login ?? commit.commit.author.name;
138598
138908
  const date8 = commit.commit.author.date;
138599
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
138909
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
138600
138910
  Box_default,
138601
138911
  {
138602
138912
  paddingX: 1,
@@ -138604,8 +138914,8 @@ function CommitItem({
138604
138914
  gap: 1,
138605
138915
  backgroundColor: isFocus ? theme14.colors.selection : void 0,
138606
138916
  children: [
138607
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.warning, bold: isFocus, children: shortSha }) }),
138608
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138917
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.warning, bold: isFocus, children: shortSha }) }),
138918
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
138609
138919
  Text,
138610
138920
  {
138611
138921
  color: isFocus ? theme14.colors.listSelectedFg : theme14.colors.text,
@@ -138614,8 +138924,8 @@ function CommitItem({
138614
138924
  children: message
138615
138925
  }
138616
138926
  ) }),
138617
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.secondary, children: author }) }),
138618
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.muted, children: timeAgo(date8) }) })
138927
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.secondary, children: author }) }),
138928
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.muted, children: timeAgo(date8) }) })
138619
138929
  ]
138620
138930
  }
138621
138931
  );
@@ -138630,7 +138940,7 @@ function CommitsTab({
138630
138940
  const theme14 = useTheme();
138631
138941
  const { setStatusMessage } = useStatusMessage();
138632
138942
  const viewportHeight = Math.max(1, (stdout?.rows ?? 24) - 10);
138633
- const [selectedCommitSha, setSelectedCommitSha] = (0, import_react87.useState)(null);
138943
+ const [selectedCommitSha, setSelectedCommitSha] = (0, import_react88.useState)(null);
138634
138944
  const { selectedIndex } = useListNavigation({
138635
138945
  itemCount: commits.length,
138636
138946
  viewportHeight,
@@ -138660,11 +138970,11 @@ function CommitsTab({
138660
138970
  const scrollOffset = deriveScrollOffset(selectedIndex, viewportHeight, commits.length);
138661
138971
  const visibleCommits = commits.slice(scrollOffset, scrollOffset + viewportHeight);
138662
138972
  if (commits.length === 0) {
138663
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(EmptyState, { message: "No commits found" });
138973
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EmptyState, { message: "No commits found" });
138664
138974
  }
138665
138975
  if (selectedCommitSha !== null) {
138666
138976
  const commit = commits.find((c) => c.sha === selectedCommitSha);
138667
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
138977
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
138668
138978
  CommitDiffView,
138669
138979
  {
138670
138980
  files: commitFiles,
@@ -138676,16 +138986,16 @@ function CommitsTab({
138676
138986
  }
138677
138987
  );
138678
138988
  }
138679
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
138680
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { paddingX: 1, paddingY: 1, gap: 1, children: [
138681
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Commits" }),
138682
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme14.colors.muted, children: [
138989
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
138990
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { paddingX: 1, paddingY: 1, gap: 1, children: [
138991
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Commits" }),
138992
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: theme14.colors.muted, children: [
138683
138993
  "(",
138684
138994
  commits.length,
138685
138995
  ")"
138686
138996
  ] })
138687
138997
  ] }),
138688
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
138998
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
138689
138999
  Box_default,
138690
139000
  {
138691
139001
  paddingX: 1,
@@ -138697,14 +139007,14 @@ function CommitsTab({
138697
139007
  borderLeft: false,
138698
139008
  borderRight: false,
138699
139009
  children: [
138700
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "SHA" }) }),
138701
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Message" }) }),
138702
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Author" }) }),
138703
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Date" }) })
139010
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "SHA" }) }),
139011
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Message" }) }),
139012
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 16, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Author" }) }),
139013
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { width: 14, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.muted, bold: true, children: "Date" }) })
138704
139014
  ]
138705
139015
  }
138706
139016
  ),
138707
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", overflow: "hidden", height: viewportHeight, children: visibleCommits.map((commit, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
139017
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", overflow: "hidden", height: viewportHeight, children: visibleCommits.map((commit, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
138708
139018
  CommitItem,
138709
139019
  {
138710
139020
  commit,
@@ -138716,7 +139026,7 @@ function CommitsTab({
138716
139026
  }
138717
139027
 
138718
139028
  // src/components/pr/ChecksTab.tsx
138719
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
139029
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
138720
139030
  function CheckRunRow({
138721
139031
  run,
138722
139032
  isFocus
@@ -138724,15 +139034,15 @@ function CheckRunRow({
138724
139034
  const theme14 = useTheme();
138725
139035
  const icon = run.status !== "completed" ? "\u25CF" : run.conclusion === "success" || run.conclusion === "neutral" || run.conclusion === "skipped" ? "\u2713" : "\u2717";
138726
139036
  const color = run.status !== "completed" ? theme14.colors.warning : run.conclusion === "success" || run.conclusion === "neutral" || run.conclusion === "skipped" ? theme14.colors.success : theme14.colors.error;
138727
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
139037
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
138728
139038
  Box_default,
138729
139039
  {
138730
139040
  paddingX: 1,
138731
139041
  gap: 1,
138732
139042
  backgroundColor: isFocus ? theme14.colors.selection : void 0,
138733
139043
  children: [
138734
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color, children: icon }),
138735
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
139044
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color, children: icon }),
139045
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
138736
139046
  Text,
138737
139047
  {
138738
139048
  color: isFocus ? theme14.colors.listSelectedFg : theme14.colors.text,
@@ -138740,12 +139050,12 @@ function CheckRunRow({
138740
139050
  children: run.name
138741
139051
  }
138742
139052
  ),
138743
- run.status !== "completed" && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: theme14.colors.muted, children: [
139053
+ run.status !== "completed" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme14.colors.muted, children: [
138744
139054
  "(",
138745
139055
  run.status,
138746
139056
  ")"
138747
139057
  ] }),
138748
- run.status === "completed" && run.conclusion && run.conclusion !== "success" && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: theme14.colors.muted, children: [
139058
+ run.status === "completed" && run.conclusion && run.conclusion !== "success" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme14.colors.muted, children: [
138749
139059
  "(",
138750
139060
  run.conclusion,
138751
139061
  ")"
@@ -138798,34 +139108,34 @@ function ChecksTab({
138798
139108
  const scrollOffset = deriveScrollOffset(selectedIndex, viewportHeight, checkRuns.length);
138799
139109
  const visibleRuns = checkRuns.slice(scrollOffset, scrollOffset + viewportHeight);
138800
139110
  if (isLoading) {
138801
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingIndicator, { message: "Loading checks..." });
139111
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LoadingIndicator, { message: "Loading checks..." });
138802
139112
  }
138803
139113
  if (!data || data.total_count === 0) {
138804
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EmptyState, { message: "No CI/CD checks found" });
139114
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmptyState, { message: "No CI/CD checks found" });
138805
139115
  }
138806
139116
  const summary5 = summarizeChecks(checkRuns);
138807
139117
  const summaryColor = summary5.conclusion === "success" ? theme14.colors.success : summary5.conclusion === "failure" ? theme14.colors.error : theme14.colors.warning;
138808
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, overflow: "hidden", children: [
138809
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { paddingX: 1, paddingY: 0, marginBottom: 1, gap: 2, children: [
138810
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "CI/CD Checks" }),
138811
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: summaryColor, bold: true, children: [
139118
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, overflow: "hidden", children: [
139119
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { paddingX: 1, paddingY: 0, marginBottom: 1, gap: 2, children: [
139120
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "CI/CD Checks" }),
139121
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: summaryColor, bold: true, children: [
138812
139122
  summary5.passed,
138813
139123
  "/",
138814
139124
  summary5.total,
138815
139125
  " passed"
138816
139126
  ] }),
138817
- summary5.failed > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: theme14.colors.error, children: [
139127
+ summary5.failed > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme14.colors.error, children: [
138818
139128
  "(",
138819
139129
  summary5.failed,
138820
139130
  " failed)"
138821
139131
  ] }),
138822
- summary5.pending > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: theme14.colors.warning, children: [
139132
+ summary5.pending > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme14.colors.warning, children: [
138823
139133
  "(",
138824
139134
  summary5.pending,
138825
139135
  " pending)"
138826
139136
  ] })
138827
139137
  ] }),
138828
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", overflow: "hidden", height: viewportHeight, children: visibleRuns.map((run, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
139138
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "column", overflow: "hidden", height: viewportHeight, children: visibleRuns.map((run, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
138829
139139
  CheckRunRow,
138830
139140
  {
138831
139141
  run,
@@ -138837,11 +139147,11 @@ function ChecksTab({
138837
139147
  }
138838
139148
 
138839
139149
  // src/components/pr/ReviewModal.tsx
138840
- var import_react89 = __toESM(require_react(), 1);
139150
+ var import_react90 = __toESM(require_react(), 1);
138841
139151
 
138842
139152
  // src/components/common/MultiLineInput.tsx
138843
- var import_react88 = __toESM(require_react(), 1);
138844
- var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
139153
+ var import_react89 = __toESM(require_react(), 1);
139154
+ var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
138845
139155
  function MultiLineInput({
138846
139156
  placeholder,
138847
139157
  defaultValue,
@@ -138850,12 +139160,12 @@ function MultiLineInput({
138850
139160
  minHeight = 3
138851
139161
  }) {
138852
139162
  const theme14 = useTheme();
138853
- const [lines, setLines] = (0, import_react88.useState)(
139163
+ const [lines, setLines] = (0, import_react89.useState)(
138854
139164
  defaultValue ? defaultValue.split("\n") : [""]
138855
139165
  );
138856
- const [cursorRow, setCursorRow] = (0, import_react88.useState)(0);
138857
- const [cursorCol, setCursorCol] = (0, import_react88.useState)(0);
138858
- const updateLines = (0, import_react88.useCallback)(
139166
+ const [cursorRow, setCursorRow] = (0, import_react89.useState)(0);
139167
+ const [cursorCol, setCursorCol] = (0, import_react89.useState)(0);
139168
+ const updateLines = (0, import_react89.useCallback)(
138859
139169
  (newLines) => {
138860
139170
  setLines(newLines);
138861
139171
  onChange(newLines.join("\n"));
@@ -138961,23 +139271,23 @@ function MultiLineInput({
138961
139271
  );
138962
139272
  const isEmpty9 = lines.length === 1 && lines[0] === "";
138963
139273
  const displayHeight = Math.max(minHeight, lines.length);
138964
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "column", minHeight: displayHeight, children: isEmpty9 && !isActive2 && placeholder ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: placeholder }) : lines.map((line, rowIndex) => {
139274
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { flexDirection: "column", minHeight: displayHeight, children: isEmpty9 && !isActive2 && placeholder ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: placeholder }) : lines.map((line, rowIndex) => {
138965
139275
  if (rowIndex === cursorRow && isActive2) {
138966
139276
  const before2 = line.slice(0, cursorCol);
138967
139277
  const cursorChar = line[cursorCol] ?? " ";
138968
139278
  const after3 = line.slice(cursorCol + 1);
138969
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme14.colors.text, children: [
139279
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { color: theme14.colors.text, children: [
138970
139280
  before2,
138971
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { inverse: true, children: cursorChar }),
139281
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { inverse: true, children: cursorChar }),
138972
139282
  after3
138973
139283
  ] }, rowIndex);
138974
139284
  }
138975
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme14.colors.text, children: line || " " }, rowIndex);
139285
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.text, children: line || " " }, rowIndex);
138976
139286
  }) });
138977
139287
  }
138978
139288
 
138979
139289
  // src/components/pr/ReviewModal.tsx
138980
- var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
139290
+ var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
138981
139291
  var REVIEW_TYPES = [
138982
139292
  { event: "APPROVE", label: "Approve", color: "success" },
138983
139293
  { event: "REQUEST_CHANGES", label: "Request Changes", color: "error" },
@@ -138991,17 +139301,17 @@ function ReviewModal({
138991
139301
  }) {
138992
139302
  const theme14 = useTheme();
138993
139303
  const { setInputActive } = useInputFocus();
138994
- const [step4, setStep] = (0, import_react89.useState)("select_type");
138995
- const [selectedType, setSelectedType] = (0, import_react89.useState)(0);
138996
- const [reviewEvent, setReviewEvent] = (0, import_react89.useState)("APPROVE");
138997
- const [body, setBody] = (0, import_react89.useState)("");
138998
- (0, import_react89.useEffect)(() => {
139304
+ const [step4, setStep] = (0, import_react90.useState)("select_type");
139305
+ const [selectedType, setSelectedType] = (0, import_react90.useState)(0);
139306
+ const [reviewEvent, setReviewEvent] = (0, import_react90.useState)("APPROVE");
139307
+ const [body, setBody] = (0, import_react90.useState)("");
139308
+ (0, import_react90.useEffect)(() => {
138999
139309
  if (step4 === "enter_body") {
139000
139310
  setInputActive(true);
139001
139311
  }
139002
139312
  return () => setInputActive(false);
139003
139313
  }, [step4, setInputActive]);
139004
- const handleSubmit = (0, import_react89.useCallback)(() => {
139314
+ const handleSubmit = (0, import_react90.useCallback)(() => {
139005
139315
  if (reviewEvent === "REQUEST_CHANGES" && !body.trim()) {
139006
139316
  return;
139007
139317
  }
@@ -139037,7 +139347,7 @@ function ReviewModal({
139037
139347
  { isActive: true }
139038
139348
  );
139039
139349
  if (step4 === "select_type") {
139040
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
139350
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
139041
139351
  Box_default,
139042
139352
  {
139043
139353
  flexDirection: "column",
@@ -139049,11 +139359,11 @@ function ReviewModal({
139049
139359
  gap: 1,
139050
139360
  width: 50,
139051
139361
  children: [
139052
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Submit Review" }),
139053
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, children: "Select review type:" }),
139054
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Box_default, { flexDirection: "column", children: REVIEW_TYPES.map((type3, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { gap: 1, children: [
139055
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: index === selectedType ? theme14.colors.accent : theme14.colors.muted, children: index === selectedType ? ">" : " " }),
139056
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
139362
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Submit Review" }),
139363
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, children: "Select review type:" }),
139364
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Box_default, { flexDirection: "column", children: REVIEW_TYPES.map((type3, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { gap: 1, children: [
139365
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: index === selectedType ? theme14.colors.accent : theme14.colors.muted, children: index === selectedType ? ">" : " " }),
139366
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
139057
139367
  Text,
139058
139368
  {
139059
139369
  color: theme14.colors[type3.color],
@@ -139063,14 +139373,14 @@ function ReviewModal({
139063
139373
  }
139064
139374
  )
139065
139375
  ] }, type3.event)) }),
139066
- error48 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139067
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: select | Esc: cancel" })
139376
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139377
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: select | Esc: cancel" })
139068
139378
  ]
139069
139379
  }
139070
139380
  ) });
139071
139381
  }
139072
139382
  const selectedReviewType = REVIEW_TYPES.find((t) => t.event === reviewEvent);
139073
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
139383
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
139074
139384
  Box_default,
139075
139385
  {
139076
139386
  flexDirection: "column",
@@ -139082,13 +139392,13 @@ function ReviewModal({
139082
139392
  gap: 1,
139083
139393
  width: 60,
139084
139394
  children: [
139085
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Box_default, { gap: 1, children: [
139086
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Submit Review" }),
139087
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, children: "-" }),
139088
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: selectedReviewType ? theme14.colors[selectedReviewType.color] : theme14.colors.text, children: selectedReviewType?.label })
139395
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { gap: 1, children: [
139396
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Submit Review" }),
139397
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, children: "-" }),
139398
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: selectedReviewType ? theme14.colors[selectedReviewType.color] : theme14.colors.text, children: selectedReviewType?.label })
139089
139399
  ] }),
139090
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, children: reviewEvent === "APPROVE" ? "Add an optional message:" : "Enter your review message:" }),
139091
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
139400
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, children: reviewEvent === "APPROVE" ? "Add an optional message:" : "Enter your review message:" }),
139401
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
139092
139402
  Box_default,
139093
139403
  {
139094
139404
  borderStyle: "single",
@@ -139096,7 +139406,7 @@ function ReviewModal({
139096
139406
  paddingX: 1,
139097
139407
  paddingY: 0,
139098
139408
  flexDirection: "column",
139099
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
139409
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
139100
139410
  MultiLineInput,
139101
139411
  {
139102
139412
  placeholder: "Review message... (Markdown supported)",
@@ -139107,17 +139417,17 @@ function ReviewModal({
139107
139417
  )
139108
139418
  }
139109
139419
  ),
139110
- isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.info, children: "Submitting review..." }),
139111
- error48 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139112
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Enter: new line | Ctrl+S: submit | Esc: back" })
139420
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.info, children: "Submitting review..." }),
139421
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139422
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Enter: new line | Ctrl+S: submit | Esc: back" })
139113
139423
  ]
139114
139424
  }
139115
139425
  ) });
139116
139426
  }
139117
139427
 
139118
139428
  // src/components/pr/CommentModal.tsx
139119
- var import_react90 = __toESM(require_react(), 1);
139120
- var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
139429
+ var import_react91 = __toESM(require_react(), 1);
139430
+ var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
139121
139431
  function CommentModal({
139122
139432
  title,
139123
139433
  context: context6,
@@ -139129,12 +139439,12 @@ function CommentModal({
139129
139439
  }) {
139130
139440
  const theme14 = useTheme();
139131
139441
  const { setInputActive } = useInputFocus();
139132
- const [body, setBody] = (0, import_react90.useState)(defaultValue ?? "");
139133
- (0, import_react90.useEffect)(() => {
139442
+ const [body, setBody] = (0, import_react91.useState)(defaultValue ?? "");
139443
+ (0, import_react91.useEffect)(() => {
139134
139444
  setInputActive(true);
139135
139445
  return () => setInputActive(false);
139136
139446
  }, [setInputActive]);
139137
- const handleSubmit = (0, import_react90.useCallback)(() => {
139447
+ const handleSubmit = (0, import_react91.useCallback)(() => {
139138
139448
  const trimmed2 = body.trim();
139139
139449
  if (trimmed2 && !isSubmitting) {
139140
139450
  onSubmit(trimmed2);
@@ -139154,7 +139464,7 @@ function CommentModal({
139154
139464
  { isActive: true }
139155
139465
  );
139156
139466
  const isInline = title === "Add Inline Comment";
139157
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
139467
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
139158
139468
  Box_default,
139159
139469
  {
139160
139470
  flexDirection: "column",
@@ -139166,9 +139476,9 @@ function CommentModal({
139166
139476
  gap: 1,
139167
139477
  width: 70,
139168
139478
  children: [
139169
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.accent, bold: true, children: title }),
139170
- context6 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, children: context6 }),
139171
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
139479
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.accent, bold: true, children: title }),
139480
+ context6 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: context6 }),
139481
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
139172
139482
  Box_default,
139173
139483
  {
139174
139484
  borderStyle: "single",
@@ -139176,7 +139486,7 @@ function CommentModal({
139176
139486
  paddingX: 1,
139177
139487
  paddingY: 0,
139178
139488
  flexDirection: "column",
139179
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
139489
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
139180
139490
  MultiLineInput,
139181
139491
  {
139182
139492
  placeholder: "Write your comment... (Markdown supported)",
@@ -139188,27 +139498,27 @@ function CommentModal({
139188
139498
  )
139189
139499
  }
139190
139500
  ),
139191
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
139192
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Markdown: **bold** *italic* `code` ```lang code block```" }),
139193
- isInline && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
139501
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
139502
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Markdown: **bold** *italic* `code` ```lang code block```" }),
139503
+ isInline && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
139194
139504
  "Suggestion: ```suggestion",
139195
139505
  "\n",
139196
139506
  "replacement code",
139197
139507
  "\n",
139198
139508
  "```"
139199
139509
  ] }),
139200
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Tab: indent | Enter: new line | Ctrl+S: submit | Esc: cancel" })
139510
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Tab: indent | Enter: new line | Ctrl+S: submit | Esc: cancel" })
139201
139511
  ] }),
139202
- isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.info, children: "Posting comment..." }),
139203
- error48 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { color: theme14.colors.error, children: error48 })
139512
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.info, children: "Posting comment..." }),
139513
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.error, children: error48 })
139204
139514
  ]
139205
139515
  }
139206
139516
  ) });
139207
139517
  }
139208
139518
 
139209
139519
  // src/components/pr/MergeModal.tsx
139210
- var import_react91 = __toESM(require_react(), 1);
139211
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
139520
+ var import_react92 = __toESM(require_react(), 1);
139521
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
139212
139522
  var MERGE_METHODS = [
139213
139523
  { method: "merge", label: "Merge Commit", description: "All commits preserved" },
139214
139524
  { method: "squash", label: "Squash and Merge", description: "Combine into one commit" },
@@ -139241,12 +139551,12 @@ function MergeModal({
139241
139551
  }) {
139242
139552
  const theme14 = useTheme();
139243
139553
  const { setInputActive } = useInputFocus();
139244
- const [step4, setStep] = (0, import_react91.useState)("select_method");
139245
- const [selectedMethod, setSelectedMethod] = (0, import_react91.useState)(0);
139246
- const [commitTitle, setCommitTitle] = (0, import_react91.useState)(`${pr.title} (#${pr.number})`);
139554
+ const [step4, setStep] = (0, import_react92.useState)("select_method");
139555
+ const [selectedMethod, setSelectedMethod] = (0, import_react92.useState)(0);
139556
+ const [commitTitle, setCommitTitle] = (0, import_react92.useState)(`${pr.title} (#${pr.number})`);
139247
139557
  const mergeBlockReason = getMergeabilityMessage(pr);
139248
139558
  const canMerge = mergeBlockReason === null;
139249
- (0, import_react91.useEffect)(() => {
139559
+ (0, import_react92.useEffect)(() => {
139250
139560
  if (step4 === "edit_title") {
139251
139561
  setInputActive(true);
139252
139562
  }
@@ -139293,7 +139603,7 @@ function MergeModal({
139293
139603
  );
139294
139604
  if (step4 === "confirm") {
139295
139605
  const method = MERGE_METHODS[selectedMethod];
139296
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
139606
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
139297
139607
  Box_default,
139298
139608
  {
139299
139609
  flexDirection: "column",
@@ -139304,40 +139614,40 @@ function MergeModal({
139304
139614
  gap: 1,
139305
139615
  width: 60,
139306
139616
  children: [
139307
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.warning, bold: true, children: "Confirm Merge" }),
139308
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
139309
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { gap: 1, children: [
139310
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: "PR:" }),
139311
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme14.colors.text, children: [
139617
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.warning, bold: true, children: "Confirm Merge" }),
139618
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
139619
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139620
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: "PR:" }),
139621
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme14.colors.text, children: [
139312
139622
  "#",
139313
139623
  pr.number,
139314
139624
  " ",
139315
139625
  pr.title
139316
139626
  ] })
139317
139627
  ] }),
139318
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { gap: 1, children: [
139319
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: "Method:" }),
139320
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.accent, children: method.label })
139628
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139629
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: "Method:" }),
139630
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.accent, children: method.label })
139321
139631
  ] }),
139322
- method.method === "squash" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { gap: 1, children: [
139323
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: "Title:" }),
139324
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.text, children: commitTitle })
139632
+ method.method === "squash" && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139633
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: "Title:" }),
139634
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.text, children: commitTitle })
139325
139635
  ] }),
139326
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { gap: 1, children: [
139327
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: "Into:" }),
139328
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.text, children: pr.base.ref })
139636
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139637
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: "Into:" }),
139638
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.text, children: pr.base.ref })
139329
139639
  ] })
139330
139640
  ] }),
139331
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.error, bold: true, children: "This action cannot be undone." }),
139332
- isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.info, children: "Merging..." }),
139333
- error48 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139334
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "y: confirm merge | Esc: back" })
139641
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.error, bold: true, children: "This action cannot be undone." }),
139642
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.info, children: "Merging..." }),
139643
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139644
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "y: confirm merge | Esc: back" })
139335
139645
  ]
139336
139646
  }
139337
139647
  ) });
139338
139648
  }
139339
139649
  if (step4 === "edit_title") {
139340
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
139650
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
139341
139651
  Box_default,
139342
139652
  {
139343
139653
  flexDirection: "column",
@@ -139348,8 +139658,8 @@ function MergeModal({
139348
139658
  gap: 1,
139349
139659
  width: 60,
139350
139660
  children: [
139351
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Squash Commit Title" }),
139352
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.border, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
139661
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Squash Commit Title" }),
139662
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.border, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
139353
139663
  TextInput,
139354
139664
  {
139355
139665
  defaultValue: commitTitle,
@@ -139357,12 +139667,12 @@ function MergeModal({
139357
139667
  placeholder: "Commit title..."
139358
139668
  }
139359
139669
  ) }),
139360
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Enter: continue | Esc: back" })
139670
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Enter: continue | Esc: back" })
139361
139671
  ]
139362
139672
  }
139363
139673
  ) });
139364
139674
  }
139365
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
139675
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
139366
139676
  Box_default,
139367
139677
  {
139368
139678
  flexDirection: "column",
@@ -139373,16 +139683,16 @@ function MergeModal({
139373
139683
  gap: 1,
139374
139684
  width: 55,
139375
139685
  children: [
139376
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme14.colors.accent, bold: true, children: [
139686
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme14.colors.accent, bold: true, children: [
139377
139687
  "Merge Pull Request #",
139378
139688
  pr.number
139379
139689
  ] }),
139380
- !canMerge && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.error, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.error, children: mergeBlockReason }) }),
139381
- pr.mergeable === null && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.warning, children: "Mergeability is being checked..." }),
139382
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, children: canMerge ? "Select merge method:" : "Merge is not available:" }),
139383
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Box_default, { flexDirection: "column", children: MERGE_METHODS.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Box_default, { gap: 1, children: [
139384
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: index === selectedMethod ? theme14.colors.accent : theme14.colors.muted, children: index === selectedMethod ? ">" : " " }),
139385
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
139690
+ !canMerge && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.error, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.error, children: mergeBlockReason }) }),
139691
+ pr.mergeable === null && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.warning, children: "Mergeability is being checked..." }),
139692
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: canMerge ? "Select merge method:" : "Merge is not available:" }),
139693
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexDirection: "column", children: MERGE_METHODS.map((m, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139694
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: index === selectedMethod ? theme14.colors.accent : theme14.colors.muted, children: index === selectedMethod ? ">" : " " }),
139695
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
139386
139696
  Text,
139387
139697
  {
139388
139698
  bold: index === selectedMethod,
@@ -139392,21 +139702,21 @@ function MergeModal({
139392
139702
  children: m.label
139393
139703
  }
139394
139704
  ),
139395
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
139705
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
139396
139706
  "- ",
139397
139707
  m.description
139398
139708
  ] })
139399
139709
  ] }, m.method)) }),
139400
- error48 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139401
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: canMerge ? "j/k: navigate | Enter: select | Esc: cancel" : "Esc: cancel" })
139710
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139711
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: canMerge ? "j/k: navigate | Enter: select | Esc: cancel" : "Esc: cancel" })
139402
139712
  ]
139403
139713
  }
139404
139714
  ) });
139405
139715
  }
139406
139716
 
139407
139717
  // src/components/pr/ReReviewModal.tsx
139408
- var import_react92 = __toESM(require_react(), 1);
139409
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
139718
+ var import_react93 = __toESM(require_react(), 1);
139719
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
139410
139720
  function getStatusColor(status, theme14) {
139411
139721
  switch (status) {
139412
139722
  case "APPROVED":
@@ -139463,8 +139773,8 @@ function ReReviewModal({
139463
139773
  error: error48
139464
139774
  }) {
139465
139775
  const theme14 = useTheme();
139466
- const [selectedIndex, setSelectedIndex] = (0, import_react92.useState)(0);
139467
- const [selected, setSelected] = (0, import_react92.useState)(/* @__PURE__ */ new Set());
139776
+ const [selectedIndex, setSelectedIndex] = (0, import_react93.useState)(0);
139777
+ const [selected, setSelected] = (0, import_react93.useState)(/* @__PURE__ */ new Set());
139468
139778
  use_input_default(
139469
139779
  (_input, key) => {
139470
139780
  if (isSubmitting) return;
@@ -139496,7 +139806,7 @@ function ReReviewModal({
139496
139806
  },
139497
139807
  { isActive: true }
139498
139808
  );
139499
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
139809
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
139500
139810
  Box_default,
139501
139811
  {
139502
139812
  flexDirection: "column",
@@ -139508,20 +139818,20 @@ function ReReviewModal({
139508
139818
  gap: 1,
139509
139819
  width: 50,
139510
139820
  children: [
139511
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Request Re-Review" }),
139512
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, children: "Select reviewers:" }),
139513
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexDirection: "column", children: reviewers.map((reviewer, index) => {
139821
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Request Re-Review" }),
139822
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.muted, children: "Select reviewers:" }),
139823
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { flexDirection: "column", children: reviewers.map((reviewer, index) => {
139514
139824
  const isSelected = selected.has(reviewer.login);
139515
139825
  const isFocused = index === selectedIndex;
139516
139826
  const statusColor = getStatusColor(reviewer.status, theme14);
139517
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { gap: 1, children: [
139518
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: isFocused ? theme14.colors.accent : theme14.colors.muted, children: isFocused ? ">" : " " }),
139519
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: isSelected ? theme14.colors.accent : theme14.colors.muted, children: [
139827
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { gap: 1, children: [
139828
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: isFocused ? theme14.colors.accent : theme14.colors.muted, children: isFocused ? ">" : " " }),
139829
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: isSelected ? theme14.colors.accent : theme14.colors.muted, children: [
139520
139830
  "[",
139521
139831
  isSelected ? "x" : " ",
139522
139832
  "]"
139523
139833
  ] }),
139524
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
139834
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
139525
139835
  Text,
139526
139836
  {
139527
139837
  color: isFocused ? theme14.colors.text : theme14.colors.secondary,
@@ -139530,22 +139840,189 @@ function ReReviewModal({
139530
139840
  children: reviewer.login
139531
139841
  }
139532
139842
  ),
139533
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: statusColor, children: [
139843
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: statusColor, children: [
139534
139844
  "(",
139535
139845
  getStatusLabel(reviewer.status),
139536
139846
  ")"
139537
139847
  ] })
139538
139848
  ] }, reviewer.login);
139539
139849
  }) }),
139540
- selected.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { color: theme14.colors.info, children: [
139850
+ selected.size > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme14.colors.info, children: [
139541
139851
  selected.size,
139542
139852
  " reviewer",
139543
139853
  selected.size > 1 ? "s" : "",
139544
139854
  " selected"
139545
139855
  ] }),
139546
- isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.info, children: "Requesting re-review..." }),
139547
- error48 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139548
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: toggle | Ctrl+S: submit | Esc: cancel" })
139856
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.info, children: "Requesting re-review..." }),
139857
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.error, children: error48 }),
139858
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: toggle | Ctrl+S: submit | Esc: cancel" })
139859
+ ]
139860
+ }
139861
+ ) });
139862
+ }
139863
+
139864
+ // src/components/pr/LabelPickerModal.tsx
139865
+ var import_react94 = __toESM(require_react(), 1);
139866
+ var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
139867
+ function hexToInkColor(hex3) {
139868
+ return `#${hex3}`;
139869
+ }
139870
+ function isLightColor(hex3) {
139871
+ const r = parseInt(hex3.substring(0, 2), 16);
139872
+ const g = parseInt(hex3.substring(2, 4), 16);
139873
+ const b = parseInt(hex3.substring(4, 6), 16);
139874
+ if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
139875
+ return false;
139876
+ }
139877
+ const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
139878
+ return luminance > 0.5;
139879
+ }
139880
+ function LabelPickerModal({
139881
+ repoLabels,
139882
+ currentLabels,
139883
+ onSubmit,
139884
+ onClose,
139885
+ isSubmitting,
139886
+ isLoading,
139887
+ error: error48
139888
+ }) {
139889
+ const theme14 = useTheme();
139890
+ const [selectedIndex, setSelectedIndex] = (0, import_react94.useState)(0);
139891
+ const [selectedLabels, setSelectedLabels] = (0, import_react94.useState)(
139892
+ () => new Set(currentLabels)
139893
+ );
139894
+ const hasChanges = (0, import_react94.useMemo)(() => {
139895
+ const currentSet = new Set(currentLabels);
139896
+ if (currentSet.size !== selectedLabels.size) return true;
139897
+ for (const label of selectedLabels) {
139898
+ if (!currentSet.has(label)) return true;
139899
+ }
139900
+ return false;
139901
+ }, [currentLabels, selectedLabels]);
139902
+ use_input_default(
139903
+ (_input, key) => {
139904
+ if (isSubmitting || isLoading) return;
139905
+ if (key.escape) {
139906
+ onClose();
139907
+ } else if (_input === "j" || key.downArrow) {
139908
+ setSelectedIndex((prev) => Math.min(prev + 1, repoLabels.length - 1));
139909
+ } else if (_input === "k" || key.upArrow) {
139910
+ setSelectedIndex((prev) => Math.max(prev - 1, 0));
139911
+ } else if (_input === " ") {
139912
+ const label = repoLabels[selectedIndex];
139913
+ if (label) {
139914
+ setSelectedLabels((prev) => {
139915
+ if (prev.has(label.name)) {
139916
+ return new Set([...prev].filter((l) => l !== label.name));
139917
+ }
139918
+ return /* @__PURE__ */ new Set([...prev, label.name]);
139919
+ });
139920
+ }
139921
+ } else if (key.return && !key.ctrl && !key.meta) {
139922
+ const label = repoLabels[selectedIndex];
139923
+ if (label) {
139924
+ setSelectedLabels((prev) => {
139925
+ if (prev.has(label.name)) {
139926
+ return new Set([...prev].filter((l) => l !== label.name));
139927
+ }
139928
+ return /* @__PURE__ */ new Set([...prev, label.name]);
139929
+ });
139930
+ }
139931
+ } else if (_input === "s" && key.ctrl) {
139932
+ if (hasChanges) {
139933
+ onSubmit([...selectedLabels]);
139934
+ }
139935
+ }
139936
+ },
139937
+ { isActive: true }
139938
+ );
139939
+ if (isLoading) {
139940
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
139941
+ Box_default,
139942
+ {
139943
+ flexDirection: "column",
139944
+ borderStyle: "round",
139945
+ borderColor: theme14.colors.accent,
139946
+ backgroundColor: theme14.colors.bg,
139947
+ paddingX: 2,
139948
+ paddingY: 1,
139949
+ gap: 1,
139950
+ width: 50,
139951
+ children: [
139952
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Labels" }),
139953
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, children: "Loading labels..." }),
139954
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Esc: cancel" })
139955
+ ]
139956
+ }
139957
+ ) });
139958
+ }
139959
+ if (repoLabels.length === 0) {
139960
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
139961
+ Box_default,
139962
+ {
139963
+ flexDirection: "column",
139964
+ borderStyle: "round",
139965
+ borderColor: theme14.colors.accent,
139966
+ backgroundColor: theme14.colors.bg,
139967
+ paddingX: 2,
139968
+ paddingY: 1,
139969
+ gap: 1,
139970
+ width: 50,
139971
+ children: [
139972
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Labels" }),
139973
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, children: "No labels available for this repository." }),
139974
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Esc: close" })
139975
+ ]
139976
+ }
139977
+ ) });
139978
+ }
139979
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
139980
+ Box_default,
139981
+ {
139982
+ flexDirection: "column",
139983
+ borderStyle: "round",
139984
+ borderColor: theme14.colors.accent,
139985
+ backgroundColor: theme14.colors.bg,
139986
+ paddingX: 2,
139987
+ paddingY: 1,
139988
+ gap: 1,
139989
+ width: 55,
139990
+ children: [
139991
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Labels" }),
139992
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, children: "Toggle labels for this PR:" }),
139993
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box_default, { flexDirection: "column", children: repoLabels.map((label, index) => {
139994
+ const isChecked = selectedLabels.has(label.name);
139995
+ const isFocused = index === selectedIndex;
139996
+ const labelColor = hexToInkColor(label.color);
139997
+ const textOnLabel = isLightColor(label.color) ? "#000000" : "#ffffff";
139998
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Box_default, { gap: 1, children: [
139999
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: isFocused ? theme14.colors.accent : theme14.colors.muted, children: isFocused ? ">" : " " }),
140000
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: isChecked ? theme14.colors.accent : theme14.colors.muted, children: [
140001
+ "[",
140002
+ isChecked ? "x" : " ",
140003
+ "]"
140004
+ ] }),
140005
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
140006
+ Text,
140007
+ {
140008
+ backgroundColor: labelColor,
140009
+ color: textOnLabel,
140010
+ bold: isFocused,
140011
+ children: ` ${label.name} `
140012
+ }
140013
+ ),
140014
+ label.description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: label.description })
140015
+ ] }, label.name);
140016
+ }) }),
140017
+ hasChanges && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: theme14.colors.info, children: [
140018
+ selectedLabels.size,
140019
+ " label",
140020
+ selectedLabels.size !== 1 ? "s" : "",
140021
+ " selected"
140022
+ ] }),
140023
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.info, children: "Applying labels..." }),
140024
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.error, children: error48 }),
140025
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Space/Enter: toggle | Ctrl+S: apply | Esc: cancel" })
139549
140026
  ]
139550
140027
  }
139551
140028
  ) });
@@ -139555,13 +140032,33 @@ function ReReviewModal({
139555
140032
  import { execFile as execFile3 } from "child_process";
139556
140033
  import { promisify as promisify2 } from "util";
139557
140034
  var execFileAsync2 = promisify2(execFile3);
139558
- function detectProvider(host) {
140035
+ function buildConfiguredHosts(config3) {
140036
+ const hosts = {};
140037
+ for (const h of config3.providers?.github?.hosts ?? []) {
140038
+ hosts[h.toLowerCase()] = "github";
140039
+ }
140040
+ for (const h of config3.providers?.gitlab?.hosts ?? []) {
140041
+ hosts[h.toLowerCase()] = "gitlab";
140042
+ }
140043
+ for (const h of config3.gitlab?.hosts ?? []) {
140044
+ hosts[h.toLowerCase()] = "gitlab";
140045
+ }
140046
+ for (const mapping of config3.hostMappings ?? []) {
140047
+ hosts[mapping.host.toLowerCase()] = mapping.provider;
140048
+ }
140049
+ return hosts;
140050
+ }
140051
+ function detectProvider(host, configuredHosts) {
139559
140052
  const lower = host.toLowerCase();
139560
140053
  if (lower === "github.com") return "github";
139561
140054
  if (lower === "gitlab.com") return "gitlab";
139562
140055
  if (lower === "bitbucket.org") return "bitbucket";
139563
140056
  if (lower.includes("dev.azure.com") || lower.includes("visualstudio.com")) return "azure";
139564
140057
  if (lower.includes("ssh.dev.azure.com")) return "azure";
140058
+ if (configuredHosts) {
140059
+ const mapped = configuredHosts[lower];
140060
+ if (mapped) return mapped;
140061
+ }
139565
140062
  return "unknown";
139566
140063
  }
139567
140064
  function getApiBaseUrl(provider, host) {
@@ -139620,50 +140117,83 @@ function parseAzureHttps(url3) {
139620
140117
  }
139621
140118
  return null;
139622
140119
  }
139623
- function parseSshUrl(url3) {
140120
+ function parseSshUrl(url3, configuredHosts) {
139624
140121
  const azureResult = parseAzureSsh(url3);
139625
140122
  if (azureResult) return azureResult;
139626
- const match15 = url3.match(/git@([^:]+):([^/]+)\/([^/.]+?)(?:\.git)?$/);
139627
- if (!match15?.[1] || !match15[2] || !match15[3]) return null;
140123
+ const match15 = url3.match(/git@([^:]+):(.+?)(?:\.git)?$/);
140124
+ if (!match15?.[1] || !match15[2]) return null;
139628
140125
  const host = match15[1];
139629
- const provider = detectProvider(host);
140126
+ const fullPath = match15[2];
140127
+ const provider = detectProvider(host, configuredHosts);
140128
+ const segments = fullPath.split("/");
140129
+ if (segments.length < 2) return null;
140130
+ if (provider === "gitlab" && segments.length > 2) {
140131
+ const repo2 = segments[segments.length - 1];
140132
+ const owner2 = segments.slice(0, -1).join("/");
140133
+ return {
140134
+ provider,
140135
+ host,
140136
+ owner: owner2,
140137
+ repo: repo2,
140138
+ baseUrl: getApiBaseUrl(provider, host)
140139
+ };
140140
+ }
140141
+ const owner = segments[0];
140142
+ const repo = segments[1];
140143
+ if (!owner || !repo) return null;
139630
140144
  return {
139631
140145
  provider,
139632
140146
  host,
139633
- owner: match15[2],
139634
- repo: match15[3],
140147
+ owner,
140148
+ repo,
139635
140149
  baseUrl: getApiBaseUrl(provider, host)
139636
140150
  };
139637
140151
  }
139638
- function parseHttpsUrl(url3) {
140152
+ function parseHttpsUrl(url3, configuredHosts) {
139639
140153
  const azureResult = parseAzureHttps(url3);
139640
140154
  if (azureResult) return azureResult;
139641
- const match15 = url3.match(
139642
- /https?:\/\/([^/]+)\/([^/]+)\/([^/?#.]+?)(?:\.git)?$/
139643
- );
139644
- if (!match15?.[1] || !match15[2] || !match15[3]) return null;
139645
- const host = match15[1];
139646
- const provider = detectProvider(host);
140155
+ const baseMatch = url3.match(/https?:\/\/([^/]+)\/(.+?)(?:\.git)?$/);
140156
+ if (!baseMatch?.[1] || !baseMatch[2]) return null;
140157
+ const host = baseMatch[1];
140158
+ const fullPath = baseMatch[2];
140159
+ const provider = detectProvider(host, configuredHosts);
140160
+ const cleanPath = fullPath.replace(/[?#].*$/, "");
140161
+ const segments = cleanPath.split("/").filter((s) => s.length > 0);
140162
+ if (segments.length < 2) return null;
140163
+ if (provider === "gitlab" && segments.length > 2) {
140164
+ const repo2 = segments[segments.length - 1];
140165
+ const owner2 = segments.slice(0, -1).join("/");
140166
+ return {
140167
+ provider,
140168
+ host,
140169
+ owner: owner2,
140170
+ repo: repo2,
140171
+ baseUrl: getApiBaseUrl(provider, host)
140172
+ };
140173
+ }
140174
+ const owner = segments[0];
140175
+ const repo = segments[1];
140176
+ if (!owner || !repo) return null;
139647
140177
  return {
139648
140178
  provider,
139649
140179
  host,
139650
- owner: match15[2],
139651
- repo: match15[3],
140180
+ owner,
140181
+ repo,
139652
140182
  baseUrl: getApiBaseUrl(provider, host)
139653
140183
  };
139654
140184
  }
139655
- function parseGitRemote(url3) {
140185
+ function parseGitRemote(url3, configuredHosts) {
139656
140186
  if (!url3) return null;
139657
140187
  const trimmed2 = url3.trim();
139658
140188
  if (trimmed2.startsWith("git@")) {
139659
- return parseSshUrl(trimmed2);
140189
+ return parseSshUrl(trimmed2, configuredHosts);
139660
140190
  }
139661
140191
  if (trimmed2.startsWith("http://") || trimmed2.startsWith("https://")) {
139662
- return parseHttpsUrl(trimmed2);
140192
+ return parseHttpsUrl(trimmed2, configuredHosts);
139663
140193
  }
139664
140194
  return null;
139665
140195
  }
139666
- function parsePRUrl(url3) {
140196
+ function parsePRUrl(url3, configuredHosts) {
139667
140197
  if (!url3) return null;
139668
140198
  const ghMatch = url3.match(
139669
140199
  /https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/
@@ -139677,15 +140207,22 @@ function parsePRUrl(url3) {
139677
140207
  };
139678
140208
  }
139679
140209
  const glMatch = url3.match(
139680
- /https?:\/\/gitlab\.com\/([^/]+)\/([^/]+)\/-\/merge_requests\/(\d+)/
140210
+ /https?:\/\/([^/]+)\/(.+?)\/-\/merge_requests\/(\d+)/
139681
140211
  );
139682
140212
  if (glMatch?.[1] && glMatch[2] && glMatch[3]) {
139683
- return {
139684
- provider: "gitlab",
139685
- owner: glMatch[1],
139686
- repo: glMatch[2],
139687
- number: parseInt(glMatch[3], 10)
139688
- };
140213
+ const glHost = glMatch[1];
140214
+ const glProvider = detectProvider(glHost, configuredHosts);
140215
+ if (glProvider === "gitlab") {
140216
+ const pathSegments = glMatch[2].split("/");
140217
+ const repo = pathSegments[pathSegments.length - 1];
140218
+ const owner = pathSegments.length > 1 ? pathSegments.slice(0, -1).join("/") : pathSegments[0];
140219
+ return {
140220
+ provider: "gitlab",
140221
+ owner,
140222
+ repo,
140223
+ number: parseInt(glMatch[3], 10)
140224
+ };
140225
+ }
139689
140226
  }
139690
140227
  const bbMatch = url3.match(
139691
140228
  /https?:\/\/bitbucket\.org\/([^/]+)\/([^/]+)\/pull-requests\/(\d+)/
@@ -139755,7 +140292,7 @@ function extractRepoFromPRUrl(url3) {
139755
140292
  if (!match15?.[1] || !match15[2]) return null;
139756
140293
  return `${match15[1]}/${match15[2]}`;
139757
140294
  }
139758
- async function detectGitRepo() {
140295
+ async function detectGitRepo(configuredHosts) {
139759
140296
  try {
139760
140297
  await execFileAsync2("git", ["rev-parse", "--git-dir"]);
139761
140298
  const { stdout } = await execFileAsync2("git", [
@@ -139764,7 +140301,7 @@ async function detectGitRepo() {
139764
140301
  "origin"
139765
140302
  ]);
139766
140303
  const remoteUrl = stdout.trim();
139767
- const parsed = parseGitRemote(remoteUrl);
140304
+ const parsed = parseGitRemote(remoteUrl, configuredHosts);
139768
140305
  return {
139769
140306
  isGitRepo: true,
139770
140307
  owner: parsed?.owner ?? null,
@@ -139851,7 +140388,7 @@ async function checkoutPR(prNumber) {
139851
140388
  }
139852
140389
 
139853
140390
  // src/hooks/useReadState.ts
139854
- var import_react93 = __toESM(require_react(), 1);
140391
+ var import_react95 = __toESM(require_react(), 1);
139855
140392
  import { readFileSync as readFileSync3 } from "fs";
139856
140393
  import { join as join6 } from "path";
139857
140394
  import { homedir as homedir4 } from "os";
@@ -139926,18 +140463,18 @@ function createReadStateStore() {
139926
140463
  }
139927
140464
  var store6 = createReadStateStore();
139928
140465
  function useReadState() {
139929
- const readState = (0, import_react93.useSyncExternalStore)(
140466
+ const readState = (0, import_react95.useSyncExternalStore)(
139930
140467
  store6.subscribe,
139931
140468
  store6.getSnapshot,
139932
140469
  () => ({})
139933
140470
  );
139934
- const markAsRead = (0, import_react93.useCallback)(
140471
+ const markAsRead = (0, import_react95.useCallback)(
139935
140472
  (htmlUrl, prUpdatedAt) => {
139936
140473
  store6.markAsRead(htmlUrl, prUpdatedAt);
139937
140474
  },
139938
140475
  []
139939
140476
  );
139940
- const isUnread = (0, import_react93.useCallback)(
140477
+ const isUnread = (0, import_react95.useCallback)(
139941
140478
  (htmlUrl, prUpdatedAt) => {
139942
140479
  return store6.isUnread(htmlUrl, prUpdatedAt);
139943
140480
  },
@@ -139949,14 +140486,14 @@ function useReadState() {
139949
140486
  }
139950
140487
 
139951
140488
  // src/hooks/useManualRefresh.ts
139952
- var import_react94 = __toESM(require_react(), 1);
140489
+ var import_react96 = __toESM(require_react(), 1);
139953
140490
  function useManualRefresh({
139954
140491
  isActive: isActive2 = true,
139955
140492
  queryKeys
139956
140493
  } = {}) {
139957
140494
  const queryClient2 = useQueryClient();
139958
140495
  const { setStatusMessage } = useStatusMessage();
139959
- const refresh = (0, import_react94.useCallback)(() => {
140496
+ const refresh = (0, import_react96.useCallback)(() => {
139960
140497
  if (queryKeys && queryKeys.length > 0) {
139961
140498
  queryKeys.forEach((key) => {
139962
140499
  queryClient2.invalidateQueries({ queryKey: key });
@@ -139978,7 +140515,7 @@ function useManualRefresh({
139978
140515
  }
139979
140516
 
139980
140517
  // src/screens/PRDetailScreen.tsx
139981
- var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
140518
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
139982
140519
  var PR_DETAIL_RESERVED_LINES = 12;
139983
140520
  function PRDetailScreen({
139984
140521
  pr,
@@ -139993,15 +140530,17 @@ function PRDetailScreen({
139993
140530
  const { setStatusMessage } = useStatusMessage();
139994
140531
  const { markAsRead } = useReadState();
139995
140532
  const theme14 = useTheme();
139996
- const [currentTab, setCurrentTab] = (0, import_react95.useState)(0);
139997
- const [showDiscardConfirm, setShowDiscardConfirm] = (0, import_react95.useState)(false);
139998
- const [showDraftConfirm, setShowDraftConfirm] = (0, import_react95.useState)(false);
139999
- const [initialFile, setInitialFile] = (0, import_react95.useState)(void 0);
140533
+ const [currentTab, setCurrentTab] = (0, import_react97.useState)(0);
140534
+ const [showDiscardConfirm, setShowDiscardConfirm] = (0, import_react97.useState)(false);
140535
+ const [showDraftConfirm, setShowDraftConfirm] = (0, import_react97.useState)(false);
140536
+ const [showLabelPicker, setShowLabelPicker] = (0, import_react97.useState)(false);
140537
+ const [labelError, setLabelError] = (0, import_react97.useState)(null);
140538
+ const [initialFile, setInitialFile] = (0, import_react97.useState)(void 0);
140000
140539
  const contentHeight = Math.max(1, (stdout?.rows ?? 24) - PR_DETAIL_RESERVED_LINES);
140001
- import_react95.default.useEffect(() => {
140540
+ import_react97.default.useEffect(() => {
140002
140541
  markAsRead(pr.html_url, pr.updated_at);
140003
140542
  }, [pr.html_url, pr.updated_at, markAsRead]);
140004
- import_react95.default.useEffect(() => {
140543
+ import_react97.default.useEffect(() => {
140005
140544
  const tabContexts = [
140006
140545
  "pr-detail-description",
140007
140546
  "pr-detail-conversations",
@@ -140011,8 +140550,8 @@ function PRDetailScreen({
140011
140550
  ];
140012
140551
  setScreenContext(tabContexts[currentTab] ?? "pr-detail-description");
140013
140552
  }, [currentTab]);
140014
- const visitedTabsRef = (0, import_react95.useRef)(/* @__PURE__ */ new Set([0]));
140015
- import_react95.default.useEffect(() => {
140553
+ const visitedTabsRef = (0, import_react97.useRef)(/* @__PURE__ */ new Set([0]));
140554
+ import_react97.default.useEffect(() => {
140016
140555
  if (!visitedTabsRef.current.has(currentTab)) {
140017
140556
  visitedTabsRef.current = /* @__PURE__ */ new Set([...visitedTabsRef.current, currentTab]);
140018
140557
  }
@@ -140057,7 +140596,13 @@ function PRDetailScreen({
140057
140596
  });
140058
140597
  const convertToDraft = useConvertToDraft();
140059
140598
  const markReady = useMarkReadyForReview();
140060
- const handleReviewSubmit = (0, import_react95.useCallback)(
140599
+ const setLabelsMutation = useSetLabels();
140600
+ const { data: repoLabels = [], isLoading: labelsLoading } = useRepoLabels(
140601
+ owner,
140602
+ repo,
140603
+ { enabled: showLabelPicker }
140604
+ );
140605
+ const handleReviewSubmit = (0, import_react97.useCallback)(
140061
140606
  (body, event) => {
140062
140607
  if (pendingReview.isActive) {
140063
140608
  pendingReview.submitReview(body, event);
@@ -140068,7 +140613,7 @@ function PRDetailScreen({
140068
140613
  },
140069
140614
  [pendingReview, modals]
140070
140615
  );
140071
- const handleCommentSubmit = (0, import_react95.useCallback)(
140616
+ const handleCommentSubmit = (0, import_react97.useCallback)(
140072
140617
  (body) => {
140073
140618
  if (pendingReview.isActive && modals.inlineContext) {
140074
140619
  pendingReview.addPendingComment(
@@ -140089,13 +140634,14 @@ function PRDetailScreen({
140089
140634
  },
140090
140635
  [pendingReview, modals]
140091
140636
  );
140092
- const handleGoToFile = (0, import_react95.useCallback)((path) => {
140637
+ const handleGoToFile = (0, import_react97.useCallback)((path) => {
140093
140638
  setInitialFile(path);
140094
140639
  setCurrentTab(3);
140095
140640
  setStatusMessage(`Jumped to ${path}`);
140096
140641
  }, [setStatusMessage]);
140642
+ const anyModalOpen = modals.hasModal || showLabelPicker;
140097
140643
  useManualRefresh({
140098
- isActive: !modals.hasModal
140644
+ isActive: !anyModalOpen
140099
140645
  });
140100
140646
  use_input_default(
140101
140647
  (input, key) => {
@@ -140194,6 +140740,9 @@ function PRDetailScreen({
140194
140740
  }
140195
140741
  } else if (input === "T") {
140196
140742
  modals.handleOpenEditTitle({ title: activePR.title });
140743
+ } else if (input === "L") {
140744
+ setLabelError(null);
140745
+ setShowLabelPicker(true);
140197
140746
  } else if (input === "G") {
140198
140747
  setStatusMessage("Checking out PR #" + pr.number + "...", 1e4);
140199
140748
  checkoutPR(pr.number).then((result) => {
@@ -140215,23 +140764,23 @@ function PRDetailScreen({
140215
140764
  }
140216
140765
  }
140217
140766
  },
140218
- { isActive: !modals.hasModal }
140767
+ { isActive: !anyModalOpen }
140219
140768
  );
140220
140769
  const renderTabContent = () => {
140221
140770
  if (isLoading) {
140222
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoadingIndicator, { message: "Loading PR details..." });
140771
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadingIndicator, { message: "Loading PR details..." });
140223
140772
  }
140224
140773
  return Match_exports.value(currentTab).pipe(
140225
- Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140774
+ Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140226
140775
  DescriptionTab,
140227
140776
  {
140228
140777
  pr: activePR,
140229
140778
  reviews,
140230
- isActive: !modals.hasModal,
140779
+ isActive: !anyModalOpen,
140231
140780
  onEditDescription: modals.handleOpenEditDescription
140232
140781
  }
140233
140782
  )),
140234
- Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140783
+ Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140235
140784
  ConversationsTab,
140236
140785
  {
140237
140786
  pr: activePR,
@@ -140239,7 +140788,7 @@ function PRDetailScreen({
140239
140788
  reviews,
140240
140789
  reviewThreads,
140241
140790
  issueComments,
140242
- isActive: !modals.hasModal,
140791
+ isActive: !anyModalOpen,
140243
140792
  showResolved: modals.showResolved,
140244
140793
  currentUser: currentUser?.login,
140245
140794
  onComment: modals.handleOpenGeneralComment,
@@ -140251,12 +140800,12 @@ function PRDetailScreen({
140251
140800
  onGoToFile: handleGoToFile
140252
140801
  }
140253
140802
  )),
140254
- Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CommitsTab, { commits, isActive: !modals.hasModal, owner, repo })),
140255
- Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140803
+ Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CommitsTab, { commits, isActive: !anyModalOpen, owner, repo })),
140804
+ Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140256
140805
  FilesTab,
140257
140806
  {
140258
140807
  files,
140259
- isActive: !modals.hasModal,
140808
+ isActive: !anyModalOpen,
140260
140809
  prUrl: activePR.html_url,
140261
140810
  onInlineComment: modals.handleOpenInlineComment,
140262
140811
  comments,
@@ -140269,32 +140818,32 @@ function PRDetailScreen({
140269
140818
  onInitialFileConsumed: () => setInitialFile(void 0)
140270
140819
  }
140271
140820
  )),
140272
- Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140821
+ Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140273
140822
  ChecksTab,
140274
140823
  {
140275
140824
  owner,
140276
140825
  repo,
140277
140826
  sha: activePR.head.sha,
140278
- isActive: !modals.hasModal
140827
+ isActive: !anyModalOpen
140279
140828
  }
140280
140829
  )),
140281
- Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140830
+ Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140282
140831
  DescriptionTab,
140283
140832
  {
140284
140833
  pr: activePR,
140285
140834
  reviews,
140286
- isActive: !modals.hasModal,
140835
+ isActive: !anyModalOpen,
140287
140836
  onEditDescription: modals.handleOpenEditDescription
140288
140837
  }
140289
140838
  ))
140290
140839
  );
140291
140840
  };
140292
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, children: [
140293
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { flexShrink: 0, flexDirection: "column", children: [
140294
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PRHeader, { pr: activePR, prIndex, prTotal }),
140295
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PRTabs, { activeIndex: currentTab, onChange: setCurrentTab })
140841
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, children: [
140842
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { flexShrink: 0, flexDirection: "column", children: [
140843
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PRHeader, { pr: activePR, prIndex, prTotal }),
140844
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PRTabs, { activeIndex: currentTab, onChange: setCurrentTab })
140296
140845
  ] }),
140297
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140846
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140298
140847
  Box_default,
140299
140848
  {
140300
140849
  flexShrink: 0,
@@ -140308,31 +140857,31 @@ function PRDetailScreen({
140308
140857
  children: renderTabContent()
140309
140858
  }
140310
140859
  ),
140311
- pendingReview.isActive && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { paddingX: 1, children: [
140312
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140860
+ pendingReview.isActive && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { paddingX: 1, children: [
140861
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140313
140862
  "Review in progress (",
140314
140863
  pendingReview.pendingCount,
140315
140864
  " pending comment",
140316
140865
  pendingReview.pendingCount !== 1 ? "s" : "",
140317
140866
  ")"
140318
140867
  ] }),
140319
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.muted, children: " | R: submit | q: discard" })
140868
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: " | R: submit | q: discard" })
140320
140869
  ] }),
140321
- showDiscardConfirm && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { paddingX: 1, flexDirection: "column", children: [
140322
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140870
+ showDiscardConfirm && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { paddingX: 1, flexDirection: "column", children: [
140871
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140323
140872
  "Discard pending review with ",
140324
140873
  pendingReview.pendingCount,
140325
140874
  " comment",
140326
140875
  pendingReview.pendingCount !== 1 ? "s" : "",
140327
140876
  "? (y/n)"
140328
140877
  ] }),
140329
- pendingReview.pendingComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: pendingReview.pendingComments.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme14.colors.muted, children: [
140878
+ pendingReview.pendingComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: pendingReview.pendingComments.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.muted, children: [
140330
140879
  c.path,
140331
140880
  ":",
140332
140881
  c.line
140333
140882
  ] }, `${c.path}-${c.line}-${i}`)) })
140334
140883
  ] }),
140335
- modals.showReviewModal && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140884
+ modals.showReviewModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140336
140885
  ReviewModal,
140337
140886
  {
140338
140887
  onSubmit: handleReviewSubmit,
@@ -140341,7 +140890,7 @@ function PRDetailScreen({
140341
140890
  error: pendingReview.isActive ? pendingReview.error : modals.reviewError
140342
140891
  }
140343
140892
  ),
140344
- modals.showCommentModal && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140893
+ modals.showCommentModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140345
140894
  CommentModal,
140346
140895
  {
140347
140896
  title: pendingReview.isActive && modals.inlineContext ? "Add Pending Comment" : modals.commentModalTitle,
@@ -140353,13 +140902,13 @@ function PRDetailScreen({
140353
140902
  error: pendingReview.isActive ? pendingReview.error : modals.commentError
140354
140903
  }
140355
140904
  ),
140356
- showDraftConfirm && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme14.colors.warning, bold: true, children: activePR.draft ? `Mark PR #${pr.number} as ready for review? (y/n)` : `Convert PR #${pr.number} to draft? (y/n)` }) }),
140357
- modals.showCloseConfirm && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140905
+ showDraftConfirm && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.warning, bold: true, children: activePR.draft ? `Mark PR #${pr.number} as ready for review? (y/n)` : `Convert PR #${pr.number} to draft? (y/n)` }) }),
140906
+ modals.showCloseConfirm && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140358
140907
  "Close PR #",
140359
140908
  pr.number,
140360
140909
  "? This will not delete the branch. (y/n)"
140361
140910
  ] }) }),
140362
- modals.showMergeModal && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140911
+ modals.showMergeModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140363
140912
  MergeModal,
140364
140913
  {
140365
140914
  pr: activePR,
@@ -140369,7 +140918,7 @@ function PRDetailScreen({
140369
140918
  error: modals.mergeError
140370
140919
  }
140371
140920
  ),
140372
- modals.showReReviewModal && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
140921
+ modals.showReReviewModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140373
140922
  ReReviewModal,
140374
140923
  {
140375
140924
  reviewers: buildReviewerList(reviews, activePR.requested_reviewers),
@@ -140378,27 +140927,56 @@ function PRDetailScreen({
140378
140927
  isSubmitting: modals.requestReReviewPending,
140379
140928
  error: modals.reReviewError
140380
140929
  }
140930
+ ),
140931
+ showLabelPicker && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140932
+ LabelPickerModal,
140933
+ {
140934
+ repoLabels,
140935
+ currentLabels: activePR.labels.map((l) => l.name),
140936
+ onSubmit: (labels) => {
140937
+ setLabelsMutation.mutate(
140938
+ { owner, repo, prNumber: pr.number, labels },
140939
+ {
140940
+ onSuccess: () => {
140941
+ setShowLabelPicker(false);
140942
+ setLabelError(null);
140943
+ setStatusMessage("Labels updated");
140944
+ },
140945
+ onError: (err) => {
140946
+ setLabelError(String(err));
140947
+ }
140948
+ }
140949
+ );
140950
+ },
140951
+ onClose: () => {
140952
+ setShowLabelPicker(false);
140953
+ setLabelError(null);
140954
+ },
140955
+ isSubmitting: setLabelsMutation.isPending,
140956
+ isLoading: labelsLoading,
140957
+ error: labelError
140958
+ }
140381
140959
  )
140382
140960
  ] });
140383
140961
  }
140384
140962
 
140385
140963
  // src/screens/MyPRsScreen.tsx
140386
- var import_react104 = __toESM(require_react(), 1);
140964
+ var import_react106 = __toESM(require_react(), 1);
140387
140965
 
140388
140966
  // src/screens/PRListScreen.tsx
140389
- var import_react103 = __toESM(require_react(), 1);
140967
+ var import_react105 = __toESM(require_react(), 1);
140390
140968
 
140391
140969
  // src/hooks/usePagination.ts
140392
- var import_react96 = __toESM(require_react(), 1);
140970
+ var import_react98 = __toESM(require_react(), 1);
140393
140971
  function usePagination(items, options = {}) {
140394
140972
  const pageSize = options.pageSize ?? 18;
140395
- const [currentPage, setCurrentPage] = (0, import_react96.useState)(1);
140396
- const prevItemsLengthRef = (0, import_react96.useRef)(items.length);
140397
- const totalPages = (0, import_react96.useMemo)(
140973
+ const [currentPage, setCurrentPage] = (0, import_react98.useState)(1);
140974
+ const prevItemsLengthRef = (0, import_react98.useRef)(items.length);
140975
+ const totalPages = (0, import_react98.useMemo)(
140398
140976
  () => Math.max(1, Math.ceil(items.length / pageSize)),
140399
140977
  [items.length, pageSize]
140400
140978
  );
140401
- (0, import_react96.useEffect)(() => {
140979
+ (0, import_react98.useEffect)(() => {
140402
140980
  if (items.length !== prevItemsLengthRef.current) {
140403
140981
  setCurrentPage(1);
140404
140982
  prevItemsLengthRef.current = items.length;
@@ -140407,23 +140985,23 @@ function usePagination(items, options = {}) {
140407
140985
  const safePage = Math.min(currentPage, totalPages);
140408
140986
  const startIndex = (safePage - 1) * pageSize;
140409
140987
  const endIndex = Math.min(startIndex + pageSize, items.length);
140410
- const pageItems = (0, import_react96.useMemo)(
140988
+ const pageItems = (0, import_react98.useMemo)(
140411
140989
  () => items.slice(startIndex, endIndex),
140412
140990
  [items, startIndex, endIndex]
140413
140991
  );
140414
140992
  const hasNextPage = safePage < totalPages;
140415
140993
  const hasPrevPage = safePage > 1;
140416
- const nextPage = (0, import_react96.useCallback)(() => {
140994
+ const nextPage = (0, import_react98.useCallback)(() => {
140417
140995
  if (hasNextPage) {
140418
140996
  setCurrentPage((p) => p + 1);
140419
140997
  }
140420
140998
  }, [hasNextPage]);
140421
- const prevPage = (0, import_react96.useCallback)(() => {
140999
+ const prevPage = (0, import_react98.useCallback)(() => {
140422
141000
  if (hasPrevPage) {
140423
141001
  setCurrentPage((p) => p - 1);
140424
141002
  }
140425
141003
  }, [hasPrevPage]);
140426
- const goToPage = (0, import_react96.useCallback)(
141004
+ const goToPage = (0, import_react98.useCallback)(
140427
141005
  (page) => {
140428
141006
  const clampedPage = Math.max(1, Math.min(page, totalPages));
140429
141007
  setCurrentPage(clampedPage);
@@ -140445,7 +141023,7 @@ function usePagination(items, options = {}) {
140445
141023
  }
140446
141024
 
140447
141025
  // src/hooks/useFilter.ts
140448
- var import_react97 = __toESM(require_react(), 1);
141026
+ var import_react99 = __toESM(require_react(), 1);
140449
141027
  var defaultFilter = {
140450
141028
  search: "",
140451
141029
  repo: null,
@@ -140498,8 +141076,8 @@ function comparePRs(a, b, sortBy, sortDirection) {
140498
141076
  return sortDirection === "asc" ? -comparison : comparison;
140499
141077
  }
140500
141078
  function useFilter(items) {
140501
- const [filter9, setFilter] = (0, import_react97.useState)(defaultFilter);
140502
- const availableRepos = (0, import_react97.useMemo)(() => {
141079
+ const [filter9, setFilter] = (0, import_react99.useState)(defaultFilter);
141080
+ const availableRepos = (0, import_react99.useMemo)(() => {
140503
141081
  const repos = /* @__PURE__ */ new Set();
140504
141082
  items.forEach((pr) => {
140505
141083
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -140507,17 +141085,17 @@ function useFilter(items) {
140507
141085
  });
140508
141086
  return Array.from(repos).sort();
140509
141087
  }, [items]);
140510
- const availableAuthors = (0, import_react97.useMemo)(() => {
141088
+ const availableAuthors = (0, import_react99.useMemo)(() => {
140511
141089
  const authors = /* @__PURE__ */ new Set();
140512
141090
  items.forEach((pr) => authors.add(pr.user.login));
140513
141091
  return Array.from(authors).sort();
140514
141092
  }, [items]);
140515
- const availableLabels = (0, import_react97.useMemo)(() => {
141093
+ const availableLabels = (0, import_react99.useMemo)(() => {
140516
141094
  const labels = /* @__PURE__ */ new Set();
140517
141095
  items.forEach((pr) => pr.labels.forEach((l) => labels.add(l.name)));
140518
141096
  return Array.from(labels).sort();
140519
141097
  }, [items]);
140520
- const repoFacets = (0, import_react97.useMemo)(() => {
141098
+ const repoFacets = (0, import_react99.useMemo)(() => {
140521
141099
  const counts = /* @__PURE__ */ new Map();
140522
141100
  items.forEach((pr) => {
140523
141101
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -140525,14 +141103,14 @@ function useFilter(items) {
140525
141103
  });
140526
141104
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
140527
141105
  }, [items]);
140528
- const authorFacets = (0, import_react97.useMemo)(() => {
141106
+ const authorFacets = (0, import_react99.useMemo)(() => {
140529
141107
  const counts = /* @__PURE__ */ new Map();
140530
141108
  items.forEach((pr) => {
140531
141109
  counts.set(pr.user.login, (counts.get(pr.user.login) ?? 0) + 1);
140532
141110
  });
140533
141111
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
140534
141112
  }, [items]);
140535
- const labelFacets = (0, import_react97.useMemo)(() => {
141113
+ const labelFacets = (0, import_react99.useMemo)(() => {
140536
141114
  const counts = /* @__PURE__ */ new Map();
140537
141115
  items.forEach(
140538
141116
  (pr) => pr.labels.forEach((l) => {
@@ -140541,31 +141119,31 @@ function useFilter(items) {
140541
141119
  );
140542
141120
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
140543
141121
  }, [items]);
140544
- const filteredItems = (0, import_react97.useMemo)(() => {
141122
+ const filteredItems = (0, import_react99.useMemo)(() => {
140545
141123
  return items.filter((pr) => matchesSearch(pr, filter9.search)).filter((pr) => matchesRepo(pr, filter9.repo)).filter((pr) => matchesAuthor(pr, filter9.author)).filter((pr) => matchesLabel(pr, filter9.label)).sort((a, b) => comparePRs(a, b, filter9.sortBy, filter9.sortDirection));
140546
141124
  }, [items, filter9]);
140547
- const setSearch = (0, import_react97.useCallback)((search) => {
141125
+ const setSearch = (0, import_react99.useCallback)((search) => {
140548
141126
  setFilter((prev) => ({ ...prev, search }));
140549
141127
  }, []);
140550
- const setRepo = (0, import_react97.useCallback)((repo) => {
141128
+ const setRepo = (0, import_react99.useCallback)((repo) => {
140551
141129
  setFilter((prev) => ({ ...prev, repo }));
140552
141130
  }, []);
140553
- const setAuthor = (0, import_react97.useCallback)((author) => {
141131
+ const setAuthor = (0, import_react99.useCallback)((author) => {
140554
141132
  setFilter((prev) => ({ ...prev, author }));
140555
141133
  }, []);
140556
- const setLabel = (0, import_react97.useCallback)((label) => {
141134
+ const setLabel = (0, import_react99.useCallback)((label) => {
140557
141135
  setFilter((prev) => ({ ...prev, label }));
140558
141136
  }, []);
140559
- const setSortBy = (0, import_react97.useCallback)((sortBy) => {
141137
+ const setSortBy = (0, import_react99.useCallback)((sortBy) => {
140560
141138
  setFilter((prev) => ({ ...prev, sortBy }));
140561
141139
  }, []);
140562
- const toggleSortDirection = (0, import_react97.useCallback)(() => {
141140
+ const toggleSortDirection = (0, import_react99.useCallback)(() => {
140563
141141
  setFilter((prev) => ({
140564
141142
  ...prev,
140565
141143
  sortDirection: prev.sortDirection === "asc" ? "desc" : "asc"
140566
141144
  }));
140567
141145
  }, []);
140568
- const clearFilters = (0, import_react97.useCallback)(() => {
141146
+ const clearFilters = (0, import_react99.useCallback)(() => {
140569
141147
  setFilter(defaultFilter);
140570
141148
  }, []);
140571
141149
  const hasActiveFilters = filter9.search !== "" || filter9.repo !== null || filter9.author !== null || filter9.label !== null;
@@ -140590,7 +141168,7 @@ function useFilter(items) {
140590
141168
  }
140591
141169
 
140592
141170
  // src/components/pr/CheckStatusIcon.tsx
140593
- var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
141171
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
140594
141172
  function CheckStatusIcon({
140595
141173
  owner,
140596
141174
  repo,
@@ -140600,23 +141178,23 @@ function CheckStatusIcon({
140600
141178
  const theme14 = useTheme();
140601
141179
  const { data } = useCheckRuns(owner, repo, sha, { enabled: enabled2 });
140602
141180
  if (!data || data.total_count === 0) {
140603
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141181
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
140604
141182
  }
140605
141183
  const summary5 = summarizeChecks(data.check_runs);
140606
141184
  if (summary5.conclusion === "success") {
140607
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.success, children: "\u2713" });
141185
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.success, children: "\u2713" });
140608
141186
  }
140609
141187
  if (summary5.conclusion === "failure") {
140610
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.error, children: "\u2717" });
141188
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.error, children: "\u2717" });
140611
141189
  }
140612
141190
  if (summary5.conclusion === "pending") {
140613
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.warning, children: "\u25CF" });
141191
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.warning, children: "\u25CF" });
140614
141192
  }
140615
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141193
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
140616
141194
  }
140617
141195
 
140618
141196
  // src/components/pr/ReviewStatusIcon.tsx
140619
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
141197
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
140620
141198
  function getReviewDecision(reviews) {
140621
141199
  if (reviews.length === 0) return "none";
140622
141200
  const latestByUser = /* @__PURE__ */ new Map();
@@ -140640,23 +141218,23 @@ function ReviewStatusIcon({
140640
141218
  const theme14 = useTheme();
140641
141219
  const { data: reviews } = usePRReviews(owner, repo, prNumber, { enabled: enabled2 });
140642
141220
  if (!reviews || reviews.length === 0) {
140643
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141221
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
140644
141222
  }
140645
141223
  const decision = getReviewDecision(reviews);
140646
141224
  if (decision === "approved") {
140647
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.success, children: "A" });
141225
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.success, children: "A" });
140648
141226
  }
140649
141227
  if (decision === "changes_requested") {
140650
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.error, children: "!" });
141228
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.error, children: "!" });
140651
141229
  }
140652
141230
  if (decision === "pending") {
140653
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.warning, children: "R" });
141231
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.warning, children: "R" });
140654
141232
  }
140655
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141233
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
140656
141234
  }
140657
141235
 
140658
141236
  // src/components/pr/PRListItem.tsx
140659
- var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
141237
+ var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
140660
141238
  function PRListItem({
140661
141239
  item,
140662
141240
  isFocus
@@ -140669,13 +141247,13 @@ function PRListItem({
140669
141247
  const repoName = extractRepoFromPRUrl(item.html_url);
140670
141248
  const ownerRepo = parseGitHubPRUrl(item.html_url);
140671
141249
  const headSha = item.head.sha;
140672
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
140673
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { gap: 1, children: [
140674
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: stateColor, bold: true, children: stateIcon }),
140675
- ownerRepo && headSha && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, sha: headSha, enabled: isFocus }),
140676
- ownerRepo && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ReviewStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, prNumber: item.number, enabled: isFocus }),
140677
- unread && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "*" }),
140678
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
141250
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
141251
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { gap: 1, children: [
141252
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: stateColor, bold: true, children: stateIcon }),
141253
+ ownerRepo && headSha && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, sha: headSha, enabled: isFocus }),
141254
+ ownerRepo && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ReviewStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, prNumber: item.number, enabled: isFocus }),
141255
+ unread && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "*" }),
141256
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
140679
141257
  Text,
140680
141258
  {
140681
141259
  color: isFocus ? theme14.colors.listSelectedFg : unread ? theme14.colors.accent : theme14.colors.text,
@@ -140687,7 +141265,7 @@ function PRListItem({
140687
141265
  ]
140688
141266
  }
140689
141267
  ),
140690
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
141268
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
140691
141269
  Text,
140692
141270
  {
140693
141271
  color: isFocus ? theme14.colors.listSelectedFg : unread ? theme14.colors.accent : theme14.colors.text,
@@ -140696,11 +141274,11 @@ function PRListItem({
140696
141274
  children: item.title
140697
141275
  }
140698
141276
  ),
140699
- item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { gap: 0, children: item.labels.map(
141277
+ item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { gap: 0, children: item.labels.map(
140700
141278
  (label) => {
140701
141279
  const bgColor = label.color ? normalizeHexColor(label.color) : void 0;
140702
141280
  const fgColor = label.color ? contrastForeground(label.color) : theme14.colors.muted;
140703
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
141281
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
140704
141282
  Text,
140705
141283
  {
140706
141284
  color: fgColor,
@@ -140713,28 +141291,28 @@ function PRListItem({
140713
141291
  }
140714
141292
  ) })
140715
141293
  ] }),
140716
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { gap: 1, paddingLeft: 3, children: [
140717
- repoName && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
140718
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.secondary, children: repoName }),
140719
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "|" })
141294
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { gap: 1, paddingLeft: 3, children: [
141295
+ repoName && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
141296
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.secondary, children: repoName }),
141297
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "|" })
140720
141298
  ] }),
140721
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: item.user.login }),
140722
- item.assignees && item.assignees.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
140723
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
140724
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.warning, children: [
141299
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: item.user.login }),
141300
+ item.assignees && item.assignees.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
141301
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141302
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme14.colors.warning, children: [
140725
141303
  "@",
140726
141304
  item.assignees.map((a) => a.login).join(" @")
140727
141305
  ] })
140728
141306
  ] }),
140729
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
140730
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: timeAgo(item.created_at) }),
140731
- item.requested_reviewers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
140732
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
140733
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.info, children: item.requested_reviewers.map((r) => r.login).join(", ") })
141307
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141308
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: timeAgo(item.created_at) }),
141309
+ item.requested_reviewers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
141310
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141311
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.info, children: item.requested_reviewers.map((r) => r.login).join(", ") })
140734
141312
  ] }),
140735
- item.comments > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
140736
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
140737
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.muted, children: [
141313
+ item.comments > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
141314
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141315
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme14.colors.muted, children: [
140738
141316
  item.comments,
140739
141317
  " comments"
140740
141318
  ] })
@@ -140744,7 +141322,7 @@ function PRListItem({
140744
141322
  }
140745
141323
 
140746
141324
  // src/components/common/ErrorWithRetry.tsx
140747
- var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
141325
+ var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
140748
141326
  function getProviderErrorHint(message) {
140749
141327
  const lower = message.toLowerCase();
140750
141328
  if (lower.includes("github") || lower.includes("api.github.com")) {
@@ -140846,25 +141424,25 @@ function ErrorWithRetry({
140846
141424
  },
140847
141425
  { isActive: isActive2 }
140848
141426
  );
140849
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", padding: 1, gap: 1, children: [
140850
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme14.colors.error, children: [
141427
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", padding: 1, gap: 1, children: [
141428
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.error, children: [
140851
141429
  "Error: ",
140852
141430
  message
140853
141431
  ] }),
140854
- hint && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Box_default, { flexDirection: "column", children: [
140855
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.warning, children: hint.suggestion }),
140856
- hint.detail && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: hint.detail })
141432
+ hint && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
141433
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.warning, children: hint.suggestion }),
141434
+ hint.detail && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: hint.detail })
140857
141435
  ] }),
140858
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { color: theme14.colors.muted, children: [
141436
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.muted, children: [
140859
141437
  "Press ",
140860
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "r" }),
141438
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "r" }),
140861
141439
  " to retry"
140862
141440
  ] })
140863
141441
  ] });
140864
141442
  }
140865
141443
 
140866
141444
  // src/components/common/PaginationBar.tsx
140867
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
141445
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
140868
141446
  function PaginationBar({
140869
141447
  currentPage,
140870
141448
  totalPages,
@@ -140876,38 +141454,38 @@ function PaginationBar({
140876
141454
  }) {
140877
141455
  const theme14 = useTheme();
140878
141456
  if (totalPages <= 1) {
140879
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme14.colors.muted, children: [
141457
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme14.colors.muted, children: [
140880
141458
  totalItems,
140881
141459
  " item",
140882
141460
  totalItems !== 1 ? "s" : ""
140883
141461
  ] }) });
140884
141462
  }
140885
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
140886
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme14.colors.muted, children: [
141463
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
141464
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme14.colors.muted, children: [
140887
141465
  startIndex + 1,
140888
141466
  "-",
140889
141467
  endIndex,
140890
141468
  " of ",
140891
141469
  totalItems
140892
141470
  ] }),
140893
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Box_default, { gap: 1, children: [
140894
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: hasPrevPage ? theme14.colors.accent : theme14.colors.muted, children: hasPrevPage ? "\u2190 [p]rev" : "\u2190 prev" }),
140895
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
140896
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Text, { color: theme14.colors.text, children: [
141471
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { gap: 1, children: [
141472
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: hasPrevPage ? theme14.colors.accent : theme14.colors.muted, children: hasPrevPage ? "\u2190 [p]rev" : "\u2190 prev" }),
141473
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
141474
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme14.colors.text, children: [
140897
141475
  "Page ",
140898
141476
  currentPage,
140899
141477
  "/",
140900
141478
  totalPages
140901
141479
  ] }),
140902
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
140903
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: hasNextPage ? theme14.colors.accent : theme14.colors.muted, children: hasNextPage ? "[n]ext \u2192" : "next \u2192" })
141480
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
141481
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: hasNextPage ? theme14.colors.accent : theme14.colors.muted, children: hasNextPage ? "[n]ext \u2192" : "next \u2192" })
140904
141482
  ] })
140905
141483
  ] });
140906
141484
  }
140907
141485
 
140908
141486
  // src/components/common/FilterModal.tsx
140909
- var import_react98 = __toESM(require_react(), 1);
140910
- var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
141487
+ var import_react100 = __toESM(require_react(), 1);
141488
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
140911
141489
  var FILTER_FIELDS = ["search", "repo", "author", "label"];
140912
141490
  function FacetSection({
140913
141491
  title,
@@ -140921,24 +141499,24 @@ function FacetSection({
140921
141499
  selectionColor,
140922
141500
  warningColor
140923
141501
  }) {
140924
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
140925
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { gap: 1, children: [
140926
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: isFocused ? accentColor : mutedColor, bold: isFocused, children: [
141502
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", children: [
141503
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 1, children: [
141504
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: isFocused ? accentColor : mutedColor, bold: isFocused, children: [
140927
141505
  isFocused ? "> " : " ",
140928
141506
  title
140929
141507
  ] }),
140930
- selectedValue && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: warningColor, children: [
141508
+ selectedValue && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: warningColor, children: [
140931
141509
  "[",
140932
141510
  selectedValue,
140933
141511
  "]"
140934
141512
  ] })
140935
141513
  ] }),
140936
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
140937
- options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: mutedColor, children: " (none)" }) : options.slice(0, 8).map((opt, idx) => {
141514
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
141515
+ options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: mutedColor, children: " (none)" }) : options.slice(0, 8).map((opt, idx) => {
140938
141516
  const isHighlighted = isFocused && idx === highlightIndex;
140939
141517
  const isSelected = selectedValue === opt.value;
140940
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { gap: 1, children: [
140941
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
141518
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 1, children: [
141519
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
140942
141520
  Text,
140943
141521
  {
140944
141522
  color: isSelected ? warningColor : isHighlighted ? accentColor : textColor,
@@ -140953,14 +141531,14 @@ function FacetSection({
140953
141531
  ]
140954
141532
  }
140955
141533
  ),
140956
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: mutedColor, children: [
141534
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: mutedColor, children: [
140957
141535
  "(",
140958
141536
  opt.count,
140959
141537
  ")"
140960
141538
  ] })
140961
141539
  ] }, opt.value);
140962
141540
  }),
140963
- options.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: mutedColor, children: [
141541
+ options.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: mutedColor, children: [
140964
141542
  " +",
140965
141543
  options.length - 8,
140966
141544
  " more"
@@ -140982,17 +141560,17 @@ function FilterModal({
140982
141560
  }) {
140983
141561
  const theme14 = useTheme();
140984
141562
  const { setInputActive } = useInputFocus();
140985
- const [activeField, setActiveField] = (0, import_react98.useState)("search");
140986
- const [searchValue, setSearchValue] = (0, import_react98.useState)(filter9.search);
140987
- const [repoIndex, setRepoIndex] = (0, import_react98.useState)(0);
140988
- const [authorIndex, setAuthorIndex] = (0, import_react98.useState)(0);
140989
- const [labelIndex, setLabelIndex] = (0, import_react98.useState)(0);
141563
+ const [activeField, setActiveField] = (0, import_react100.useState)("search");
141564
+ const [searchValue, setSearchValue] = (0, import_react100.useState)(filter9.search);
141565
+ const [repoIndex, setRepoIndex] = (0, import_react100.useState)(0);
141566
+ const [authorIndex, setAuthorIndex] = (0, import_react100.useState)(0);
141567
+ const [labelIndex, setLabelIndex] = (0, import_react100.useState)(0);
140990
141568
  const isSearchField = activeField === "search";
140991
- (0, import_react98.useEffect)(() => {
141569
+ (0, import_react100.useEffect)(() => {
140992
141570
  setInputActive(isSearchField);
140993
141571
  return () => setInputActive(false);
140994
141572
  }, [setInputActive, isSearchField]);
140995
- (0, import_react98.useEffect)(() => {
141573
+ (0, import_react100.useEffect)(() => {
140996
141574
  onSearchChange(searchValue);
140997
141575
  }, [searchValue, onSearchChange]);
140998
141576
  const getMaxIndex = (field) => {
@@ -141053,7 +141631,7 @@ function FilterModal({
141053
141631
  }
141054
141632
  });
141055
141633
  const hasAnyFilter = filter9.search !== "" || filter9.repo !== null || filter9.author !== null || filter9.label !== null;
141056
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
141634
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
141057
141635
  Box_default,
141058
141636
  {
141059
141637
  flexDirection: "column",
@@ -141064,29 +141642,29 @@ function FilterModal({
141064
141642
  paddingY: 1,
141065
141643
  gap: 1,
141066
141644
  children: [
141067
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Filter PRs" }),
141068
- hasAnyFilter && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { gap: 1, flexWrap: "wrap", children: [
141069
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "Active:" }),
141070
- filter9.search && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.warning, children: [
141645
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Filter PRs" }),
141646
+ hasAnyFilter && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 1, flexWrap: "wrap", children: [
141647
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.muted, children: "Active:" }),
141648
+ filter9.search && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
141071
141649
  'search:"',
141072
141650
  filter9.search,
141073
141651
  '"'
141074
141652
  ] }),
141075
- filter9.repo && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.warning, children: [
141653
+ filter9.repo && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
141076
141654
  "repo:",
141077
141655
  filter9.repo
141078
141656
  ] }),
141079
- filter9.author && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.warning, children: [
141657
+ filter9.author && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
141080
141658
  "author:",
141081
141659
  filter9.author
141082
141660
  ] }),
141083
- filter9.label && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.warning, children: [
141661
+ filter9.label && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
141084
141662
  "label:",
141085
141663
  filter9.label
141086
141664
  ] })
141087
141665
  ] }),
141088
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
141089
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { gap: 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
141666
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", children: [
141667
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { gap: 1, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
141090
141668
  Text,
141091
141669
  {
141092
141670
  color: isSearchField ? theme14.colors.accent : theme14.colors.muted,
@@ -141097,16 +141675,16 @@ function FilterModal({
141097
141675
  ]
141098
141676
  }
141099
141677
  ) }),
141100
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { paddingLeft: 1, children: isSearchField ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141678
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { paddingLeft: 1, children: isSearchField ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
141101
141679
  TextInput,
141102
141680
  {
141103
141681
  defaultValue: searchValue,
141104
141682
  onChange: setSearchValue,
141105
141683
  placeholder: "Type to search..."
141106
141684
  }
141107
- ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: searchValue ? theme14.colors.text : theme14.colors.muted, children: searchValue || "(none)" }) })
141685
+ ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: searchValue ? theme14.colors.text : theme14.colors.muted, children: searchValue || "(none)" }) })
141108
141686
  ] }),
141109
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141687
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
141110
141688
  FacetSection,
141111
141689
  {
141112
141690
  title: "Repository",
@@ -141121,7 +141699,7 @@ function FilterModal({
141121
141699
  warningColor: theme14.colors.warning
141122
141700
  }
141123
141701
  ),
141124
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141702
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
141125
141703
  FacetSection,
141126
141704
  {
141127
141705
  title: "Author",
@@ -141136,7 +141714,7 @@ function FilterModal({
141136
141714
  warningColor: theme14.colors.warning
141137
141715
  }
141138
141716
  ),
141139
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141717
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
141140
141718
  FacetSection,
141141
141719
  {
141142
141720
  title: "Label",
@@ -141151,31 +141729,31 @@ function FilterModal({
141151
141729
  warningColor: theme14.colors.warning
141152
141730
  }
141153
141731
  ),
141154
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Tab: switch field | j/k: navigate | Enter: toggle | d: clear field | C: clear all | Esc: close" })
141732
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Tab: switch field | j/k: navigate | Enter: toggle | d: clear field | C: clear all | Esc: close" })
141155
141733
  ]
141156
141734
  }
141157
141735
  ) });
141158
141736
  }
141159
141737
 
141160
141738
  // src/components/common/SortModal.tsx
141161
- var import_react101 = __toESM(require_react(), 1);
141739
+ var import_react103 = __toESM(require_react(), 1);
141162
141740
 
141163
141741
  // node_modules/.pnpm/ink-select-input@6.2.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-select-input/build/Indicator.js
141164
- var import_react99 = __toESM(require_react(), 1);
141742
+ var import_react101 = __toESM(require_react(), 1);
141165
141743
  function Indicator({ isSelected = false }) {
141166
- return import_react99.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react99.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react99.default.createElement(Text, null, " "));
141744
+ return import_react101.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react101.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react101.default.createElement(Text, null, " "));
141167
141745
  }
141168
141746
  var Indicator_default = Indicator;
141169
141747
 
141170
141748
  // node_modules/.pnpm/ink-select-input@6.2.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-select-input/build/Item.js
141171
- var React56 = __toESM(require_react(), 1);
141749
+ var React58 = __toESM(require_react(), 1);
141172
141750
  function Item({ isSelected = false, label }) {
141173
- return React56.createElement(Text, { color: isSelected ? "blue" : void 0 }, label);
141751
+ return React58.createElement(Text, { color: isSelected ? "blue" : void 0 }, label);
141174
141752
  }
141175
141753
  var Item_default = Item;
141176
141754
 
141177
141755
  // node_modules/.pnpm/ink-select-input@6.2.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-select-input/build/SelectInput.js
141178
- var import_react100 = __toESM(require_react(), 1);
141756
+ var import_react102 = __toESM(require_react(), 1);
141179
141757
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
141180
141758
 
141181
141759
  // node_modules/.pnpm/to-rotated@1.0.0/node_modules/to-rotated/index.js
@@ -141205,17 +141783,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141205
141783
  const hasLimit = typeof customLimit === "number" && items.length > customLimit;
141206
141784
  const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
141207
141785
  const lastIndex = limit - 1;
141208
- const [rotateIndex, setRotateIndex] = (0, import_react100.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
141209
- const [selectedIndex, setSelectedIndex] = (0, import_react100.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
141210
- const previousItems = (0, import_react100.useRef)(items);
141211
- (0, import_react100.useEffect)(() => {
141786
+ const [rotateIndex, setRotateIndex] = (0, import_react102.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
141787
+ const [selectedIndex, setSelectedIndex] = (0, import_react102.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
141788
+ const previousItems = (0, import_react102.useRef)(items);
141789
+ (0, import_react102.useEffect)(() => {
141212
141790
  if (!isDeepStrictEqual3(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
141213
141791
  setRotateIndex(0);
141214
141792
  setSelectedIndex(0);
141215
141793
  }
141216
141794
  previousItems.current = items;
141217
141795
  }, [items]);
141218
- use_input_default((0, import_react100.useCallback)((input, key) => {
141796
+ use_input_default((0, import_react102.useCallback)((input, key) => {
141219
141797
  if (input === "k" || key.upArrow) {
141220
141798
  const lastIndex2 = (hasLimit ? limit : items.length) - 1;
141221
141799
  const atFirstIndex = selectedIndex === 0;
@@ -141267,15 +141845,15 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141267
141845
  onHighlight
141268
141846
  ]), { isActive: isFocused });
141269
141847
  const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit) : items;
141270
- return import_react100.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
141848
+ return import_react102.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
141271
141849
  const isSelected = index === selectedIndex;
141272
141850
  return (
141273
141851
  // @ts-expect-error - `key` can't be optional but `item.value` is generic T
141274
- import_react100.default.createElement(
141852
+ import_react102.default.createElement(
141275
141853
  Box_default,
141276
141854
  { key: item.key ?? item.value },
141277
- import_react100.default.createElement(indicatorComponent, { isSelected }),
141278
- import_react100.default.createElement(itemComponent, { ...item, isSelected })
141855
+ import_react102.default.createElement(indicatorComponent, { isSelected }),
141856
+ import_react102.default.createElement(itemComponent, { ...item, isSelected })
141279
141857
  )
141280
141858
  );
141281
141859
  }));
@@ -141283,7 +141861,7 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141283
141861
  var SelectInput_default = SelectInput;
141284
141862
 
141285
141863
  // src/components/common/SortModal.tsx
141286
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
141864
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
141287
141865
  var SORT_OPTIONS = [
141288
141866
  { key: "updated", label: "Last Updated" },
141289
141867
  { key: "created", label: "Created Date" },
@@ -141304,7 +141882,7 @@ function SortModal({
141304
141882
  onClose();
141305
141883
  }
141306
141884
  });
141307
- const items = (0, import_react101.useMemo)(
141885
+ const items = (0, import_react103.useMemo)(
141308
141886
  () => SORT_OPTIONS.map((option7) => ({
141309
141887
  label: `${option7.label}${option7.key === currentSort ? sortDirection === "desc" ? " \u2193" : " \u2191" : ""}`,
141310
141888
  value: option7.key
@@ -141323,7 +141901,7 @@ function SortModal({
141323
141901
  }
141324
141902
  onClose();
141325
141903
  };
141326
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
141904
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
141327
141905
  Box_default,
141328
141906
  {
141329
141907
  flexDirection: "column",
@@ -141334,8 +141912,8 @@ function SortModal({
141334
141912
  paddingY: 1,
141335
141913
  gap: 1,
141336
141914
  children: [
141337
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Sort by" }),
141338
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
141915
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Sort by" }),
141916
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
141339
141917
  SelectInput_default,
141340
141918
  {
141341
141919
  items,
@@ -141344,14 +141922,14 @@ function SortModal({
141344
141922
  isFocused: true
141345
141923
  }
141346
141924
  ),
141347
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: move | Enter: select | Esc: close" })
141925
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: move | Enter: select | Esc: close" })
141348
141926
  ]
141349
141927
  }
141350
141928
  ) });
141351
141929
  }
141352
141930
 
141353
141931
  // src/hooks/useNotifications.ts
141354
- var import_react102 = __toESM(require_react(), 1);
141932
+ var import_react104 = __toESM(require_react(), 1);
141355
141933
 
141356
141934
  // src/utils/notifications.ts
141357
141935
  import { execFile as execFile4 } from "child_process";
@@ -141417,8 +141995,8 @@ function buildSnapshotMap(prs) {
141417
141995
  );
141418
141996
  }
141419
141997
  function useNotifications(prs, config3, currentUserLogin) {
141420
- const previousPRsRef = (0, import_react102.useRef)(/* @__PURE__ */ new Map());
141421
- (0, import_react102.useEffect)(() => {
141998
+ const previousPRsRef = (0, import_react104.useRef)(/* @__PURE__ */ new Map());
141999
+ (0, import_react104.useEffect)(() => {
141422
142000
  if (!config3.enabled || !prs) return;
141423
142001
  const prevMap = previousPRsRef.current;
141424
142002
  if (config3.notifyOnNewPR) {
@@ -141456,7 +142034,7 @@ function useNotifications(prs, config3, currentUserLogin) {
141456
142034
  }
141457
142035
 
141458
142036
  // src/screens/PRListScreen.tsx
141459
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
142037
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
141460
142038
  var STATE_LABELS = {
141461
142039
  open: "Open",
141462
142040
  closed: "Closed",
@@ -141491,9 +142069,9 @@ function PRListScreen({
141491
142069
  },
141492
142070
  currentUser?.login
141493
142071
  );
141494
- const [showFilter, setShowFilter] = (0, import_react103.useState)(false);
141495
- const [showSort, setShowSort] = (0, import_react103.useState)(false);
141496
- const [showUnreadOnly, setShowUnreadOnly] = (0, import_react103.useState)(false);
142072
+ const [showFilter, setShowFilter] = (0, import_react105.useState)(false);
142073
+ const [showSort, setShowSort] = (0, import_react105.useState)(false);
142074
+ const [showUnreadOnly, setShowUnreadOnly] = (0, import_react105.useState)(false);
141497
142075
  const { refresh } = useManualRefresh({
141498
142076
  isActive: !showFilter && !showSort,
141499
142077
  queryKeys
@@ -141516,7 +142094,7 @@ function PRListScreen({
141516
142094
  authorFacets,
141517
142095
  labelFacets
141518
142096
  } = useFilter(prs);
141519
- const displayItems = (0, import_react103.useMemo)(
142097
+ const displayItems = (0, import_react105.useMemo)(
141520
142098
  () => showUnreadOnly ? filteredItems.filter((pr) => isUnread(pr.html_url, pr.updated_at)) : filteredItems,
141521
142099
  [filteredItems, showUnreadOnly, isUnread]
141522
142100
  );
@@ -141572,31 +142150,31 @@ function PRListScreen({
141572
142150
  { isActive: !showFilter && !showSort }
141573
142151
  );
141574
142152
  if (isLoading && prs.length === 0) {
141575
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LoadingIndicator, { message: loadingMessage });
142153
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingIndicator, { message: loadingMessage });
141576
142154
  }
141577
142155
  if (error48) {
141578
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorWithRetry, { message: String(error48), onRetry: refresh });
142156
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ErrorWithRetry, { message: String(error48), onRetry: refresh });
141579
142157
  }
141580
142158
  if (prs.length === 0) {
141581
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EmptyState, { message: emptyMessage });
142159
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(EmptyState, { message: emptyMessage });
141582
142160
  }
141583
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
141584
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { paddingX: 1, justifyContent: "space-between", children: [
141585
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 2, children: [
141586
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.accent, bold: true, children: title }),
141587
- onStateChange && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: stateFilter === "open" ? theme14.colors.success : stateFilter === "closed" ? theme14.colors.error : theme14.colors.info, children: [
142161
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
142162
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { paddingX: 1, justifyContent: "space-between", children: [
142163
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Box_default, { gap: 2, children: [
142164
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.accent, bold: true, children: title }),
142165
+ onStateChange && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: stateFilter === "open" ? theme14.colors.success : stateFilter === "closed" ? theme14.colors.error : theme14.colors.info, children: [
141588
142166
  "[",
141589
142167
  STATE_LABELS[stateFilter],
141590
142168
  "]"
141591
142169
  ] }),
141592
- showUnreadOnly && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.accent, children: "[Unread]" }),
141593
- hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.warning, children: "(filtered)" }),
141594
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.muted, children: [
142170
+ showUnreadOnly && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.accent, children: "[Unread]" }),
142171
+ hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.warning, children: "(filtered)" }),
142172
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { color: theme14.colors.muted, children: [
141595
142173
  "/ filter s sort",
141596
142174
  onStateChange ? " t state" : ""
141597
142175
  ] })
141598
142176
  ] }),
141599
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142177
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
141600
142178
  PaginationBar,
141601
142179
  {
141602
142180
  currentPage,
@@ -141609,7 +142187,7 @@ function PRListScreen({
141609
142187
  }
141610
142188
  )
141611
142189
  ] }),
141612
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { flexDirection: "column", children: pageItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.muted, children: "No PRs match the current filters" }) }) : pageItems.map((pr, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142190
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box_default, { flexDirection: "column", children: pageItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.muted, children: "No PRs match the current filters" }) }) : pageItems.map((pr, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
141613
142191
  PRListItem,
141614
142192
  {
141615
142193
  item: pr,
@@ -141617,7 +142195,7 @@ function PRListScreen({
141617
142195
  },
141618
142196
  pr.id
141619
142197
  )) }),
141620
- showFilter && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142198
+ showFilter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
141621
142199
  FilterModal,
141622
142200
  {
141623
142201
  filter: filter9,
@@ -141637,7 +142215,7 @@ function PRListScreen({
141637
142215
  onClose: () => setShowFilter(false)
141638
142216
  }
141639
142217
  ),
141640
- showSort && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142218
+ showSort && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
141641
142219
  SortModal,
141642
142220
  {
141643
142221
  currentSort: filter9.sortBy,
@@ -141651,11 +142229,11 @@ function PRListScreen({
141651
142229
  }
141652
142230
 
141653
142231
  // src/screens/MyPRsScreen.tsx
141654
- var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
142232
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
141655
142233
  function MyPRsScreen({ onSelect }) {
141656
- const [stateFilter, setStateFilter] = (0, import_react104.useState)("open");
142234
+ const [stateFilter, setStateFilter] = (0, import_react106.useState)("open");
141657
142235
  const { data: prs = [], isLoading, error: error48 } = useMyPRs(stateFilter);
141658
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
142236
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
141659
142237
  PRListScreen,
141660
142238
  {
141661
142239
  title: "My Pull Requests",
@@ -141673,12 +142251,12 @@ function MyPRsScreen({ onSelect }) {
141673
142251
  }
141674
142252
 
141675
142253
  // src/screens/ReviewRequestsScreen.tsx
141676
- var import_react105 = __toESM(require_react(), 1);
141677
- var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
142254
+ var import_react107 = __toESM(require_react(), 1);
142255
+ var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
141678
142256
  function ReviewRequestsScreen({ onSelect }) {
141679
- const [stateFilter, setStateFilter] = (0, import_react105.useState)("open");
142257
+ const [stateFilter, setStateFilter] = (0, import_react107.useState)("open");
141680
142258
  const { data: prs = [], isLoading, error: error48 } = useReviewRequests(stateFilter);
141681
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
142259
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
141682
142260
  PRListScreen,
141683
142261
  {
141684
142262
  title: "For Review",
@@ -141696,7 +142274,7 @@ function ReviewRequestsScreen({ onSelect }) {
141696
142274
  }
141697
142275
 
141698
142276
  // src/screens/SettingsScreen.tsx
141699
- var import_react107 = __toESM(require_react(), 1);
142277
+ var import_react109 = __toESM(require_react(), 1);
141700
142278
 
141701
142279
  // src/hooks/useAuth.ts
141702
142280
  function useAuth() {
@@ -141801,7 +142379,7 @@ function useAuth() {
141801
142379
  }
141802
142380
 
141803
142381
  // src/hooks/useBookmarkedRepos.ts
141804
- var import_react106 = __toESM(require_react(), 1);
142382
+ var import_react108 = __toESM(require_react(), 1);
141805
142383
  function validateBookmarkInput(input) {
141806
142384
  const trimmed2 = input.trim();
141807
142385
  if (!trimmed2.includes("/")) {
@@ -141825,11 +142403,11 @@ function removeBookmarkFromList(repos, owner, repo) {
141825
142403
  }
141826
142404
  function useBookmarkedRepos() {
141827
142405
  const { config: config3, updateConfig } = useConfig();
141828
- const bookmarkedRepos = (0, import_react106.useMemo)(
142406
+ const bookmarkedRepos = (0, import_react108.useMemo)(
141829
142407
  () => config3?.bookmarkedRepos ?? [],
141830
142408
  [config3?.bookmarkedRepos]
141831
142409
  );
141832
- const addBookmark = (0, import_react106.useCallback)(
142410
+ const addBookmark = (0, import_react108.useCallback)(
141833
142411
  (owner, repo) => {
141834
142412
  const current2 = config3?.bookmarkedRepos ?? [];
141835
142413
  const updated = addBookmarkToList(current2, owner, repo);
@@ -141839,7 +142417,7 @@ function useBookmarkedRepos() {
141839
142417
  },
141840
142418
  [config3?.bookmarkedRepos, updateConfig]
141841
142419
  );
141842
- const removeBookmark = (0, import_react106.useCallback)(
142420
+ const removeBookmark = (0, import_react108.useCallback)(
141843
142421
  (owner, repo) => {
141844
142422
  const current2 = config3?.bookmarkedRepos ?? [];
141845
142423
  const updated = removeBookmarkFromList(current2, owner, repo);
@@ -141851,7 +142429,7 @@ function useBookmarkedRepos() {
141851
142429
  }
141852
142430
 
141853
142431
  // src/components/settings/SettingRow.tsx
141854
- var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
142432
+ var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
141855
142433
  function SettingRow({
141856
142434
  label,
141857
142435
  value: value5,
@@ -141861,8 +142439,8 @@ function SettingRow({
141861
142439
  children
141862
142440
  }) {
141863
142441
  const theme14 = useTheme();
141864
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
141865
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
142442
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142443
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
141866
142444
  Text,
141867
142445
  {
141868
142446
  color: isSelected ? theme14.colors.accent : theme14.colors.muted,
@@ -141873,7 +142451,7 @@ function SettingRow({
141873
142451
  ]
141874
142452
  }
141875
142453
  ) }),
141876
- children ?? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142454
+ children ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
141877
142455
  Text,
141878
142456
  {
141879
142457
  color: isEditing ? theme14.colors.accent : theme14.colors.text,
@@ -141881,7 +142459,7 @@ function SettingRow({
141881
142459
  children: value5
141882
142460
  }
141883
142461
  ),
141884
- hint && isSelected && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142462
+ hint && isSelected && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
141885
142463
  "(",
141886
142464
  hint,
141887
142465
  ")"
@@ -141897,11 +142475,11 @@ function TokenSourceLabel({ source }) {
141897
142475
  none: { text: "Not configured", color: theme14.colors.error }
141898
142476
  };
141899
142477
  const { text, color } = labels[source];
141900
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color, children: text });
142478
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color, children: text });
141901
142479
  }
141902
142480
 
141903
142481
  // src/screens/SettingsScreen.tsx
141904
- var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
142482
+ var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
141905
142483
  var THEME_ORDER = ["tokyo-night", "dracula", "catppuccin-mocha", "gruvbox", "high-contrast"];
141906
142484
  var PROVIDER_ORDER = ["github", "gitlab", "bitbucket", "azure", "gitea"];
141907
142485
  var PROVIDER_LABELS = {
@@ -141941,12 +142519,12 @@ function SettingsScreen() {
141941
142519
  const { setStatusMessage } = useStatusMessage();
141942
142520
  const { setInputActive } = useInputFocus();
141943
142521
  const { bookmarkedRepos, addBookmark, removeBookmark } = useBookmarkedRepos();
141944
- const [selectedItem, setSelectedItem] = (0, import_react107.useState)("token_source");
141945
- const [editingField, setEditingField] = (0, import_react107.useState)(null);
141946
- const [editValue, setEditValue] = (0, import_react107.useState)("");
141947
- const [tokenMessage, setTokenMessage] = (0, import_react107.useState)(null);
141948
- const [bookmarkSelectedIndex, setBookmarkSelectedIndex] = (0, import_react107.useState)(0);
141949
- const [bookmarkError, setBookmarkError] = (0, import_react107.useState)(null);
142522
+ const [selectedItem, setSelectedItem] = (0, import_react109.useState)("token_source");
142523
+ const [editingField, setEditingField] = (0, import_react109.useState)(null);
142524
+ const [editValue, setEditValue] = (0, import_react109.useState)("");
142525
+ const [tokenMessage, setTokenMessage] = (0, import_react109.useState)(null);
142526
+ const [bookmarkSelectedIndex, setBookmarkSelectedIndex] = (0, import_react109.useState)(0);
142527
+ const [bookmarkError, setBookmarkError] = (0, import_react109.useState)(null);
141950
142528
  const isEditing = editingField !== null;
141951
142529
  const isBookmarkSection = selectedItem === "bookmarked_repos";
141952
142530
  const cycleProvider = () => {
@@ -142123,23 +142701,23 @@ function SettingsScreen() {
142123
142701
  { isActive: isBookmarkSection && !isEditing && bookmarkedRepos.length > 0 }
142124
142702
  );
142125
142703
  if (configLoading || authLoading) {
142126
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingIndicator, { message: "Loading settings..." });
142704
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LoadingIndicator, { message: "Loading settings..." });
142127
142705
  }
142128
142706
  if (configError) {
142129
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { color: theme14.colors.error, children: [
142707
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme14.colors.error, children: [
142130
142708
  "Error: ",
142131
142709
  configError
142132
142710
  ] }) });
142133
142711
  }
142134
142712
  const renderEditableField = (field, placeholder) => {
142135
142713
  if (editingField === field) {
142136
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.accent, paddingX: 1, width: 40, children: field === "new_token" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142714
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.accent, paddingX: 1, width: 40, children: field === "new_token" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142137
142715
  PasswordInput,
142138
142716
  {
142139
142717
  onChange: setEditValue,
142140
142718
  placeholder
142141
142719
  }
142142
- ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142720
+ ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142143
142721
  TextInput,
142144
142722
  {
142145
142723
  defaultValue: editValue,
@@ -142148,15 +142726,15 @@ function SettingsScreen() {
142148
142726
  }
142149
142727
  ) });
142150
142728
  }
142151
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, {});
142729
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, {});
142152
142730
  };
142153
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
142154
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, paddingY: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Settings" }) }),
142155
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Divider, {}) }),
142156
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Authentication" }) }),
142157
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142158
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142159
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
142731
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
142732
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, paddingY: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Settings" }) }),
142733
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, {}) }),
142734
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Authentication" }) }),
142735
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142736
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142737
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
142160
142738
  Text,
142161
142739
  {
142162
142740
  color: selectedItem === "token_source" ? theme14.colors.accent : theme14.colors.muted,
@@ -142167,19 +142745,19 @@ function SettingsScreen() {
142167
142745
  ]
142168
142746
  }
142169
142747
  ) }),
142170
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TokenSourceLabel, { source: tokenInfo?.source ?? "none" }),
142171
- availableSources.length > 1 && selectedItem === "token_source" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to switch)" })
142748
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TokenSourceLabel, { source: tokenInfo?.source ?? "none" }),
142749
+ availableSources.length > 1 && selectedItem === "token_source" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to switch)" })
142172
142750
  ] }),
142173
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142174
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, children: " Token" }) }),
142175
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.text, children: tokenInfo?.maskedToken ?? "(none)" })
142751
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142752
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, children: " Token" }) }),
142753
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.text, children: tokenInfo?.maskedToken ?? "(none)" })
142176
142754
  ] }),
142177
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142178
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, children: " Available" }) }),
142179
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, children: availableSources.length > 0 ? availableSources.join(", ") : "none" })
142755
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142756
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, children: " Available" }) }),
142757
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, children: availableSources.length > 0 ? availableSources.join(", ") : "none" })
142180
142758
  ] }),
142181
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 2, paddingX: 2, marginTop: 1, children: [
142182
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
142759
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, paddingX: 2, marginTop: 1, children: [
142760
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
142183
142761
  Text,
142184
142762
  {
142185
142763
  color: selectedItem === "new_token" ? theme14.colors.accent : theme14.colors.muted,
@@ -142190,9 +142768,9 @@ function SettingsScreen() {
142190
142768
  ]
142191
142769
  }
142192
142770
  ) }),
142193
- editingField === "new_token" ? renderEditableField("new_token", getProviderMeta(getAuthProvider()).tokenPlaceholder) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to add)" })
142771
+ editingField === "new_token" ? renderEditableField("new_token", getProviderMeta(getAuthProvider()).tokenPlaceholder) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to add)" })
142194
142772
  ] }),
142195
- tokenMessage && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 4, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142773
+ tokenMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 4, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142196
142774
  Text,
142197
142775
  {
142198
142776
  color: tokenMessage.startsWith("Error") ? theme14.colors.error : theme14.colors.success,
@@ -142200,10 +142778,10 @@ function SettingsScreen() {
142200
142778
  }
142201
142779
  ) })
142202
142780
  ] }),
142203
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Divider, { title: "Configuration" }) }),
142204
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Configuration" }) }),
142205
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142206
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142781
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, { title: "Configuration" }) }),
142782
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Configuration" }) }),
142783
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142784
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142207
142785
  SettingRow,
142208
142786
  {
142209
142787
  label: "Provider",
@@ -142212,7 +142790,7 @@ function SettingsScreen() {
142212
142790
  hint: "Enter to switch"
142213
142791
  }
142214
142792
  ),
142215
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142793
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142216
142794
  SettingRow,
142217
142795
  {
142218
142796
  label: "Theme",
@@ -142221,7 +142799,7 @@ function SettingsScreen() {
142221
142799
  hint: "Enter to cycle"
142222
142800
  }
142223
142801
  ),
142224
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142802
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142225
142803
  SettingRow,
142226
142804
  {
142227
142805
  label: "Page Size",
@@ -142232,7 +142810,7 @@ function SettingsScreen() {
142232
142810
  children: editingField === "page_size" ? renderEditableField("page_size", "1-100") : void 0
142233
142811
  }
142234
142812
  ),
142235
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142813
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142236
142814
  SettingRow,
142237
142815
  {
142238
142816
  label: "Refresh Interval",
@@ -142243,7 +142821,7 @@ function SettingsScreen() {
142243
142821
  children: editingField === "refresh_interval" ? renderEditableField("refresh_interval", "10-600") : void 0
142244
142822
  }
142245
142823
  ),
142246
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142824
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142247
142825
  SettingRow,
142248
142826
  {
142249
142827
  label: "Default Owner",
@@ -142254,7 +142832,7 @@ function SettingsScreen() {
142254
142832
  children: editingField === "default_owner" ? renderEditableField("default_owner", "owner") : void 0
142255
142833
  }
142256
142834
  ),
142257
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142835
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142258
142836
  SettingRow,
142259
142837
  {
142260
142838
  label: "Default Repo",
@@ -142266,10 +142844,10 @@ function SettingsScreen() {
142266
142844
  }
142267
142845
  )
142268
142846
  ] }),
142269
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Divider, { title: "Notifications" }) }),
142270
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Notifications" }) }),
142271
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142272
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142847
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, { title: "Notifications" }) }),
142848
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Notifications" }) }),
142849
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
142850
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142273
142851
  SettingRow,
142274
142852
  {
142275
142853
  label: "Notifications",
@@ -142278,7 +142856,7 @@ function SettingsScreen() {
142278
142856
  hint: "Enter to toggle"
142279
142857
  }
142280
142858
  ),
142281
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142859
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142282
142860
  SettingRow,
142283
142861
  {
142284
142862
  label: "New PRs",
@@ -142287,7 +142865,7 @@ function SettingsScreen() {
142287
142865
  hint: "Enter to toggle"
142288
142866
  }
142289
142867
  ),
142290
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142868
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142291
142869
  SettingRow,
142292
142870
  {
142293
142871
  label: "PR Updates",
@@ -142296,7 +142874,7 @@ function SettingsScreen() {
142296
142874
  hint: "Enter to toggle"
142297
142875
  }
142298
142876
  ),
142299
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142877
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142300
142878
  SettingRow,
142301
142879
  {
142302
142880
  label: "Review Requests",
@@ -142306,9 +142884,9 @@ function SettingsScreen() {
142306
142884
  }
142307
142885
  )
142308
142886
  ] }),
142309
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Divider, { title: "Bookmarked Repos" }) }),
142310
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 2, children: [
142311
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
142887
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Divider, { title: "Bookmarked Repos" }) }),
142888
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, children: [
142889
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
142312
142890
  Text,
142313
142891
  {
142314
142892
  color: isBookmarkSection ? theme14.colors.accent : theme14.colors.secondary,
@@ -142319,21 +142897,21 @@ function SettingsScreen() {
142319
142897
  ]
142320
142898
  }
142321
142899
  ),
142322
- isBookmarkSection && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "a:add x:remove J/K:select" })
142900
+ isBookmarkSection && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "a:add x:remove J/K:select" })
142323
142901
  ] }) }),
142324
- editingField === "bookmark_add" && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { paddingX: 2, flexDirection: "column", children: [
142325
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { gap: 1, children: [
142326
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.secondary, children: "owner/repo:" }),
142902
+ editingField === "bookmark_add" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { paddingX: 2, flexDirection: "column", children: [
142903
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 1, children: [
142904
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.secondary, children: "owner/repo:" }),
142327
142905
  renderEditableField("bookmark_add", "e.g. facebook/react")
142328
142906
  ] }),
142329
- bookmarkError && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.error, children: bookmarkError }) })
142907
+ bookmarkError && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.error, children: bookmarkError }) })
142330
142908
  ] }),
142331
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { flexDirection: "column", paddingX: 2, children: bookmarkedRepos.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142909
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { flexDirection: "column", paddingX: 2, children: bookmarkedRepos.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142332
142910
  "No bookmarked repos. ",
142333
142911
  isBookmarkSection ? "Press a to add." : ""
142334
142912
  ] }) }) : bookmarkedRepos.map((bookmark, index) => {
142335
142913
  const isBmSelected = isBookmarkSection && index === bookmarkSelectedIndex;
142336
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
142914
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
142337
142915
  Text,
142338
142916
  {
142339
142917
  color: isBmSelected ? theme14.colors.accent : theme14.colors.text,
@@ -142348,25 +142926,25 @@ function SettingsScreen() {
142348
142926
  }
142349
142927
  ) }, `${bookmark.owner}/${bookmark.repo}`);
142350
142928
  }) }),
142351
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Box_default, { paddingX: 1, paddingTop: 2, flexDirection: "column", children: [
142352
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Config: ~/.config/lazyreview/config.yaml" }),
142353
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142929
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { paddingX: 1, paddingTop: 2, flexDirection: "column", children: [
142930
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Config: ~/.config/lazyreview/config.yaml" }),
142931
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142354
142932
  "Token: ",
142355
142933
  getProviderTokenFilePath(getAuthProvider()).replace(process.env["HOME"] ?? "", "~")
142356
142934
  ] }),
142357
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Keybindings: add keybindingOverrides to config.yaml (see ? help for defaults)" })
142935
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Keybindings: add keybindingOverrides to config.yaml (see ? help for defaults)" })
142358
142936
  ] }),
142359
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Box_default, { paddingX: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: select/toggle | Esc: cancel" }) })
142937
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: select/toggle | Esc: cancel" }) })
142360
142938
  ] });
142361
142939
  }
142362
142940
 
142363
142941
  // src/screens/InvolvedScreen.tsx
142364
- var import_react108 = __toESM(require_react(), 1);
142365
- var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
142942
+ var import_react110 = __toESM(require_react(), 1);
142943
+ var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
142366
142944
  function InvolvedScreen({ onSelect }) {
142367
- const [stateFilter, setStateFilter] = (0, import_react108.useState)("open");
142945
+ const [stateFilter, setStateFilter] = (0, import_react110.useState)("open");
142368
142946
  const { data: prs = [], isLoading, error: error48 } = useInvolvedPRs(stateFilter);
142369
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
142947
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142370
142948
  PRListScreen,
142371
142949
  {
142372
142950
  title: "Involved Pull Requests",
@@ -142384,19 +142962,19 @@ function InvolvedScreen({ onSelect }) {
142384
142962
  }
142385
142963
 
142386
142964
  // src/screens/ThisRepoScreen.tsx
142387
- var import_react109 = __toESM(require_react(), 1);
142388
- var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
142965
+ var import_react111 = __toESM(require_react(), 1);
142966
+ var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
142389
142967
  function ThisRepoScreen({ owner, repo, onSelect }) {
142390
- const [stateFilter, setStateFilter] = (0, import_react109.useState)("open");
142968
+ const [stateFilter, setStateFilter] = (0, import_react111.useState)("open");
142391
142969
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(
142392
142970
  owner ?? "",
142393
142971
  repo ?? "",
142394
142972
  { state: stateFilter === "all" ? "all" : stateFilter === "closed" ? "closed" : "open" }
142395
142973
  );
142396
142974
  if (!owner || !repo) {
142397
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(EmptyState, { message: "Not in a git repository or remote not detected" });
142975
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EmptyState, { message: "Not in a git repository or remote not detected" });
142398
142976
  }
142399
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142977
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
142400
142978
  PRListScreen,
142401
142979
  {
142402
142980
  title: `${owner}/${repo}`,
@@ -142414,11 +142992,11 @@ function ThisRepoScreen({ owner, repo, onSelect }) {
142414
142992
  }
142415
142993
 
142416
142994
  // src/screens/BrowseRepoScreen.tsx
142417
- var import_react112 = __toESM(require_react(), 1);
142995
+ var import_react114 = __toESM(require_react(), 1);
142418
142996
 
142419
142997
  // src/hooks/useRepoContext.tsx
142420
- var import_react110 = __toESM(require_react(), 1);
142421
- var RepoContext = (0, import_react110.createContext)({
142998
+ var import_react112 = __toESM(require_react(), 1);
142999
+ var RepoContext = (0, import_react112.createContext)({
142422
143000
  localRepo: null,
142423
143001
  browseRepo: null,
142424
143002
  setBrowseRepo: () => {
@@ -142430,14 +143008,14 @@ function RepoContextProvider({
142430
143008
  localRepo,
142431
143009
  children
142432
143010
  }) {
142433
- const [browseRepo, setBrowseRepoState] = (0, import_react110.useState)(null);
142434
- const setBrowseRepo = (0, import_react110.useCallback)((owner, repo) => {
143011
+ const [browseRepo, setBrowseRepoState] = (0, import_react112.useState)(null);
143012
+ const setBrowseRepo = (0, import_react112.useCallback)((owner, repo) => {
142435
143013
  setBrowseRepoState({ owner, repo });
142436
143014
  }, []);
142437
- const clearBrowseRepo = (0, import_react110.useCallback)(() => {
143015
+ const clearBrowseRepo = (0, import_react112.useCallback)(() => {
142438
143016
  setBrowseRepoState(null);
142439
143017
  }, []);
142440
- return import_react110.default.createElement(
143018
+ return import_react112.default.createElement(
142441
143019
  RepoContext.Provider,
142442
143020
  {
142443
143021
  value: {
@@ -142451,11 +143029,11 @@ function RepoContextProvider({
142451
143029
  );
142452
143030
  }
142453
143031
  function useRepoContext() {
142454
- return (0, import_react110.useContext)(RepoContext);
143032
+ return (0, import_react112.useContext)(RepoContext);
142455
143033
  }
142456
143034
 
142457
143035
  // src/hooks/useRecentRepos.ts
142458
- var import_react111 = __toESM(require_react(), 1);
143036
+ var import_react113 = __toESM(require_react(), 1);
142459
143037
  var MAX_RECENT_REPOS = 10;
142460
143038
  function addRecentRepoToList(repos, owner, repo, now2) {
142461
143039
  const filtered = repos.filter(
@@ -142478,8 +143056,8 @@ function sortByMostRecent(repos) {
142478
143056
  function useRecentRepos() {
142479
143057
  const { config: config3, updateConfig } = useConfig();
142480
143058
  const rawRepos = config3?.recentRepos ?? [];
142481
- const recentRepos = (0, import_react111.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
142482
- const addRecentRepo = (0, import_react111.useCallback)(
143059
+ const recentRepos = (0, import_react113.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
143060
+ const addRecentRepo = (0, import_react113.useCallback)(
142483
143061
  (owner, repo) => {
142484
143062
  const current2 = config3?.recentRepos ?? [];
142485
143063
  const now2 = (/* @__PURE__ */ new Date()).toISOString();
@@ -142488,7 +143066,7 @@ function useRecentRepos() {
142488
143066
  },
142489
143067
  [config3?.recentRepos, updateConfig]
142490
143068
  );
142491
- const removeRecentRepo = (0, import_react111.useCallback)(
143069
+ const removeRecentRepo = (0, import_react113.useCallback)(
142492
143070
  (owner, repo) => {
142493
143071
  const current2 = config3?.recentRepos ?? [];
142494
143072
  const updated = removeRecentRepoFromList(current2, owner, repo);
@@ -142500,7 +143078,7 @@ function useRecentRepos() {
142500
143078
  }
142501
143079
 
142502
143080
  // src/screens/BrowseRepoScreen.tsx
142503
- var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
143081
+ var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
142504
143082
  function parseRepoUrl(input) {
142505
143083
  const trimmed2 = input.trim();
142506
143084
  if (trimmed2.startsWith("http://") || trimmed2.startsWith("https://") || trimmed2.startsWith("git@")) {
@@ -142578,28 +143156,28 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142578
143156
  const { setInputActive } = useInputFocus();
142579
143157
  const { recentRepos, removeRecentRepo } = useRecentRepos();
142580
143158
  const { bookmarkedRepos } = useBookmarkedRepos();
142581
- const [inputValue, setInputValue] = (0, import_react112.useState)("");
142582
- const [inputError, setInputError] = (0, import_react112.useState)(null);
142583
- const [isInputFocused, setIsInputFocused] = (0, import_react112.useState)(false);
142584
- const [selectedIndex, setSelectedIndex] = (0, import_react112.useState)(0);
143159
+ const [inputValue, setInputValue] = (0, import_react114.useState)("");
143160
+ const [inputError, setInputError] = (0, import_react114.useState)(null);
143161
+ const [isInputFocused, setIsInputFocused] = (0, import_react114.useState)(false);
143162
+ const [selectedIndex, setSelectedIndex] = (0, import_react114.useState)(0);
142585
143163
  const bookmarkSet = new Set(bookmarkedRepos.map((b) => `${b.owner}/${b.repo}`));
142586
143164
  const filteredRecent = recentRepos.filter((r) => !bookmarkSet.has(`${r.owner}/${r.repo}`));
142587
143165
  const totalListItems = bookmarkedRepos.length + filteredRecent.length;
142588
- (0, import_react112.useEffect)(() => {
143166
+ (0, import_react114.useEffect)(() => {
142589
143167
  if (isActive2) {
142590
143168
  setIsInputFocused(true);
142591
143169
  } else {
142592
143170
  setIsInputFocused(false);
142593
143171
  }
142594
143172
  }, [isActive2]);
142595
- (0, import_react112.useEffect)(() => {
143173
+ (0, import_react114.useEffect)(() => {
142596
143174
  setInputActive(isInputFocused);
142597
143175
  return () => setInputActive(false);
142598
143176
  }, [isInputFocused, setInputActive]);
142599
- (0, import_react112.useEffect)(() => {
143177
+ (0, import_react114.useEffect)(() => {
142600
143178
  setScreenContext("browse-picker");
142601
143179
  }, []);
142602
- const handleSubmitInput = (0, import_react112.useCallback)(() => {
143180
+ const handleSubmitInput = (0, import_react114.useCallback)(() => {
142603
143181
  const result = validateRepoInput(inputValue);
142604
143182
  if (!result.valid) {
142605
143183
  setInputError(result.error);
@@ -142608,7 +143186,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142608
143186
  setInputError(null);
142609
143187
  onSelectRepo(result.owner, result.repo);
142610
143188
  }, [inputValue, onSelectRepo]);
142611
- const handleSelectFromList = (0, import_react112.useCallback)(() => {
143189
+ const handleSelectFromList = (0, import_react114.useCallback)(() => {
142612
143190
  if (totalListItems === 0) return;
142613
143191
  if (selectedIndex < bookmarkedRepos.length) {
142614
143192
  const bookmark = bookmarkedRepos[selectedIndex];
@@ -142623,7 +143201,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142623
143201
  }
142624
143202
  }
142625
143203
  }, [selectedIndex, bookmarkedRepos, filteredRecent, totalListItems, onSelectRepo]);
142626
- const handleRemoveFromList = (0, import_react112.useCallback)(() => {
143204
+ const handleRemoveFromList = (0, import_react114.useCallback)(() => {
142627
143205
  if (selectedIndex >= bookmarkedRepos.length) {
142628
143206
  const recentIdx = selectedIndex - bookmarkedRepos.length;
142629
143207
  const recent = filteredRecent[recentIdx];
@@ -142661,19 +143239,19 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142661
143239
  },
142662
143240
  { isActive: isActive2 }
142663
143241
  );
142664
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, padding: 1, children: [
142665
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Browse Repository" }),
142666
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
142667
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 1, children: [
142668
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, children: "repo path or URL:" }),
142669
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
143242
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, padding: 1, children: [
143243
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Browse Repository" }),
143244
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
143245
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143246
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.secondary, children: "repo path or URL:" }),
143247
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
142670
143248
  Box_default,
142671
143249
  {
142672
143250
  borderStyle: "single",
142673
143251
  borderColor: isInputFocused ? theme14.colors.accent : theme14.colors.border,
142674
143252
  paddingX: 1,
142675
143253
  width: 40,
142676
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
143254
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
142677
143255
  TextInput,
142678
143256
  {
142679
143257
  defaultValue: inputValue,
@@ -142687,14 +143265,14 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142687
143265
  }
142688
143266
  )
142689
143267
  ] }),
142690
- inputError && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingLeft: 2, marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.error, children: inputError }) })
143268
+ inputError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingLeft: 2, marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.error, children: inputError }) })
142691
143269
  ] }),
142692
- bookmarkedRepos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
142693
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Bookmarks" }),
142694
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}),
143270
+ bookmarkedRepos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
143271
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Bookmarks" }),
143272
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Divider, {}),
142695
143273
  bookmarkedRepos.map((bookmark, index) => {
142696
143274
  const isSelected = !isInputFocused && selectedIndex === index;
142697
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
143275
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
142698
143276
  Text,
142699
143277
  {
142700
143278
  color: isSelected ? theme14.colors.accent : theme14.colors.text,
@@ -142710,14 +143288,14 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142710
143288
  ) }, `${bookmark.owner}/${bookmark.repo}`);
142711
143289
  })
142712
143290
  ] }),
142713
- filteredRecent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
142714
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Recent" }),
142715
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}),
143291
+ filteredRecent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
143292
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Recent" }),
143293
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Divider, {}),
142716
143294
  filteredRecent.map((repo, index) => {
142717
143295
  const listIdx = bookmarkedRepos.length + index;
142718
143296
  const isSelected = !isInputFocused && selectedIndex === listIdx;
142719
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
142720
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
143297
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
143298
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
142721
143299
  Text,
142722
143300
  {
142723
143301
  color: isSelected ? theme14.colors.accent : theme14.colors.text,
@@ -142731,20 +143309,20 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
142731
143309
  ]
142732
143310
  }
142733
143311
  ),
142734
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: new Date(repo.lastUsed).toLocaleDateString() })
143312
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: new Date(repo.lastUsed).toLocaleDateString() })
142735
143313
  ] }, `${repo.owner}/${repo.repo}`);
142736
143314
  })
142737
143315
  ] }),
142738
- totalListItems === 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, children: "No recent or bookmarked repos. Enter owner/repo above to get started." }) }),
142739
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: isInputFocused ? "Enter:search Esc:list" : "j/k:nav Enter:select x:remove /:search" }) })
143316
+ totalListItems === 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "No recent or bookmarked repos. Enter owner/repo above to get started." }) }),
143317
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: isInputFocused ? "Enter:search Esc:list" : "j/k:nav Enter:select x:remove /:search" }) })
142740
143318
  ] });
142741
143319
  }
142742
143320
  function BrowseList({ owner, repo, onBack, onSelect }) {
142743
- const [stateFilter, setStateFilter] = (0, import_react112.useState)("open");
143321
+ const [stateFilter, setStateFilter] = (0, import_react114.useState)("open");
142744
143322
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(owner, repo, {
142745
143323
  state: stateFilter === "all" ? "all" : stateFilter === "closed" ? "closed" : "open"
142746
143324
  });
142747
- (0, import_react112.useEffect)(() => {
143325
+ (0, import_react114.useEffect)(() => {
142748
143326
  setScreenContext("browse-list");
142749
143327
  }, []);
142750
143328
  use_input_default(
@@ -142755,7 +143333,7 @@ function BrowseList({ owner, repo, onBack, onSelect }) {
142755
143333
  },
142756
143334
  { isActive: true }
142757
143335
  );
142758
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
143336
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
142759
143337
  PRListScreen,
142760
143338
  {
142761
143339
  title: `${owner}/${repo}`,
@@ -142774,8 +143352,8 @@ function BrowseList({ owner, repo, onBack, onSelect }) {
142774
143352
  function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
142775
143353
  const { setBrowseRepo, clearBrowseRepo } = useRepoContext();
142776
143354
  const { addRecentRepo } = useRecentRepos();
142777
- const [selectedRepo, setSelectedRepo] = (0, import_react112.useState)(null);
142778
- const handleSelectRepo = (0, import_react112.useCallback)(
143355
+ const [selectedRepo, setSelectedRepo] = (0, import_react114.useState)(null);
143356
+ const handleSelectRepo = (0, import_react114.useCallback)(
142779
143357
  (owner, repo) => {
142780
143358
  setSelectedRepo({ owner, repo });
142781
143359
  setBrowseRepo(owner, repo);
@@ -142783,12 +143361,12 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
142783
143361
  },
142784
143362
  [setBrowseRepo, addRecentRepo]
142785
143363
  );
142786
- const handleBack = (0, import_react112.useCallback)(() => {
143364
+ const handleBack = (0, import_react114.useCallback)(() => {
142787
143365
  setSelectedRepo(null);
142788
143366
  clearBrowseRepo();
142789
143367
  }, [clearBrowseRepo]);
142790
143368
  if (selectedRepo) {
142791
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
143369
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
142792
143370
  BrowseList,
142793
143371
  {
142794
143372
  owner: selectedRepo.owner,
@@ -142798,29 +143376,29 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
142798
143376
  }
142799
143377
  );
142800
143378
  }
142801
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BrowsePicker, { onSelectRepo: handleSelectRepo, isActive: isActive2 });
143379
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BrowsePicker, { onSelectRepo: handleSelectRepo, isActive: isActive2 });
142802
143380
  }
142803
143381
 
142804
143382
  // src/hooks/useActivePanel.ts
142805
- var import_react113 = __toESM(require_react(), 1);
143383
+ var import_react115 = __toESM(require_react(), 1);
142806
143384
  function useActivePanel({
142807
143385
  hasSelection,
142808
143386
  isInputActive = false
142809
143387
  }) {
142810
- const [activePanel, setActivePanel] = (0, import_react113.useState)("sidebar");
142811
- (0, import_react113.useEffect)(() => {
143388
+ const [activePanel, setActivePanel] = (0, import_react115.useState)("sidebar");
143389
+ (0, import_react115.useEffect)(() => {
142812
143390
  if (!hasSelection && activePanel === "detail") {
142813
143391
  setActivePanel("list");
142814
143392
  }
142815
143393
  }, [hasSelection, activePanel]);
142816
- const handleEscape = (0, import_react113.useCallback)(() => {
143394
+ const handleEscape = (0, import_react115.useCallback)(() => {
142817
143395
  if (activePanel === "detail") {
142818
143396
  setActivePanel("list");
142819
143397
  } else if (activePanel === "list") {
142820
143398
  setActivePanel("sidebar");
142821
143399
  }
142822
143400
  }, [activePanel]);
142823
- const handleTab = (0, import_react113.useCallback)(() => {
143401
+ const handleTab = (0, import_react115.useCallback)(() => {
142824
143402
  if (activePanel === "sidebar") {
142825
143403
  setActivePanel("list");
142826
143404
  } else if (activePanel === "list" && hasSelection) {
@@ -142843,7 +143421,7 @@ function useActivePanel({
142843
143421
  }
142844
143422
 
142845
143423
  // src/hooks/useSidebarCounts.ts
142846
- var import_react114 = __toESM(require_react(), 1);
143424
+ var import_react116 = __toESM(require_react(), 1);
142847
143425
  var EMPTY_COUNTS = {
142848
143426
  involved: null,
142849
143427
  myPrs: null,
@@ -142878,8 +143456,8 @@ function extractThisRepoCount(queryClient2) {
142878
143456
  }
142879
143457
  function useSidebarCounts(isUnread) {
142880
143458
  const queryClient2 = useQueryClient();
142881
- const countsRef = (0, import_react114.useRef)(EMPTY_COUNTS);
142882
- const computeCounts = (0, import_react114.useCallback)(() => {
143459
+ const countsRef = (0, import_react116.useRef)(EMPTY_COUNTS);
143460
+ const computeCounts = (0, import_react116.useCallback)(() => {
142883
143461
  const involved = extractCount(queryClient2, "involved-prs");
142884
143462
  const myPrs = extractCount(queryClient2, "my-prs");
142885
143463
  const forReview = extractCount(queryClient2, "review-requests");
@@ -142906,7 +143484,7 @@ function useSidebarCounts(isUnread) {
142906
143484
  const browse = extractCount(queryClient2, "browse-prs");
142907
143485
  return { involved, myPrs, forReview, forReviewUnread, thisRepo, browse };
142908
143486
  }, [queryClient2, isUnread]);
142909
- const subscribe2 = (0, import_react114.useCallback)(
143487
+ const subscribe2 = (0, import_react116.useCallback)(
142910
143488
  (onStoreChange) => {
142911
143489
  const unsubscribe = queryClient2.getQueryCache().subscribe(() => {
142912
143490
  const next = computeCounts();
@@ -142920,13 +143498,13 @@ function useSidebarCounts(isUnread) {
142920
143498
  },
142921
143499
  [queryClient2, computeCounts]
142922
143500
  );
142923
- const getSnapshot2 = (0, import_react114.useCallback)(() => {
143501
+ const getSnapshot2 = (0, import_react116.useCallback)(() => {
142924
143502
  return countsRef.current;
142925
143503
  }, []);
142926
- (0, import_react114.useEffect)(() => {
143504
+ (0, import_react116.useEffect)(() => {
142927
143505
  countsRef.current = computeCounts();
142928
143506
  }, [computeCounts]);
142929
- return (0, import_react114.useSyncExternalStore)(subscribe2, getSnapshot2, () => EMPTY_COUNTS);
143507
+ return (0, import_react116.useSyncExternalStore)(subscribe2, getSnapshot2, () => EMPTY_COUNTS);
142930
143508
  }
142931
143509
 
142932
143510
  // src/utils/retryConfig.ts
@@ -142951,7 +143529,7 @@ function getRetryDelay(failureCount, error48) {
142951
143529
  }
142952
143530
 
142953
143531
  // src/app.tsx
142954
- var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
143532
+ var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
142955
143533
  function AppContent({
142956
143534
  repoOwner,
142957
143535
  repoName,
@@ -142963,8 +143541,8 @@ function AppContent({
142963
143541
  const { user, isAuthenticated, loading, saveToken, error: error48 } = useAuth();
142964
143542
  const { config: config3, updateConfig } = useConfig();
142965
143543
  const queryClient2 = useQueryClient();
142966
- const [sidebarVisible, setSidebarVisible] = (0, import_react115.useState)(true);
142967
- const [currentScreen, setCurrentScreen] = (0, import_react115.useState)({
143544
+ const [sidebarVisible, setSidebarVisible] = (0, import_react117.useState)(true);
143545
+ const [currentScreen, setCurrentScreen] = (0, import_react117.useState)({
142968
143546
  type: "list"
142969
143547
  });
142970
143548
  const directPROwner = directPR?.owner ?? repoOwner ?? "";
@@ -142976,8 +143554,8 @@ function AppContent({
142976
143554
  error: directPRError,
142977
143555
  refetch: directPRRefetch
142978
143556
  } = usePullRequest(directPROwner, directPRRepo, directPRNumber);
142979
- const [directPRNavigated, setDirectPRNavigated] = (0, import_react115.useState)(false);
142980
- import_react115.default.useEffect(() => {
143557
+ const [directPRNavigated, setDirectPRNavigated] = (0, import_react117.useState)(false);
143558
+ import_react117.default.useEffect(() => {
142981
143559
  if (directPR && directPRData && !directPRNavigated) {
142982
143560
  setDirectPRNavigated(true);
142983
143561
  setCurrentScreen({
@@ -142988,10 +143566,10 @@ function AppContent({
142988
143566
  });
142989
143567
  }
142990
143568
  }, [directPR, directPRData, directPRNavigated]);
142991
- const [tokenError, setTokenError] = (0, import_react115.useState)(null);
142992
- const [showHelp2, setShowHelp] = (0, import_react115.useState)(false);
142993
- const [showTokenInput, setShowTokenInput] = (0, import_react115.useState)(false);
142994
- const [showOnboarding, setShowOnboarding] = (0, import_react115.useState)(false);
143569
+ const [tokenError, setTokenError] = (0, import_react117.useState)(null);
143570
+ const [showHelp2, setShowHelp] = (0, import_react117.useState)(false);
143571
+ const [showTokenInput, setShowTokenInput] = (0, import_react117.useState)(false);
143572
+ const [showOnboarding, setShowOnboarding] = (0, import_react117.useState)(false);
142995
143573
  const { isTokenExpired } = useTokenExpired();
142996
143574
  const { isInputActive } = useInputFocus();
142997
143575
  const { activePanel, setActivePanel } = useActivePanel({
@@ -143008,28 +143586,28 @@ function AppContent({
143008
143586
  const sidebarIndex = currentEntry ? getItemIndex(currentEntry) ?? 0 : 0;
143009
143587
  const { isUnread } = useReadState();
143010
143588
  const sidebarCounts = useSidebarCounts(isUnread);
143011
- import_react115.default.useEffect(() => {
143589
+ import_react117.default.useEffect(() => {
143012
143590
  if (!loading && !isAuthenticated && !showTokenInput) {
143013
143591
  setShowTokenInput(true);
143014
143592
  } else if (isAuthenticated && showTokenInput && !isTokenExpired) {
143015
143593
  setShowTokenInput(false);
143016
143594
  }
143017
143595
  }, [loading, isAuthenticated, showTokenInput, isTokenExpired]);
143018
- import_react115.default.useEffect(() => {
143596
+ import_react117.default.useEffect(() => {
143019
143597
  if (isTokenExpired && !showTokenInput) {
143020
143598
  setShowTokenInput(true);
143021
143599
  }
143022
143600
  }, [isTokenExpired, showTokenInput]);
143023
- import_react115.default.useEffect(() => {
143601
+ import_react117.default.useEffect(() => {
143024
143602
  if (config3 && !config3.hasOnboarded && !showOnboarding) {
143025
143603
  setShowOnboarding(true);
143026
143604
  }
143027
143605
  }, [config3, showOnboarding]);
143028
- const handleOnboardingComplete = (0, import_react115.useCallback)(() => {
143606
+ const handleOnboardingComplete = (0, import_react117.useCallback)(() => {
143029
143607
  setShowOnboarding(false);
143030
143608
  updateConfig({ hasOnboarded: true });
143031
143609
  }, [updateConfig]);
143032
- const handleTokenSubmit = (0, import_react115.useCallback)(
143610
+ const handleTokenSubmit = (0, import_react117.useCallback)(
143033
143611
  async (token) => {
143034
143612
  try {
143035
143613
  setTokenError(null);
@@ -143075,7 +143653,7 @@ function AppContent({
143075
143653
  },
143076
143654
  { isActive: !showTokenInput && !showOnboarding && !isInputActive }
143077
143655
  );
143078
- const handleSelectPR = (0, import_react115.useCallback)(
143656
+ const handleSelectPR = (0, import_react117.useCallback)(
143079
143657
  (pr, list, index) => {
143080
143658
  setCurrentScreen({
143081
143659
  type: "detail",
@@ -143086,14 +143664,14 @@ function AppContent({
143086
143664
  },
143087
143665
  []
143088
143666
  );
143089
- const handleBackToList = (0, import_react115.useCallback)(() => {
143667
+ const handleBackToList = (0, import_react117.useCallback)(() => {
143090
143668
  if (directPR) {
143091
143669
  exit4();
143092
143670
  } else {
143093
143671
  setCurrentScreen({ type: "list" });
143094
143672
  }
143095
143673
  }, [directPR, exit4]);
143096
- const handleNavigatePR = (0, import_react115.useCallback)(
143674
+ const handleNavigatePR = (0, import_react117.useCallback)(
143097
143675
  (direction) => {
143098
143676
  if (currentScreen.type !== "detail") return;
143099
143677
  const { prList, prIndex } = currentScreen;
@@ -143114,11 +143692,11 @@ function AppContent({
143114
143692
  function renderScreen() {
143115
143693
  if (directPR && !directPRNavigated) {
143116
143694
  if (directPRLoading) {
143117
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Box_default, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(LoadingIndicator, { message: `Loading PR #${directPR.prNumber}...` }) });
143695
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Box_default, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LoadingIndicator, { message: `Loading PR #${directPR.prNumber}...` }) });
143118
143696
  }
143119
143697
  if (directPRError) {
143120
143698
  const errorMessage = directPRError instanceof Error ? directPRError.message : String(directPRError);
143121
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143699
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143122
143700
  ErrorWithRetry,
143123
143701
  {
143124
143702
  message: `Failed to load PR #${directPR.prNumber}: ${errorMessage}`,
@@ -143133,7 +143711,7 @@ function AppContent({
143133
143711
  const parsed = parseGitHubPRUrl(currentScreen.pr.html_url);
143134
143712
  const prOwner = parsed?.owner ?? repoOwner ?? "";
143135
143713
  const prRepo = parsed?.repo ?? repoName ?? "";
143136
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143714
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143137
143715
  PRDetailScreen,
143138
143716
  {
143139
143717
  pr: currentScreen.pr,
@@ -143147,10 +143725,10 @@ function AppContent({
143147
143725
  );
143148
143726
  }
143149
143727
  return Match_exports.value(sidebarIndex).pipe(
143150
- Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InvolvedScreen, { onSelect: handleSelectPR })),
143151
- Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MyPRsScreen, { onSelect: handleSelectPR })),
143152
- Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ReviewRequestsScreen, { onSelect: handleSelectPR })),
143153
- Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143728
+ Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(InvolvedScreen, { onSelect: handleSelectPR })),
143729
+ Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MyPRsScreen, { onSelect: handleSelectPR })),
143730
+ Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ReviewRequestsScreen, { onSelect: handleSelectPR })),
143731
+ Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143154
143732
  ThisRepoScreen,
143155
143733
  {
143156
143734
  owner: repoOwner,
@@ -143158,16 +143736,16 @@ function AppContent({
143158
143736
  onSelect: handleSelectPR
143159
143737
  }
143160
143738
  )),
143161
- Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BrowseRepoScreen, { onSelect: handleSelectPR, isActive: activePanel !== "sidebar" })),
143162
- Match_exports.when(5, () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SettingsScreen, {})),
143163
- Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InvolvedScreen, { onSelect: handleSelectPR }))
143739
+ Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BrowseRepoScreen, { onSelect: handleSelectPR, isActive: activePanel !== "sidebar" })),
143740
+ Match_exports.when(5, () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SettingsScreen, {})),
143741
+ Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(InvolvedScreen, { onSelect: handleSelectPR }))
143164
143742
  );
143165
143743
  }
143166
143744
  const terminalHeight = stdout?.rows ?? 24;
143167
143745
  const { browseRepo } = useRepoContext();
143168
143746
  const repoPath = repoOwner && repoName ? `${repoOwner}/${repoName}` : void 0;
143169
143747
  const browseRepoPath = browseRepo ? `${browseRepo.owner}/${browseRepo.repo}` : void 0;
143170
- import_react115.default.useEffect(() => {
143748
+ import_react117.default.useEffect(() => {
143171
143749
  if (currentScreen.type !== "detail") {
143172
143750
  if (sidebarIndex === 5) {
143173
143751
  setScreenContext("settings");
@@ -143192,8 +143770,8 @@ function AppContent({
143192
143770
  const currentScreenName = currentScreen.type === "list" ? screenNames[sidebarIndex] : screenNames[sidebarIndex];
143193
143771
  const prTitle = currentScreen.type === "detail" ? currentScreen.pr.title : void 0;
143194
143772
  const prNumber = currentScreen.type === "detail" ? currentScreen.pr.number : void 0;
143195
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box_default, { flexDirection: "column", height: terminalHeight, children: [
143196
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143773
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box_default, { flexDirection: "column", height: terminalHeight, children: [
143774
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143197
143775
  TopBar,
143198
143776
  {
143199
143777
  username: user?.login ?? "anonymous",
@@ -143206,8 +143784,8 @@ function AppContent({
143206
143784
  connectionStatus
143207
143785
  }
143208
143786
  ),
143209
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
143210
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143787
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
143788
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143211
143789
  Sidebar,
143212
143790
  {
143213
143791
  selectedIndex: sidebarIndex,
@@ -143219,12 +143797,12 @@ function AppContent({
143219
143797
  navIndex
143220
143798
  }
143221
143799
  ),
143222
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MainPanel, { isActive: activePanel === "list", children: renderScreen() })
143800
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MainPanel, { isActive: activePanel === "list", children: renderScreen() })
143223
143801
  ] }),
143224
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(StatusBar, { activePanel, screenContext }),
143225
- showHelp2 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(HelpModal, { onClose: () => setShowHelp(false) }),
143226
- showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(OnboardingScreen, { onComplete: handleOnboardingComplete }),
143227
- showTokenInput && !showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143802
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(StatusBar, { activePanel, screenContext }),
143803
+ showHelp2 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(HelpModal, { onClose: () => setShowHelp(false) }),
143804
+ showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OnboardingScreen, { onComplete: handleOnboardingComplete }),
143805
+ showTokenInput && !showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143228
143806
  TokenInputModal,
143229
143807
  {
143230
143808
  onSubmit: handleTokenSubmit,
@@ -143270,14 +143848,14 @@ function AppWithTheme({
143270
143848
  const configProvider = config3?.provider ?? null;
143271
143849
  const gitDetectedProvider = toConfigProvider(detectedProvider);
143272
143850
  const activeProvider = configProvider ?? gitDetectedProvider ?? "github";
143273
- import_react115.default.useEffect(() => {
143851
+ import_react117.default.useEffect(() => {
143274
143852
  setAuthProvider(activeProvider);
143275
143853
  if (detectedBaseUrl && activeProvider === gitDetectedProvider) {
143276
143854
  setAuthBaseUrl(detectedBaseUrl);
143277
143855
  }
143278
143856
  }, [activeProvider, detectedBaseUrl, gitDetectedProvider]);
143279
143857
  const localRepo = repoOwner && repoName ? { owner: repoOwner, repo: repoName } : null;
143280
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ThemeProvider, { theme: theme14, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RepoContextProvider, { localRepo, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorBoundary2, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143858
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ThemeProvider, { theme: theme14, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(RepoContextProvider, { localRepo, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorBoundary2, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143281
143859
  AppContent,
143282
143860
  {
143283
143861
  repoOwner,
@@ -143294,7 +143872,7 @@ function App2({
143294
143872
  detectedBaseUrl,
143295
143873
  directPR
143296
143874
  }) {
143297
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(InputFocusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
143875
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(InputFocusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143298
143876
  AppWithTheme,
143299
143877
  {
143300
143878
  repoOwner,
@@ -143414,7 +143992,11 @@ function parseCliArgs(argv) {
143414
143992
  }
143415
143993
 
143416
143994
  // src/cli.tsx
143417
- var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
143995
+ var import_yaml2 = __toESM(require_dist(), 1);
143996
+ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
143997
+ import { readFile as readFile3 } from "fs/promises";
143998
+ import { homedir as homedir5 } from "os";
143999
+ import { join as join7 } from "path";
143418
144000
  var ENTER_ALT_SCREEN = "\x1B[?1049h";
143419
144001
  var EXIT_ALT_SCREEN = "\x1B[?1049l";
143420
144002
  var CLEAR_SCREEN = "\x1B[2J";
@@ -143492,6 +144074,18 @@ async function showHelp() {
143492
144074
  console.log(help);
143493
144075
  process.exit(0);
143494
144076
  }
144077
+ async function loadConfiguredHosts() {
144078
+ try {
144079
+ const configPath = join7(homedir5(), ".config", "lazyreview", "config.yaml");
144080
+ const content = await readFile3(configPath, "utf-8");
144081
+ const parsed = (0, import_yaml2.parse)(content, { maxAliasCount: 10 });
144082
+ if (parsed && typeof parsed === "object") {
144083
+ return buildConfiguredHosts(parsed);
144084
+ }
144085
+ } catch {
144086
+ }
144087
+ return {};
144088
+ }
143495
144089
  async function main() {
143496
144090
  const parsed = parseCliArgs(process.argv);
143497
144091
  if (parsed.command === "version") {
@@ -143514,12 +144108,13 @@ async function main() {
143514
144108
  cleanup();
143515
144109
  process.exit(0);
143516
144110
  });
144111
+ const configuredHosts = await loadConfiguredHosts();
143517
144112
  let repoOwner = parsed.owner;
143518
144113
  let repoName = parsed.repo;
143519
144114
  let detectedProvider = parsed.provider;
143520
144115
  let detectedBaseUrl = null;
143521
144116
  if (!repoOwner || !repoName) {
143522
- const gitInfo = await detectGitRepo();
144117
+ const gitInfo = await detectGitRepo(configuredHosts);
143523
144118
  if (gitInfo.isGitRepo && gitInfo.owner && gitInfo.repo) {
143524
144119
  repoOwner = repoOwner ?? gitInfo.owner;
143525
144120
  repoName = repoName ?? gitInfo.repo;
@@ -143528,7 +144123,7 @@ async function main() {
143528
144123
  }
143529
144124
  }
143530
144125
  render_default(
143531
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
144126
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
143532
144127
  App2,
143533
144128
  {
143534
144129
  repoOwner,