lazyreview 1.0.71 → 1.0.72

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 +1389 -479
  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 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");
9604
+ var React72 = 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 = 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;
9611
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React72.__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 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");
22204
+ var React72 = 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 = 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;
22211
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React72.__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 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() {
24838
+ var React72 = 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 = React72.__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
- React70 = {
24841
+ React72 = {
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 = React70.react_stack_bottom_frame.bind(
24849
- React70,
24848
+ var unknownOwnerDebugStack = React72.react_stack_bottom_frame.bind(
24849
+ React72,
24850
24850
  UnknownOwner
24851
24851
  )();
24852
24852
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
@@ -81113,7 +81113,7 @@ var createStandard = (stream2, { showCursor = false } = {}) => {
81113
81113
  let previousCursorPosition;
81114
81114
  let cursorWasShown = false;
81115
81115
  const getActiveCursor = () => cursorDirty ? cursorPosition : void 0;
81116
- const hasChanges = (str, activeCursor) => {
81116
+ const hasChanges2 = (str, activeCursor) => {
81117
81117
  const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
81118
81118
  return str !== previousOutput || cursorChanged;
81119
81119
  };
@@ -81125,7 +81125,7 @@ var createStandard = (stream2, { showCursor = false } = {}) => {
81125
81125
  const activeCursor = getActiveCursor();
81126
81126
  cursorDirty = false;
81127
81127
  const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
81128
- if (!hasChanges(str, activeCursor)) {
81128
+ if (!hasChanges2(str, activeCursor)) {
81129
81129
  return false;
81130
81130
  }
81131
81131
  const lines = str.split("\n");
@@ -81187,7 +81187,7 @@ var createStandard = (stream2, { showCursor = false } = {}) => {
81187
81187
  cursorDirty = true;
81188
81188
  };
81189
81189
  render3.isCursorDirty = () => cursorDirty;
81190
- render3.willRender = (str) => hasChanges(str, getActiveCursor());
81190
+ render3.willRender = (str) => hasChanges2(str, getActiveCursor());
81191
81191
  return render3;
81192
81192
  };
81193
81193
  var createIncremental = (stream2, { showCursor = false } = {}) => {
@@ -81199,7 +81199,7 @@ var createIncremental = (stream2, { showCursor = false } = {}) => {
81199
81199
  let previousCursorPosition;
81200
81200
  let cursorWasShown = false;
81201
81201
  const getActiveCursor = () => cursorDirty ? cursorPosition : void 0;
81202
- const hasChanges = (str, activeCursor) => {
81202
+ const hasChanges2 = (str, activeCursor) => {
81203
81203
  const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
81204
81204
  return str !== previousOutput || cursorChanged;
81205
81205
  };
@@ -81211,7 +81211,7 @@ var createIncremental = (stream2, { showCursor = false } = {}) => {
81211
81211
  const activeCursor = getActiveCursor();
81212
81212
  cursorDirty = false;
81213
81213
  const cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
81214
- if (!hasChanges(str, activeCursor)) {
81214
+ if (!hasChanges2(str, activeCursor)) {
81215
81215
  return false;
81216
81216
  }
81217
81217
  const nextLines = str.split("\n");
@@ -81308,7 +81308,7 @@ var createIncremental = (stream2, { showCursor = false } = {}) => {
81308
81308
  cursorDirty = true;
81309
81309
  };
81310
81310
  render3.isCursorDirty = () => cursorDirty;
81311
- render3.willRender = (str) => hasChanges(str, getActiveCursor());
81311
+ render3.willRender = (str) => hasChanges2(str, getActiveCursor());
81312
81312
  return render3;
81313
81313
  };
81314
81314
  var create2 = (stream2, { showCursor = false, incremental = false } = {}) => {
@@ -83064,7 +83064,7 @@ var measureElement = (node) => ({
83064
83064
  var measure_element_default = measureElement;
83065
83065
 
83066
83066
  // src/app.tsx
83067
- var import_react117 = __toESM(require_react(), 1);
83067
+ var import_react119 = __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 {
@@ -127924,7 +127924,8 @@ var DEFAULT_KEYBINDINGS = {
127924
127924
  openInBrowser: "o",
127925
127925
  copyUrl: "y",
127926
127926
  toggleUnread: "u",
127927
- toggleState: "t"
127927
+ toggleState: "t",
127928
+ createPR: "N"
127928
127929
  },
127929
127930
  prDetail: {
127930
127931
  submitReview: "R",
@@ -127939,7 +127940,8 @@ var DEFAULT_KEYBINDINGS = {
127939
127940
  copyUrl: "y",
127940
127941
  editTitle: "T",
127941
127942
  toggleDraft: "W",
127942
- labels: "L"
127943
+ labels: "L",
127944
+ assignees: "A"
127943
127945
  },
127944
127946
  conversations: {
127945
127947
  newComment: "c",
@@ -132183,7 +132185,7 @@ var ErrorBoundary2 = class extends import_react73.default.Component {
132183
132185
  };
132184
132186
 
132185
132187
  // src/screens/PRDetailScreen.tsx
132186
- var import_react97 = __toESM(require_react(), 1);
132188
+ var import_react98 = __toESM(require_react(), 1);
132187
132189
 
132188
132190
  // src/services/GitHubApiTypes.ts
132189
132191
  var GitHubApi = class extends Context_exports.Tag("GitHubApi")() {
@@ -132740,7 +132742,7 @@ var GitHubApiLive = Layer_exports.effect(
132740
132742
  Effect_exports.gen(function* () {
132741
132743
  const auth = yield* Auth;
132742
132744
  return CodeReviewApi.of({
132743
- listPullRequests: (owner, repo, options = {}) => Effect_exports.gen(function* () {
132745
+ listPRs: (owner, repo, options = {}) => Effect_exports.gen(function* () {
132744
132746
  validateOwner(owner);
132745
132747
  validateRepo(repo);
132746
132748
  const token = yield* auth.getToken();
@@ -132752,7 +132754,7 @@ var GitHubApiLive = Layer_exports.effect(
132752
132754
  Schema_exports.Array(PullRequest)
132753
132755
  );
132754
132756
  }),
132755
- getPullRequest: (owner, repo, number9) => Effect_exports.gen(function* () {
132757
+ getPR: (owner, repo, number9) => Effect_exports.gen(function* () {
132756
132758
  validateOwner(owner);
132757
132759
  validateRepo(repo);
132758
132760
  validateNumber(number9);
@@ -132763,7 +132765,7 @@ var GitHubApiLive = Layer_exports.effect(
132763
132765
  PullRequest
132764
132766
  );
132765
132767
  }),
132766
- getPullRequestFiles: (owner, repo, number9) => Effect_exports.gen(function* () {
132768
+ getPRFiles: (owner, repo, number9) => Effect_exports.gen(function* () {
132767
132769
  validateOwner(owner);
132768
132770
  validateRepo(repo);
132769
132771
  validateNumber(number9);
@@ -132774,7 +132776,7 @@ var GitHubApiLive = Layer_exports.effect(
132774
132776
  FileChange
132775
132777
  );
132776
132778
  }),
132777
- getPullRequestComments: (owner, repo, number9) => Effect_exports.gen(function* () {
132779
+ getPRComments: (owner, repo, number9) => Effect_exports.gen(function* () {
132778
132780
  validateOwner(owner);
132779
132781
  validateRepo(repo);
132780
132782
  validateNumber(number9);
@@ -132796,7 +132798,7 @@ var GitHubApiLive = Layer_exports.effect(
132796
132798
  IssueComment
132797
132799
  );
132798
132800
  }),
132799
- getPullRequestReviews: (owner, repo, number9) => Effect_exports.gen(function* () {
132801
+ getPRReviews: (owner, repo, number9) => Effect_exports.gen(function* () {
132800
132802
  validateOwner(owner);
132801
132803
  validateRepo(repo);
132802
132804
  validateNumber(number9);
@@ -132807,7 +132809,7 @@ var GitHubApiLive = Layer_exports.effect(
132807
132809
  Review
132808
132810
  );
132809
132811
  }),
132810
- getPullRequestCommits: (owner, repo, number9) => Effect_exports.gen(function* () {
132812
+ getPRCommits: (owner, repo, number9) => Effect_exports.gen(function* () {
132811
132813
  validateOwner(owner);
132812
132814
  validateRepo(repo);
132813
132815
  validateNumber(number9);
@@ -132836,7 +132838,7 @@ var GitHubApiLive = Layer_exports.effect(
132836
132838
  const query = `is:pr ${stateQ} involves:@me`.replace(/\s+/g, " ").trim();
132837
132839
  return yield* fetchGitHubSearchPaginated(query, token);
132838
132840
  }),
132839
- getCheckRuns: (owner, repo, ref) => Effect_exports.gen(function* () {
132841
+ getPRChecks: (owner, repo, ref) => Effect_exports.gen(function* () {
132840
132842
  validateOwner(owner);
132841
132843
  validateRepo(repo);
132842
132844
  validateRef(ref);
@@ -132859,7 +132861,7 @@ var GitHubApiLive = Layer_exports.effect(
132859
132861
  { body, event }
132860
132862
  );
132861
132863
  }),
132862
- createComment: (owner, repo, issueNumber, body) => Effect_exports.gen(function* () {
132864
+ addComment: (owner, repo, issueNumber, body) => Effect_exports.gen(function* () {
132863
132865
  validateOwner(owner);
132864
132866
  validateRepo(repo);
132865
132867
  validateNumber(issueNumber);
@@ -132871,7 +132873,7 @@ var GitHubApiLive = Layer_exports.effect(
132871
132873
  { body }
132872
132874
  );
132873
132875
  }),
132874
- createReviewComment: (owner, repo, prNumber, body, commitId, path, line, side, startLine, startSide) => Effect_exports.gen(function* () {
132876
+ addDiffComment: (owner, repo, prNumber, body, commitId, path, line, side, startLine, startSide) => Effect_exports.gen(function* () {
132875
132877
  validateOwner(owner);
132876
132878
  validateRepo(repo);
132877
132879
  validateNumber(prNumber);
@@ -132945,7 +132947,7 @@ var GitHubApiLive = Layer_exports.effect(
132945
132947
  })
132946
132948
  );
132947
132949
  }),
132948
- resolveReviewThread: (threadId) => Effect_exports.gen(function* () {
132950
+ resolveThread: (threadId) => Effect_exports.gen(function* () {
132949
132951
  const token = yield* auth.getToken();
132950
132952
  yield* graphqlGitHub(
132951
132953
  token,
@@ -132957,7 +132959,7 @@ var GitHubApiLive = Layer_exports.effect(
132957
132959
  { threadId }
132958
132960
  );
132959
132961
  }),
132960
- unresolveReviewThread: (threadId) => Effect_exports.gen(function* () {
132962
+ unresolveThread: (threadId) => Effect_exports.gen(function* () {
132961
132963
  const token = yield* auth.getToken();
132962
132964
  yield* graphqlGitHub(
132963
132965
  token,
@@ -132969,7 +132971,7 @@ var GitHubApiLive = Layer_exports.effect(
132969
132971
  { threadId }
132970
132972
  );
132971
132973
  }),
132972
- replyToReviewComment: (owner, repo, prNumber, body, inReplyTo) => Effect_exports.gen(function* () {
132974
+ replyToComment: (owner, repo, prNumber, body, inReplyTo) => Effect_exports.gen(function* () {
132973
132975
  validateOwner(owner);
132974
132976
  validateRepo(repo);
132975
132977
  validateNumber(prNumber);
@@ -132994,7 +132996,7 @@ var GitHubApiLive = Layer_exports.effect(
132994
132996
  { reviewers: [...reviewers] }
132995
132997
  );
132996
132998
  }),
132997
- mergePullRequest: (owner, repo, prNumber, mergeMethod, commitTitle, commitMessage) => Effect_exports.gen(function* () {
132999
+ mergePR: (owner, repo, prNumber, mergeMethod, commitTitle, commitMessage) => Effect_exports.gen(function* () {
132998
133000
  validateOwner(owner);
132999
133001
  validateRepo(repo);
133000
133002
  validateNumber(prNumber);
@@ -133080,7 +133082,7 @@ var GitHubApiLive = Layer_exports.effect(
133080
133082
  {}
133081
133083
  );
133082
133084
  }),
133083
- closePullRequest: (owner, repo, prNumber) => Effect_exports.gen(function* () {
133085
+ closePR: (owner, repo, prNumber) => Effect_exports.gen(function* () {
133084
133086
  validateOwner(owner);
133085
133087
  validateRepo(repo);
133086
133088
  validateNumber(prNumber);
@@ -133092,7 +133094,7 @@ var GitHubApiLive = Layer_exports.effect(
133092
133094
  { state: "closed" }
133093
133095
  );
133094
133096
  }),
133095
- reopenPullRequest: (owner, repo, prNumber) => Effect_exports.gen(function* () {
133097
+ reopenPR: (owner, repo, prNumber) => Effect_exports.gen(function* () {
133096
133098
  validateOwner(owner);
133097
133099
  validateRepo(repo);
133098
133100
  validateNumber(prNumber);
@@ -133128,7 +133130,7 @@ var GitHubApiLive = Layer_exports.effect(
133128
133130
  { body }
133129
133131
  );
133130
133132
  }),
133131
- updatePRDescription: (owner, repo, prNumber, body) => Effect_exports.gen(function* () {
133133
+ updatePRBody: (owner, repo, prNumber, body) => Effect_exports.gen(function* () {
133132
133134
  validateOwner(owner);
133133
133135
  validateRepo(repo);
133134
133136
  validateNumber(prNumber);
@@ -133219,6 +133221,46 @@ var GitHubApiLive = Layer_exports.effect(
133219
133221
  { labels: [...labels] }
133220
133222
  );
133221
133223
  }),
133224
+ getCollaborators: (owner, repo) => Effect_exports.gen(function* () {
133225
+ validateOwner(owner);
133226
+ validateRepo(repo);
133227
+ const token = yield* auth.getToken();
133228
+ return yield* fetchGitHubPaginated(
133229
+ `/repos/${owner}/${repo}/collaborators`,
133230
+ token,
133231
+ User
133232
+ );
133233
+ }),
133234
+ updateAssignees: (owner, repo, prNumber, assignees) => Effect_exports.gen(function* () {
133235
+ validateOwner(owner);
133236
+ validateRepo(repo);
133237
+ validateNumber(prNumber);
133238
+ const token = yield* auth.getToken();
133239
+ yield* mutateGitHub(
133240
+ "POST",
133241
+ `/repos/${owner}/${repo}/issues/${prNumber}/assignees`,
133242
+ token,
133243
+ { assignees: [...assignees] }
133244
+ );
133245
+ }),
133246
+ createPR: (owner, repo, title, body, baseBranch, headBranch, draft) => Effect_exports.gen(function* () {
133247
+ validateOwner(owner);
133248
+ validateRepo(repo);
133249
+ const token = yield* auth.getToken();
133250
+ const result = yield* mutateGitHubJson(
133251
+ "POST",
133252
+ `/repos/${owner}/${repo}/pulls`,
133253
+ token,
133254
+ {
133255
+ title,
133256
+ body,
133257
+ base: baseBranch,
133258
+ head: headBranch,
133259
+ ...draft != null ? { draft } : {}
133260
+ }
133261
+ );
133262
+ return { number: result.number, html_url: result.html_url };
133263
+ }),
133222
133264
  getCurrentUser: () => Effect_exports.gen(function* () {
133223
133265
  const token = yield* auth.getToken();
133224
133266
  return yield* fetchGitHub(
@@ -133273,6 +133315,82 @@ function useRefreshInterval(overrideSeconds) {
133273
133315
  return baseMs;
133274
133316
  }
133275
133317
 
133318
+ // src/hooks/optimistic-updates.ts
133319
+ var optimisticIdCounter = -1;
133320
+ function nextOptimisticId() {
133321
+ const id = optimisticIdCounter;
133322
+ optimisticIdCounter -= 1;
133323
+ return id;
133324
+ }
133325
+ var OPTIMISTIC_USER = {
133326
+ login: "you",
133327
+ id: 0,
133328
+ avatar_url: "",
133329
+ html_url: "",
133330
+ type: "User"
133331
+ };
133332
+ function mapEventToState(event) {
133333
+ switch (event) {
133334
+ case "APPROVE":
133335
+ return "APPROVED";
133336
+ case "REQUEST_CHANGES":
133337
+ return "CHANGES_REQUESTED";
133338
+ case "COMMENT":
133339
+ return "COMMENTED";
133340
+ }
133341
+ }
133342
+ function createOptimisticComment(input) {
133343
+ const now2 = (/* @__PURE__ */ new Date()).toISOString();
133344
+ return {
133345
+ id: nextOptimisticId(),
133346
+ body: input.body,
133347
+ user: OPTIMISTIC_USER,
133348
+ created_at: now2,
133349
+ updated_at: now2,
133350
+ html_url: "",
133351
+ path: input.path,
133352
+ line: input.line,
133353
+ side: input.side,
133354
+ in_reply_to_id: input.inReplyToId
133355
+ };
133356
+ }
133357
+ function createOptimisticIssueComment(input) {
133358
+ const now2 = (/* @__PURE__ */ new Date()).toISOString();
133359
+ return {
133360
+ id: nextOptimisticId(),
133361
+ body: input.body,
133362
+ user: OPTIMISTIC_USER,
133363
+ created_at: now2,
133364
+ updated_at: now2,
133365
+ html_url: ""
133366
+ };
133367
+ }
133368
+ function createOptimisticReview(input) {
133369
+ return {
133370
+ id: nextOptimisticId(),
133371
+ body: input.body,
133372
+ state: mapEventToState(input.event),
133373
+ user: OPTIMISTIC_USER,
133374
+ html_url: "",
133375
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString()
133376
+ };
133377
+ }
133378
+ function applyOptimisticComment(old, newItem) {
133379
+ return old ? [...old, newItem] : [newItem];
133380
+ }
133381
+ function applyOptimisticIssueComment(old, newItem) {
133382
+ return old ? [...old, newItem] : [newItem];
133383
+ }
133384
+ function applyOptimisticReview(old, newItem) {
133385
+ return old ? [...old, newItem] : [newItem];
133386
+ }
133387
+ function applyThreadResolution(old, threadId, isResolved) {
133388
+ if (!old) return [];
133389
+ return old.map(
133390
+ (thread) => thread.id === threadId ? { ...thread, isResolved } : thread
133391
+ );
133392
+ }
133393
+
133276
133394
  // src/hooks/useGitHubMutations.ts
133277
133395
  function createGitHubMutation(options) {
133278
133396
  return function useMutationHook() {
@@ -133294,6 +133412,49 @@ function createGitHubMutation(options) {
133294
133412
  });
133295
133413
  };
133296
133414
  }
133415
+ function createOptimisticMutation(options) {
133416
+ return function useMutationHook() {
133417
+ const queryClient2 = useQueryClient();
133418
+ return useMutation({
133419
+ mutationFn: (params) => runEffect(
133420
+ Effect_exports.gen(function* () {
133421
+ const api = yield* CodeReviewApi;
133422
+ return yield* options.effect(api, params);
133423
+ })
133424
+ ),
133425
+ onMutate: async (params) => {
133426
+ const snapshots = await takeSnapshots(queryClient2, options.cacheUpdates, params);
133427
+ for (const update5 of options.cacheUpdates) {
133428
+ const key = [...update5.queryKey(params)];
133429
+ const oldData = queryClient2.getQueryData(key);
133430
+ queryClient2.setQueryData(key, update5.updater(oldData, params));
133431
+ }
133432
+ return { snapshots };
133433
+ },
133434
+ onError: (_error, params, context6) => {
133435
+ if (context6?.snapshots) {
133436
+ for (const [keyStr, data] of context6.snapshots) {
133437
+ queryClient2.setQueryData(JSON.parse(keyStr), data);
133438
+ }
133439
+ }
133440
+ },
133441
+ onSettled: (_data, _error, params) => {
133442
+ for (const key of options.invalidateKeys(params)) {
133443
+ queryClient2.invalidateQueries({ queryKey: [...key] });
133444
+ }
133445
+ }
133446
+ });
133447
+ };
133448
+ }
133449
+ async function takeSnapshots(queryClient2, cacheUpdates, params) {
133450
+ const snapshots = /* @__PURE__ */ new Map();
133451
+ for (const update5 of cacheUpdates) {
133452
+ const key = [...update5.queryKey(params)];
133453
+ await queryClient2.cancelQueries({ queryKey: key });
133454
+ snapshots.set(JSON.stringify(key), queryClient2.getQueryData(key));
133455
+ }
133456
+ return snapshots;
133457
+ }
133297
133458
  function invalidatePRLists() {
133298
133459
  return [["prs"], ["my-prs"], ["review-requests"], ["involved-prs"]];
133299
133460
  }
@@ -133306,35 +133467,83 @@ function invalidatePRThreads(owner, repo, prNumber) {
133306
133467
  ["pr-review-threads", owner, repo, prNumber]
133307
133468
  ];
133308
133469
  }
133309
- var useSubmitReview = createGitHubMutation({
133470
+ var useSubmitReview = createOptimisticMutation({
133310
133471
  effect: (api, p) => api.submitReview(p.owner, p.repo, p.prNumber, p.body, p.event),
133311
133472
  invalidateKeys: (p) => [
133312
133473
  ["pr-reviews", p.owner, p.repo, p.prNumber],
133313
133474
  ...invalidatePRComments(p.owner, p.repo, p.prNumber)
133475
+ ],
133476
+ cacheUpdates: [
133477
+ {
133478
+ queryKey: (p) => ["pr-reviews", p.owner, p.repo, p.prNumber],
133479
+ updater: (old, p) => applyOptimisticReview(
133480
+ old,
133481
+ createOptimisticReview({ body: p.body, event: p.event })
133482
+ )
133483
+ }
133314
133484
  ]
133315
133485
  });
133316
- var useCreateComment = createGitHubMutation({
133317
- effect: (api, p) => api.createComment(p.owner, p.repo, p.issueNumber, p.body),
133486
+ var useCreateComment = createOptimisticMutation({
133487
+ effect: (api, p) => api.addComment(p.owner, p.repo, p.issueNumber, p.body),
133318
133488
  invalidateKeys: (p) => [
133319
133489
  ["pr-comments", p.owner, p.repo, p.issueNumber],
133320
133490
  ["issue-comments", p.owner, p.repo, p.issueNumber]
133491
+ ],
133492
+ cacheUpdates: [
133493
+ {
133494
+ queryKey: (p) => ["issue-comments", p.owner, p.repo, p.issueNumber],
133495
+ updater: (old, p) => applyOptimisticIssueComment(
133496
+ old,
133497
+ createOptimisticIssueComment({ body: p.body })
133498
+ )
133499
+ }
133321
133500
  ]
133322
133501
  });
133323
- var useCreateReviewComment = createGitHubMutation({
133324
- effect: (api, p) => api.createReviewComment(p.owner, p.repo, p.prNumber, p.body, p.commitId, p.path, p.line, p.side, p.startLine, p.startSide),
133325
- invalidateKeys: (p) => invalidatePRComments(p.owner, p.repo, p.prNumber)
133502
+ var useCreateReviewComment = createOptimisticMutation({
133503
+ effect: (api, p) => api.addDiffComment(p.owner, p.repo, p.prNumber, p.body, p.commitId, p.path, p.line, p.side, p.startLine, p.startSide),
133504
+ invalidateKeys: (p) => invalidatePRComments(p.owner, p.repo, p.prNumber),
133505
+ cacheUpdates: [
133506
+ {
133507
+ queryKey: (p) => ["pr-comments", p.owner, p.repo, p.prNumber],
133508
+ updater: (old, p) => applyOptimisticComment(
133509
+ old,
133510
+ createOptimisticComment({ body: p.body, path: p.path, line: p.line, side: p.side })
133511
+ )
133512
+ }
133513
+ ]
133326
133514
  });
133327
- var useResolveReviewThread = createGitHubMutation({
133328
- effect: (api, p) => api.resolveReviewThread(p.threadId),
133329
- invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber)
133515
+ var useResolveReviewThread = createOptimisticMutation({
133516
+ effect: (api, p) => api.resolveThread(p.threadId),
133517
+ invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber),
133518
+ cacheUpdates: [
133519
+ {
133520
+ queryKey: (p) => ["pr-review-threads", p.owner, p.repo, p.prNumber],
133521
+ updater: (old, p) => applyThreadResolution(old, p.threadId, true)
133522
+ }
133523
+ ]
133330
133524
  });
133331
- var useUnresolveReviewThread = createGitHubMutation({
133332
- effect: (api, p) => api.unresolveReviewThread(p.threadId),
133333
- invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber)
133525
+ var useUnresolveReviewThread = createOptimisticMutation({
133526
+ effect: (api, p) => api.unresolveThread(p.threadId),
133527
+ invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber),
133528
+ cacheUpdates: [
133529
+ {
133530
+ queryKey: (p) => ["pr-review-threads", p.owner, p.repo, p.prNumber],
133531
+ updater: (old, p) => applyThreadResolution(old, p.threadId, false)
133532
+ }
133533
+ ]
133334
133534
  });
133335
- var useReplyToReviewComment = createGitHubMutation({
133336
- effect: (api, p) => api.replyToReviewComment(p.owner, p.repo, p.prNumber, p.body, p.inReplyTo),
133337
- invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber)
133535
+ var useReplyToReviewComment = createOptimisticMutation({
133536
+ effect: (api, p) => api.replyToComment(p.owner, p.repo, p.prNumber, p.body, p.inReplyTo),
133537
+ invalidateKeys: (p) => invalidatePRThreads(p.owner, p.repo, p.prNumber),
133538
+ cacheUpdates: [
133539
+ {
133540
+ queryKey: (p) => ["pr-comments", p.owner, p.repo, p.prNumber],
133541
+ updater: (old, p) => applyOptimisticComment(
133542
+ old,
133543
+ createOptimisticComment({ body: p.body, inReplyToId: p.inReplyTo })
133544
+ )
133545
+ }
133546
+ ]
133338
133547
  });
133339
133548
  var useRequestReReview = createGitHubMutation({
133340
133549
  effect: (api, p) => api.requestReReview(p.owner, p.repo, p.prNumber, p.reviewers),
@@ -133344,7 +133553,7 @@ var useRequestReReview = createGitHubMutation({
133344
133553
  ]
133345
133554
  });
133346
133555
  var useMergePR = createGitHubMutation({
133347
- effect: (api, p) => api.mergePullRequest(p.owner, p.repo, p.prNumber, p.mergeMethod, p.commitTitle, p.commitMessage),
133556
+ effect: (api, p) => api.mergePR(p.owner, p.repo, p.prNumber, p.mergeMethod, p.commitTitle, p.commitMessage),
133348
133557
  invalidateKeys: (p) => [
133349
133558
  ["pr", p.owner, p.repo, p.prNumber],
133350
133559
  ...invalidatePRLists()
@@ -133371,21 +133580,21 @@ var useDiscardPendingReview = createGitHubMutation({
133371
133580
  effect: (api, p) => api.discardPendingReview(p.owner, p.repo, p.prNumber, p.reviewId)
133372
133581
  });
133373
133582
  var useClosePullRequest = createGitHubMutation({
133374
- effect: (api, p) => api.closePullRequest(p.owner, p.repo, p.prNumber),
133583
+ effect: (api, p) => api.closePR(p.owner, p.repo, p.prNumber),
133375
133584
  invalidateKeys: (p) => [
133376
133585
  ["pr", p.owner, p.repo, p.prNumber],
133377
133586
  ...invalidatePRLists()
133378
133587
  ]
133379
133588
  });
133380
133589
  var useReopenPullRequest = createGitHubMutation({
133381
- effect: (api, p) => api.reopenPullRequest(p.owner, p.repo, p.prNumber),
133590
+ effect: (api, p) => api.reopenPR(p.owner, p.repo, p.prNumber),
133382
133591
  invalidateKeys: (p) => [
133383
133592
  ["pr", p.owner, p.repo, p.prNumber],
133384
133593
  ...invalidatePRLists()
133385
133594
  ]
133386
133595
  });
133387
133596
  var useUpdatePRDescription = createGitHubMutation({
133388
- effect: (api, p) => api.updatePRDescription(p.owner, p.repo, p.prNumber, p.body),
133597
+ effect: (api, p) => api.updatePRBody(p.owner, p.repo, p.prNumber, p.body),
133389
133598
  invalidateKeys: (p) => [
133390
133599
  ["pr", p.owner, p.repo, p.prNumber],
133391
133600
  ...invalidatePRLists()
@@ -133430,6 +133639,20 @@ var useSetLabels = createGitHubMutation({
133430
133639
  ...invalidatePRLists()
133431
133640
  ]
133432
133641
  });
133642
+ var useUpdateAssignees = createGitHubMutation({
133643
+ effect: (api, p) => api.updateAssignees(p.owner, p.repo, p.prNumber, p.assignees),
133644
+ invalidateKeys: (p) => [
133645
+ ["pr", p.owner, p.repo, p.prNumber],
133646
+ ...invalidatePRLists()
133647
+ ]
133648
+ });
133649
+ var useCreatePullRequest = createGitHubMutation({
133650
+ effect: (api, p) => api.createPR(p.owner, p.repo, p.title, p.body, p.baseBranch, p.headBranch, p.draft),
133651
+ invalidateKeys: (p) => [
133652
+ ["prs", p.owner, p.repo],
133653
+ ...invalidatePRLists()
133654
+ ]
133655
+ });
133433
133656
 
133434
133657
  // src/hooks/useGitHub.ts
133435
133658
  function usePullRequests(owner, repo, options) {
@@ -133439,7 +133662,7 @@ function usePullRequests(owner, repo, options) {
133439
133662
  queryFn: () => runEffect(
133440
133663
  Effect_exports.gen(function* () {
133441
133664
  const api = yield* CodeReviewApi;
133442
- return yield* api.listPullRequests(owner, repo, options);
133665
+ return yield* api.listPRs(owner, repo, options);
133443
133666
  })
133444
133667
  ),
133445
133668
  enabled: !!owner && !!repo,
@@ -133453,7 +133676,7 @@ function usePullRequest(owner, repo, number9) {
133453
133676
  queryFn: () => runEffect(
133454
133677
  Effect_exports.gen(function* () {
133455
133678
  const api = yield* CodeReviewApi;
133456
- return yield* api.getPullRequest(owner, repo, number9);
133679
+ return yield* api.getPR(owner, repo, number9);
133457
133680
  })
133458
133681
  ),
133459
133682
  enabled: !!owner && !!repo && !!number9,
@@ -133468,7 +133691,7 @@ function usePRFiles(owner, repo, number9, options) {
133468
133691
  queryFn: () => runEffect(
133469
133692
  Effect_exports.gen(function* () {
133470
133693
  const api = yield* CodeReviewApi;
133471
- return yield* api.getPullRequestFiles(owner, repo, number9);
133694
+ return yield* api.getPRFiles(owner, repo, number9);
133472
133695
  })
133473
133696
  ),
133474
133697
  enabled: enabledFlag && !!owner && !!repo && !!number9,
@@ -133483,7 +133706,7 @@ function usePRComments(owner, repo, number9, options) {
133483
133706
  queryFn: () => runEffect(
133484
133707
  Effect_exports.gen(function* () {
133485
133708
  const api = yield* CodeReviewApi;
133486
- return yield* api.getPullRequestComments(owner, repo, number9);
133709
+ return yield* api.getPRComments(owner, repo, number9);
133487
133710
  })
133488
133711
  ),
133489
133712
  enabled: enabledFlag && !!owner && !!repo && !!number9,
@@ -133513,7 +133736,7 @@ function usePRReviews(owner, repo, number9, options) {
133513
133736
  queryFn: () => runEffect(
133514
133737
  Effect_exports.gen(function* () {
133515
133738
  const api = yield* CodeReviewApi;
133516
- return yield* api.getPullRequestReviews(owner, repo, number9);
133739
+ return yield* api.getPRReviews(owner, repo, number9);
133517
133740
  })
133518
133741
  ),
133519
133742
  enabled: enabledFlag && !!owner && !!repo && !!number9,
@@ -133528,7 +133751,7 @@ function usePRCommits(owner, repo, number9, options) {
133528
133751
  queryFn: () => runEffect(
133529
133752
  Effect_exports.gen(function* () {
133530
133753
  const api = yield* CodeReviewApi;
133531
- return yield* api.getPullRequestCommits(owner, repo, number9);
133754
+ return yield* api.getPRCommits(owner, repo, number9);
133532
133755
  })
133533
133756
  ),
133534
133757
  enabled: enabledFlag && !!owner && !!repo && !!number9,
@@ -133597,7 +133820,7 @@ function useCheckRuns(owner, repo, ref, options) {
133597
133820
  queryFn: () => runEffect(
133598
133821
  Effect_exports.gen(function* () {
133599
133822
  const api = yield* CodeReviewApi;
133600
- return yield* api.getCheckRuns(owner, repo, ref);
133823
+ return yield* api.getPRChecks(owner, repo, ref);
133601
133824
  })
133602
133825
  ),
133603
133826
  enabled: enabledFlag && !!owner && !!repo && !!ref,
@@ -133644,6 +133867,21 @@ function useRepoLabels(owner, repo, options) {
133644
133867
  // 5 minutes - labels don't change often
133645
133868
  });
133646
133869
  }
133870
+ function useCollaborators(owner, repo, options) {
133871
+ const enabledFlag = options?.enabled ?? true;
133872
+ return useQuery({
133873
+ queryKey: ["collaborators", owner, repo],
133874
+ queryFn: () => runEffect(
133875
+ Effect_exports.gen(function* () {
133876
+ const api = yield* CodeReviewApi;
133877
+ return yield* api.getCollaborators(owner, repo);
133878
+ })
133879
+ ),
133880
+ enabled: enabledFlag && !!owner && !!repo,
133881
+ staleTime: 5 * 60 * 1e3
133882
+ // 5 minutes - collaborators don't change often
133883
+ });
133884
+ }
133647
133885
 
133648
133886
  // src/hooks/useReviewActions.ts
133649
133887
  var import_react75 = __toESM(require_react(), 1);
@@ -139891,7 +140129,7 @@ function LabelPickerModal({
139891
140129
  const [selectedLabels, setSelectedLabels] = (0, import_react94.useState)(
139892
140130
  () => new Set(currentLabels)
139893
140131
  );
139894
- const hasChanges = (0, import_react94.useMemo)(() => {
140132
+ const hasChanges2 = (0, import_react94.useMemo)(() => {
139895
140133
  const currentSet = new Set(currentLabels);
139896
140134
  if (currentSet.size !== selectedLabels.size) return true;
139897
140135
  for (const label of selectedLabels) {
@@ -139929,7 +140167,7 @@ function LabelPickerModal({
139929
140167
  });
139930
140168
  }
139931
140169
  } else if (_input === "s" && key.ctrl) {
139932
- if (hasChanges) {
140170
+ if (hasChanges2) {
139933
140171
  onSubmit([...selectedLabels]);
139934
140172
  }
139935
140173
  }
@@ -140014,7 +140252,7 @@ function LabelPickerModal({
140014
140252
  label.description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: label.description })
140015
140253
  ] }, label.name);
140016
140254
  }) }),
140017
- hasChanges && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: theme14.colors.info, children: [
140255
+ hasChanges2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { color: theme14.colors.info, children: [
140018
140256
  selectedLabels.size,
140019
140257
  " label",
140020
140258
  selectedLabels.size !== 1 ? "s" : "",
@@ -140028,6 +140266,208 @@ function LabelPickerModal({
140028
140266
  ) });
140029
140267
  }
140030
140268
 
140269
+ // src/components/pr/AssigneePickerModal.tsx
140270
+ var import_react95 = __toESM(require_react(), 1);
140271
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
140272
+ function filterCollaborators(collaborators, query) {
140273
+ if (!query.trim()) return collaborators;
140274
+ const lower = query.toLowerCase();
140275
+ return collaborators.filter((c) => c.login.toLowerCase().includes(lower));
140276
+ }
140277
+ function hasChanges(currentAssignees, selectedAssignees) {
140278
+ const currentSet = new Set(currentAssignees);
140279
+ if (currentSet.size !== selectedAssignees.size) return true;
140280
+ for (const assignee of selectedAssignees) {
140281
+ if (!currentSet.has(assignee)) return true;
140282
+ }
140283
+ return false;
140284
+ }
140285
+ function AssigneePickerModal({
140286
+ collaborators,
140287
+ currentAssignees,
140288
+ onSubmit,
140289
+ onClose,
140290
+ isSubmitting,
140291
+ isLoading,
140292
+ error: error48
140293
+ }) {
140294
+ const theme14 = useTheme();
140295
+ const [selectedIndex, setSelectedIndex] = (0, import_react95.useState)(0);
140296
+ const [searchQuery, setSearchQuery] = (0, import_react95.useState)("");
140297
+ const [isSearching, setIsSearching] = (0, import_react95.useState)(false);
140298
+ const [selectedAssignees, setSelectedAssignees] = (0, import_react95.useState)(
140299
+ () => new Set(currentAssignees)
140300
+ );
140301
+ const filteredCollaborators = (0, import_react95.useMemo)(
140302
+ () => filterCollaborators(collaborators, searchQuery),
140303
+ [collaborators, searchQuery]
140304
+ );
140305
+ const changed = (0, import_react95.useMemo)(
140306
+ () => hasChanges(currentAssignees, selectedAssignees),
140307
+ [currentAssignees, selectedAssignees]
140308
+ );
140309
+ import_react95.default.useEffect(() => {
140310
+ setSelectedIndex(0);
140311
+ }, [searchQuery]);
140312
+ use_input_default(
140313
+ (input, key) => {
140314
+ if (isSubmitting || isLoading) return;
140315
+ if (isSearching) {
140316
+ if (key.escape) {
140317
+ if (searchQuery) {
140318
+ setSearchQuery("");
140319
+ } else {
140320
+ setIsSearching(false);
140321
+ }
140322
+ } else if (key.return) {
140323
+ setIsSearching(false);
140324
+ } else if (key.backspace || key.delete) {
140325
+ setSearchQuery((prev) => prev.slice(0, -1));
140326
+ } else if (input && !key.ctrl && !key.meta) {
140327
+ setSearchQuery((prev) => prev + input);
140328
+ }
140329
+ return;
140330
+ }
140331
+ if (key.escape) {
140332
+ onClose();
140333
+ } else if (input === "/" || input === "f") {
140334
+ setIsSearching(true);
140335
+ } else if (input === "j" || key.downArrow) {
140336
+ setSelectedIndex(
140337
+ (prev) => Math.min(prev + 1, filteredCollaborators.length - 1)
140338
+ );
140339
+ } else if (input === "k" || key.upArrow) {
140340
+ setSelectedIndex((prev) => Math.max(prev - 1, 0));
140341
+ } else if (input === " ") {
140342
+ toggleSelectedCollaborator();
140343
+ } else if (key.return && !key.ctrl && !key.meta) {
140344
+ toggleSelectedCollaborator();
140345
+ } else if (input === "s" && key.ctrl) {
140346
+ if (changed) {
140347
+ onSubmit([...selectedAssignees]);
140348
+ }
140349
+ }
140350
+ },
140351
+ { isActive: true }
140352
+ );
140353
+ function toggleSelectedCollaborator() {
140354
+ const user = filteredCollaborators[selectedIndex];
140355
+ if (user) {
140356
+ setSelectedAssignees((prev) => {
140357
+ if (prev.has(user.login)) {
140358
+ return new Set([...prev].filter((l) => l !== user.login));
140359
+ }
140360
+ return /* @__PURE__ */ new Set([...prev, user.login]);
140361
+ });
140362
+ }
140363
+ }
140364
+ if (isLoading) {
140365
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
140366
+ Box_default,
140367
+ {
140368
+ flexDirection: "column",
140369
+ borderStyle: "round",
140370
+ borderColor: theme14.colors.accent,
140371
+ backgroundColor: theme14.colors.bg,
140372
+ paddingX: 2,
140373
+ paddingY: 1,
140374
+ gap: 1,
140375
+ width: 50,
140376
+ children: [
140377
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Assignees" }),
140378
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: "Loading collaborators..." }),
140379
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Esc: cancel" })
140380
+ ]
140381
+ }
140382
+ ) });
140383
+ }
140384
+ if (collaborators.length === 0) {
140385
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
140386
+ Box_default,
140387
+ {
140388
+ flexDirection: "column",
140389
+ borderStyle: "round",
140390
+ borderColor: theme14.colors.accent,
140391
+ backgroundColor: theme14.colors.bg,
140392
+ paddingX: 2,
140393
+ paddingY: 1,
140394
+ gap: 1,
140395
+ width: 50,
140396
+ children: [
140397
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Assignees" }),
140398
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: "No collaborators available for this repository." }),
140399
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Esc: close" })
140400
+ ]
140401
+ }
140402
+ ) });
140403
+ }
140404
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
140405
+ Box_default,
140406
+ {
140407
+ flexDirection: "column",
140408
+ borderStyle: "round",
140409
+ borderColor: theme14.colors.accent,
140410
+ backgroundColor: theme14.colors.bg,
140411
+ paddingX: 2,
140412
+ paddingY: 1,
140413
+ gap: 1,
140414
+ width: 55,
140415
+ children: [
140416
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Assignees" }),
140417
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: "Toggle assignees for this PR:" }),
140418
+ isSearching && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { children: [
140419
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.accent, children: "Search: " }),
140420
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.text, children: searchQuery }),
140421
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: "|" })
140422
+ ] }),
140423
+ searchQuery && !isSearching && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
140424
+ "Filter: ",
140425
+ searchQuery,
140426
+ " (",
140427
+ filteredCollaborators.length,
140428
+ " results)"
140429
+ ] }),
140430
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box_default, { flexDirection: "column", children: filteredCollaborators.map((user, index) => {
140431
+ const isChecked = selectedAssignees.has(user.login);
140432
+ const isFocused = index === selectedIndex;
140433
+ const isCurrent = currentAssignees.includes(user.login);
140434
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box_default, { gap: 1, children: [
140435
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: isFocused ? theme14.colors.accent : theme14.colors.muted, children: isFocused ? ">" : " " }),
140436
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: isChecked ? theme14.colors.accent : theme14.colors.muted, children: [
140437
+ "[",
140438
+ isChecked ? "x" : " ",
140439
+ "]"
140440
+ ] }),
140441
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
140442
+ Text,
140443
+ {
140444
+ color: isFocused ? theme14.colors.accent : theme14.colors.text,
140445
+ bold: isFocused,
140446
+ children: user.login
140447
+ }
140448
+ ),
140449
+ isCurrent && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(current)" })
140450
+ ] }, user.login);
140451
+ }) }),
140452
+ filteredCollaborators.length === 0 && searchQuery && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.muted, children: [
140453
+ 'No collaborators match "',
140454
+ searchQuery,
140455
+ '"'
140456
+ ] }),
140457
+ changed && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Text, { color: theme14.colors.info, children: [
140458
+ selectedAssignees.size,
140459
+ " assignee",
140460
+ selectedAssignees.size !== 1 ? "s" : "",
140461
+ " selected"
140462
+ ] }),
140463
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.info, children: "Updating assignees..." }),
140464
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.error, children: error48 }),
140465
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Space/Enter: toggle | /: search | Ctrl+S: apply | Esc: cancel" })
140466
+ ]
140467
+ }
140468
+ ) });
140469
+ }
140470
+
140031
140471
  // src/utils/git.ts
140032
140472
  import { execFile as execFile3 } from "child_process";
140033
140473
  import { promisify as promisify2 } from "util";
@@ -140334,6 +140774,56 @@ async function hasUncommittedChanges() {
140334
140774
  return false;
140335
140775
  }
140336
140776
  }
140777
+ async function getCurrentBranch() {
140778
+ try {
140779
+ const { stdout } = await execFileAsync2("git", [
140780
+ "rev-parse",
140781
+ "--abbrev-ref",
140782
+ "HEAD"
140783
+ ]);
140784
+ const branch = stdout.trim();
140785
+ return branch === "HEAD" ? null : branch;
140786
+ } catch {
140787
+ return null;
140788
+ }
140789
+ }
140790
+ async function getDefaultBranch() {
140791
+ try {
140792
+ const { stdout } = await execFileAsync2("git", [
140793
+ "symbolic-ref",
140794
+ "refs/remotes/origin/HEAD",
140795
+ "--short"
140796
+ ]);
140797
+ const ref = stdout.trim();
140798
+ const slashIndex = ref.indexOf("/");
140799
+ return slashIndex >= 0 ? ref.slice(slashIndex + 1) : ref;
140800
+ } catch {
140801
+ try {
140802
+ await execFileAsync2("git", ["rev-parse", "--verify", "origin/main"]);
140803
+ return "main";
140804
+ } catch {
140805
+ try {
140806
+ await execFileAsync2("git", ["rev-parse", "--verify", "origin/master"]);
140807
+ return "master";
140808
+ } catch {
140809
+ return "main";
140810
+ }
140811
+ }
140812
+ }
140813
+ }
140814
+ async function hasRemoteTracking() {
140815
+ try {
140816
+ await execFileAsync2("git", [
140817
+ "rev-parse",
140818
+ "--abbrev-ref",
140819
+ "--symbolic-full-name",
140820
+ "@{upstream}"
140821
+ ]);
140822
+ return true;
140823
+ } catch {
140824
+ return false;
140825
+ }
140826
+ }
140337
140827
  async function checkoutPR(prNumber) {
140338
140828
  const branchName = `pr-${prNumber}`;
140339
140829
  try {
@@ -140388,7 +140878,7 @@ async function checkoutPR(prNumber) {
140388
140878
  }
140389
140879
 
140390
140880
  // src/hooks/useReadState.ts
140391
- var import_react95 = __toESM(require_react(), 1);
140881
+ var import_react96 = __toESM(require_react(), 1);
140392
140882
  import { readFileSync as readFileSync3 } from "fs";
140393
140883
  import { join as join6 } from "path";
140394
140884
  import { homedir as homedir4 } from "os";
@@ -140463,18 +140953,18 @@ function createReadStateStore() {
140463
140953
  }
140464
140954
  var store6 = createReadStateStore();
140465
140955
  function useReadState() {
140466
- const readState = (0, import_react95.useSyncExternalStore)(
140956
+ const readState = (0, import_react96.useSyncExternalStore)(
140467
140957
  store6.subscribe,
140468
140958
  store6.getSnapshot,
140469
140959
  () => ({})
140470
140960
  );
140471
- const markAsRead = (0, import_react95.useCallback)(
140961
+ const markAsRead = (0, import_react96.useCallback)(
140472
140962
  (htmlUrl, prUpdatedAt) => {
140473
140963
  store6.markAsRead(htmlUrl, prUpdatedAt);
140474
140964
  },
140475
140965
  []
140476
140966
  );
140477
- const isUnread = (0, import_react95.useCallback)(
140967
+ const isUnread = (0, import_react96.useCallback)(
140478
140968
  (htmlUrl, prUpdatedAt) => {
140479
140969
  return store6.isUnread(htmlUrl, prUpdatedAt);
140480
140970
  },
@@ -140486,14 +140976,14 @@ function useReadState() {
140486
140976
  }
140487
140977
 
140488
140978
  // src/hooks/useManualRefresh.ts
140489
- var import_react96 = __toESM(require_react(), 1);
140979
+ var import_react97 = __toESM(require_react(), 1);
140490
140980
  function useManualRefresh({
140491
140981
  isActive: isActive2 = true,
140492
140982
  queryKeys
140493
140983
  } = {}) {
140494
140984
  const queryClient2 = useQueryClient();
140495
140985
  const { setStatusMessage } = useStatusMessage();
140496
- const refresh = (0, import_react96.useCallback)(() => {
140986
+ const refresh = (0, import_react97.useCallback)(() => {
140497
140987
  if (queryKeys && queryKeys.length > 0) {
140498
140988
  queryKeys.forEach((key) => {
140499
140989
  queryClient2.invalidateQueries({ queryKey: key });
@@ -140515,7 +141005,7 @@ function useManualRefresh({
140515
141005
  }
140516
141006
 
140517
141007
  // src/screens/PRDetailScreen.tsx
140518
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
141008
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
140519
141009
  var PR_DETAIL_RESERVED_LINES = 12;
140520
141010
  function PRDetailScreen({
140521
141011
  pr,
@@ -140530,17 +141020,19 @@ function PRDetailScreen({
140530
141020
  const { setStatusMessage } = useStatusMessage();
140531
141021
  const { markAsRead } = useReadState();
140532
141022
  const theme14 = useTheme();
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);
141023
+ const [currentTab, setCurrentTab] = (0, import_react98.useState)(0);
141024
+ const [showDiscardConfirm, setShowDiscardConfirm] = (0, import_react98.useState)(false);
141025
+ const [showDraftConfirm, setShowDraftConfirm] = (0, import_react98.useState)(false);
141026
+ const [showLabelPicker, setShowLabelPicker] = (0, import_react98.useState)(false);
141027
+ const [labelError, setLabelError] = (0, import_react98.useState)(null);
141028
+ const [showAssigneePicker, setShowAssigneePicker] = (0, import_react98.useState)(false);
141029
+ const [assigneeError, setAssigneeError] = (0, import_react98.useState)(null);
141030
+ const [initialFile, setInitialFile] = (0, import_react98.useState)(void 0);
140539
141031
  const contentHeight = Math.max(1, (stdout?.rows ?? 24) - PR_DETAIL_RESERVED_LINES);
140540
- import_react97.default.useEffect(() => {
141032
+ import_react98.default.useEffect(() => {
140541
141033
  markAsRead(pr.html_url, pr.updated_at);
140542
141034
  }, [pr.html_url, pr.updated_at, markAsRead]);
140543
- import_react97.default.useEffect(() => {
141035
+ import_react98.default.useEffect(() => {
140544
141036
  const tabContexts = [
140545
141037
  "pr-detail-description",
140546
141038
  "pr-detail-conversations",
@@ -140550,8 +141042,8 @@ function PRDetailScreen({
140550
141042
  ];
140551
141043
  setScreenContext(tabContexts[currentTab] ?? "pr-detail-description");
140552
141044
  }, [currentTab]);
140553
- const visitedTabsRef = (0, import_react97.useRef)(/* @__PURE__ */ new Set([0]));
140554
- import_react97.default.useEffect(() => {
141045
+ const visitedTabsRef = (0, import_react98.useRef)(/* @__PURE__ */ new Set([0]));
141046
+ import_react98.default.useEffect(() => {
140555
141047
  if (!visitedTabsRef.current.has(currentTab)) {
140556
141048
  visitedTabsRef.current = /* @__PURE__ */ new Set([...visitedTabsRef.current, currentTab]);
140557
141049
  }
@@ -140602,7 +141094,13 @@ function PRDetailScreen({
140602
141094
  repo,
140603
141095
  { enabled: showLabelPicker }
140604
141096
  );
140605
- const handleReviewSubmit = (0, import_react97.useCallback)(
141097
+ const updateAssigneesMutation = useUpdateAssignees();
141098
+ const { data: collaborators = [], isLoading: collaboratorsLoading } = useCollaborators(
141099
+ owner,
141100
+ repo,
141101
+ { enabled: showAssigneePicker }
141102
+ );
141103
+ const handleReviewSubmit = (0, import_react98.useCallback)(
140606
141104
  (body, event) => {
140607
141105
  if (pendingReview.isActive) {
140608
141106
  pendingReview.submitReview(body, event);
@@ -140613,7 +141111,7 @@ function PRDetailScreen({
140613
141111
  },
140614
141112
  [pendingReview, modals]
140615
141113
  );
140616
- const handleCommentSubmit = (0, import_react97.useCallback)(
141114
+ const handleCommentSubmit = (0, import_react98.useCallback)(
140617
141115
  (body) => {
140618
141116
  if (pendingReview.isActive && modals.inlineContext) {
140619
141117
  pendingReview.addPendingComment(
@@ -140634,12 +141132,12 @@ function PRDetailScreen({
140634
141132
  },
140635
141133
  [pendingReview, modals]
140636
141134
  );
140637
- const handleGoToFile = (0, import_react97.useCallback)((path) => {
141135
+ const handleGoToFile = (0, import_react98.useCallback)((path) => {
140638
141136
  setInitialFile(path);
140639
141137
  setCurrentTab(3);
140640
141138
  setStatusMessage(`Jumped to ${path}`);
140641
141139
  }, [setStatusMessage]);
140642
- const anyModalOpen = modals.hasModal || showLabelPicker;
141140
+ const anyModalOpen = modals.hasModal || showLabelPicker || showAssigneePicker;
140643
141141
  useManualRefresh({
140644
141142
  isActive: !anyModalOpen
140645
141143
  });
@@ -140743,6 +141241,9 @@ function PRDetailScreen({
140743
141241
  } else if (input === "L") {
140744
141242
  setLabelError(null);
140745
141243
  setShowLabelPicker(true);
141244
+ } else if (input === "A") {
141245
+ setAssigneeError(null);
141246
+ setShowAssigneePicker(true);
140746
141247
  } else if (input === "G") {
140747
141248
  setStatusMessage("Checking out PR #" + pr.number + "...", 1e4);
140748
141249
  checkoutPR(pr.number).then((result) => {
@@ -140768,10 +141269,10 @@ function PRDetailScreen({
140768
141269
  );
140769
141270
  const renderTabContent = () => {
140770
141271
  if (isLoading) {
140771
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadingIndicator, { message: "Loading PR details..." });
141272
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingIndicator, { message: "Loading PR details..." });
140772
141273
  }
140773
141274
  return Match_exports.value(currentTab).pipe(
140774
- Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141275
+ Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140775
141276
  DescriptionTab,
140776
141277
  {
140777
141278
  pr: activePR,
@@ -140780,7 +141281,7 @@ function PRDetailScreen({
140780
141281
  onEditDescription: modals.handleOpenEditDescription
140781
141282
  }
140782
141283
  )),
140783
- Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141284
+ Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140784
141285
  ConversationsTab,
140785
141286
  {
140786
141287
  pr: activePR,
@@ -140800,8 +141301,8 @@ function PRDetailScreen({
140800
141301
  onGoToFile: handleGoToFile
140801
141302
  }
140802
141303
  )),
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)(
141304
+ Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CommitsTab, { commits, isActive: !anyModalOpen, owner, repo })),
141305
+ Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140805
141306
  FilesTab,
140806
141307
  {
140807
141308
  files,
@@ -140818,7 +141319,7 @@ function PRDetailScreen({
140818
141319
  onInitialFileConsumed: () => setInitialFile(void 0)
140819
141320
  }
140820
141321
  )),
140821
- Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141322
+ Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140822
141323
  ChecksTab,
140823
141324
  {
140824
141325
  owner,
@@ -140827,7 +141328,7 @@ function PRDetailScreen({
140827
141328
  isActive: !anyModalOpen
140828
141329
  }
140829
141330
  )),
140830
- Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141331
+ Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140831
141332
  DescriptionTab,
140832
141333
  {
140833
141334
  pr: activePR,
@@ -140838,12 +141339,12 @@ function PRDetailScreen({
140838
141339
  ))
140839
141340
  );
140840
141341
  };
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 })
141342
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, minHeight: 0, children: [
141343
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { flexShrink: 0, flexDirection: "column", children: [
141344
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PRHeader, { pr: activePR, prIndex, prTotal }),
141345
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PRTabs, { activeIndex: currentTab, onChange: setCurrentTab })
140845
141346
  ] }),
140846
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141347
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140847
141348
  Box_default,
140848
141349
  {
140849
141350
  flexShrink: 0,
@@ -140857,31 +141358,31 @@ function PRDetailScreen({
140857
141358
  children: renderTabContent()
140858
141359
  }
140859
141360
  ),
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: [
141361
+ pendingReview.isActive && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { paddingX: 1, children: [
141362
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140862
141363
  "Review in progress (",
140863
141364
  pendingReview.pendingCount,
140864
141365
  " pending comment",
140865
141366
  pendingReview.pendingCount !== 1 ? "s" : "",
140866
141367
  ")"
140867
141368
  ] }),
140868
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { color: theme14.colors.muted, children: " | R: submit | q: discard" })
141369
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: " | R: submit | q: discard" })
140869
141370
  ] }),
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: [
141371
+ showDiscardConfirm && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Box_default, { paddingX: 1, flexDirection: "column", children: [
141372
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140872
141373
  "Discard pending review with ",
140873
141374
  pendingReview.pendingCount,
140874
141375
  " comment",
140875
141376
  pendingReview.pendingCount !== 1 ? "s" : "",
140876
141377
  "? (y/n)"
140877
141378
  ] }),
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: [
141379
+ pendingReview.pendingComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, children: pendingReview.pendingComments.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.muted, children: [
140879
141380
  c.path,
140880
141381
  ":",
140881
141382
  c.line
140882
141383
  ] }, `${c.path}-${c.line}-${i}`)) })
140883
141384
  ] }),
140884
- modals.showReviewModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141385
+ modals.showReviewModal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140885
141386
  ReviewModal,
140886
141387
  {
140887
141388
  onSubmit: handleReviewSubmit,
@@ -140890,7 +141391,7 @@ function PRDetailScreen({
140890
141391
  error: pendingReview.isActive ? pendingReview.error : modals.reviewError
140891
141392
  }
140892
141393
  ),
140893
- modals.showCommentModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141394
+ modals.showCommentModal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140894
141395
  CommentModal,
140895
141396
  {
140896
141397
  title: pendingReview.isActive && modals.inlineContext ? "Add Pending Comment" : modals.commentModalTitle,
@@ -140902,13 +141403,13 @@ function PRDetailScreen({
140902
141403
  error: pendingReview.isActive ? pendingReview.error : modals.commentError
140903
141404
  }
140904
141405
  ),
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: [
141406
+ showDraftConfirm && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime38.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)` }) }),
141407
+ modals.showCloseConfirm && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Text, { color: theme14.colors.warning, bold: true, children: [
140907
141408
  "Close PR #",
140908
141409
  pr.number,
140909
141410
  "? This will not delete the branch. (y/n)"
140910
141411
  ] }) }),
140911
- modals.showMergeModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141412
+ modals.showMergeModal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140912
141413
  MergeModal,
140913
141414
  {
140914
141415
  pr: activePR,
@@ -140918,7 +141419,7 @@ function PRDetailScreen({
140918
141419
  error: modals.mergeError
140919
141420
  }
140920
141421
  ),
140921
- modals.showReReviewModal && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141422
+ modals.showReReviewModal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140922
141423
  ReReviewModal,
140923
141424
  {
140924
141425
  reviewers: buildReviewerList(reviews, activePR.requested_reviewers),
@@ -140928,7 +141429,7 @@ function PRDetailScreen({
140928
141429
  error: modals.reReviewError
140929
141430
  }
140930
141431
  ),
140931
- showLabelPicker && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
141432
+ showLabelPicker && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
140932
141433
  LabelPickerModal,
140933
141434
  {
140934
141435
  repoLabels,
@@ -140956,27 +141457,56 @@ function PRDetailScreen({
140956
141457
  isLoading: labelsLoading,
140957
141458
  error: labelError
140958
141459
  }
141460
+ ),
141461
+ showAssigneePicker && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
141462
+ AssigneePickerModal,
141463
+ {
141464
+ collaborators,
141465
+ currentAssignees: activePR.assignees.map((a) => a.login),
141466
+ onSubmit: (assignees) => {
141467
+ updateAssigneesMutation.mutate(
141468
+ { owner, repo, prNumber: pr.number, assignees: [...assignees] },
141469
+ {
141470
+ onSuccess: () => {
141471
+ setShowAssigneePicker(false);
141472
+ setAssigneeError(null);
141473
+ setStatusMessage("Assignees updated");
141474
+ },
141475
+ onError: (err) => {
141476
+ setAssigneeError(String(err));
141477
+ }
141478
+ }
141479
+ );
141480
+ },
141481
+ onClose: () => {
141482
+ setShowAssigneePicker(false);
141483
+ setAssigneeError(null);
141484
+ },
141485
+ isSubmitting: updateAssigneesMutation.isPending,
141486
+ isLoading: collaboratorsLoading,
141487
+ error: assigneeError
141488
+ }
140959
141489
  )
140960
141490
  ] });
140961
141491
  }
140962
141492
 
140963
141493
  // src/screens/MyPRsScreen.tsx
140964
- var import_react106 = __toESM(require_react(), 1);
141494
+ var import_react107 = __toESM(require_react(), 1);
140965
141495
 
140966
141496
  // src/screens/PRListScreen.tsx
140967
- var import_react105 = __toESM(require_react(), 1);
141497
+ var import_react106 = __toESM(require_react(), 1);
140968
141498
 
140969
141499
  // src/hooks/usePagination.ts
140970
- var import_react98 = __toESM(require_react(), 1);
141500
+ var import_react99 = __toESM(require_react(), 1);
140971
141501
  function usePagination(items, options = {}) {
140972
141502
  const pageSize = options.pageSize ?? 18;
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)(
141503
+ const [currentPage, setCurrentPage] = (0, import_react99.useState)(1);
141504
+ const prevItemsLengthRef = (0, import_react99.useRef)(items.length);
141505
+ const totalPages = (0, import_react99.useMemo)(
140976
141506
  () => Math.max(1, Math.ceil(items.length / pageSize)),
140977
141507
  [items.length, pageSize]
140978
141508
  );
140979
- (0, import_react98.useEffect)(() => {
141509
+ (0, import_react99.useEffect)(() => {
140980
141510
  if (items.length !== prevItemsLengthRef.current) {
140981
141511
  setCurrentPage(1);
140982
141512
  prevItemsLengthRef.current = items.length;
@@ -140985,23 +141515,23 @@ function usePagination(items, options = {}) {
140985
141515
  const safePage = Math.min(currentPage, totalPages);
140986
141516
  const startIndex = (safePage - 1) * pageSize;
140987
141517
  const endIndex = Math.min(startIndex + pageSize, items.length);
140988
- const pageItems = (0, import_react98.useMemo)(
141518
+ const pageItems = (0, import_react99.useMemo)(
140989
141519
  () => items.slice(startIndex, endIndex),
140990
141520
  [items, startIndex, endIndex]
140991
141521
  );
140992
141522
  const hasNextPage = safePage < totalPages;
140993
141523
  const hasPrevPage = safePage > 1;
140994
- const nextPage = (0, import_react98.useCallback)(() => {
141524
+ const nextPage = (0, import_react99.useCallback)(() => {
140995
141525
  if (hasNextPage) {
140996
141526
  setCurrentPage((p) => p + 1);
140997
141527
  }
140998
141528
  }, [hasNextPage]);
140999
- const prevPage = (0, import_react98.useCallback)(() => {
141529
+ const prevPage = (0, import_react99.useCallback)(() => {
141000
141530
  if (hasPrevPage) {
141001
141531
  setCurrentPage((p) => p - 1);
141002
141532
  }
141003
141533
  }, [hasPrevPage]);
141004
- const goToPage = (0, import_react98.useCallback)(
141534
+ const goToPage = (0, import_react99.useCallback)(
141005
141535
  (page) => {
141006
141536
  const clampedPage = Math.max(1, Math.min(page, totalPages));
141007
141537
  setCurrentPage(clampedPage);
@@ -141023,7 +141553,7 @@ function usePagination(items, options = {}) {
141023
141553
  }
141024
141554
 
141025
141555
  // src/hooks/useFilter.ts
141026
- var import_react99 = __toESM(require_react(), 1);
141556
+ var import_react100 = __toESM(require_react(), 1);
141027
141557
  var defaultFilter = {
141028
141558
  search: "",
141029
141559
  repo: null,
@@ -141076,8 +141606,8 @@ function comparePRs(a, b, sortBy, sortDirection) {
141076
141606
  return sortDirection === "asc" ? -comparison : comparison;
141077
141607
  }
141078
141608
  function useFilter(items) {
141079
- const [filter9, setFilter] = (0, import_react99.useState)(defaultFilter);
141080
- const availableRepos = (0, import_react99.useMemo)(() => {
141609
+ const [filter9, setFilter] = (0, import_react100.useState)(defaultFilter);
141610
+ const availableRepos = (0, import_react100.useMemo)(() => {
141081
141611
  const repos = /* @__PURE__ */ new Set();
141082
141612
  items.forEach((pr) => {
141083
141613
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -141085,17 +141615,17 @@ function useFilter(items) {
141085
141615
  });
141086
141616
  return Array.from(repos).sort();
141087
141617
  }, [items]);
141088
- const availableAuthors = (0, import_react99.useMemo)(() => {
141618
+ const availableAuthors = (0, import_react100.useMemo)(() => {
141089
141619
  const authors = /* @__PURE__ */ new Set();
141090
141620
  items.forEach((pr) => authors.add(pr.user.login));
141091
141621
  return Array.from(authors).sort();
141092
141622
  }, [items]);
141093
- const availableLabels = (0, import_react99.useMemo)(() => {
141623
+ const availableLabels = (0, import_react100.useMemo)(() => {
141094
141624
  const labels = /* @__PURE__ */ new Set();
141095
141625
  items.forEach((pr) => pr.labels.forEach((l) => labels.add(l.name)));
141096
141626
  return Array.from(labels).sort();
141097
141627
  }, [items]);
141098
- const repoFacets = (0, import_react99.useMemo)(() => {
141628
+ const repoFacets = (0, import_react100.useMemo)(() => {
141099
141629
  const counts = /* @__PURE__ */ new Map();
141100
141630
  items.forEach((pr) => {
141101
141631
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -141103,14 +141633,14 @@ function useFilter(items) {
141103
141633
  });
141104
141634
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
141105
141635
  }, [items]);
141106
- const authorFacets = (0, import_react99.useMemo)(() => {
141636
+ const authorFacets = (0, import_react100.useMemo)(() => {
141107
141637
  const counts = /* @__PURE__ */ new Map();
141108
141638
  items.forEach((pr) => {
141109
141639
  counts.set(pr.user.login, (counts.get(pr.user.login) ?? 0) + 1);
141110
141640
  });
141111
141641
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
141112
141642
  }, [items]);
141113
- const labelFacets = (0, import_react99.useMemo)(() => {
141643
+ const labelFacets = (0, import_react100.useMemo)(() => {
141114
141644
  const counts = /* @__PURE__ */ new Map();
141115
141645
  items.forEach(
141116
141646
  (pr) => pr.labels.forEach((l) => {
@@ -141119,31 +141649,31 @@ function useFilter(items) {
141119
141649
  );
141120
141650
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
141121
141651
  }, [items]);
141122
- const filteredItems = (0, import_react99.useMemo)(() => {
141652
+ const filteredItems = (0, import_react100.useMemo)(() => {
141123
141653
  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));
141124
141654
  }, [items, filter9]);
141125
- const setSearch = (0, import_react99.useCallback)((search) => {
141655
+ const setSearch = (0, import_react100.useCallback)((search) => {
141126
141656
  setFilter((prev) => ({ ...prev, search }));
141127
141657
  }, []);
141128
- const setRepo = (0, import_react99.useCallback)((repo) => {
141658
+ const setRepo = (0, import_react100.useCallback)((repo) => {
141129
141659
  setFilter((prev) => ({ ...prev, repo }));
141130
141660
  }, []);
141131
- const setAuthor = (0, import_react99.useCallback)((author) => {
141661
+ const setAuthor = (0, import_react100.useCallback)((author) => {
141132
141662
  setFilter((prev) => ({ ...prev, author }));
141133
141663
  }, []);
141134
- const setLabel = (0, import_react99.useCallback)((label) => {
141664
+ const setLabel = (0, import_react100.useCallback)((label) => {
141135
141665
  setFilter((prev) => ({ ...prev, label }));
141136
141666
  }, []);
141137
- const setSortBy = (0, import_react99.useCallback)((sortBy) => {
141667
+ const setSortBy = (0, import_react100.useCallback)((sortBy) => {
141138
141668
  setFilter((prev) => ({ ...prev, sortBy }));
141139
141669
  }, []);
141140
- const toggleSortDirection = (0, import_react99.useCallback)(() => {
141670
+ const toggleSortDirection = (0, import_react100.useCallback)(() => {
141141
141671
  setFilter((prev) => ({
141142
141672
  ...prev,
141143
141673
  sortDirection: prev.sortDirection === "asc" ? "desc" : "asc"
141144
141674
  }));
141145
141675
  }, []);
141146
- const clearFilters = (0, import_react99.useCallback)(() => {
141676
+ const clearFilters = (0, import_react100.useCallback)(() => {
141147
141677
  setFilter(defaultFilter);
141148
141678
  }, []);
141149
141679
  const hasActiveFilters = filter9.search !== "" || filter9.repo !== null || filter9.author !== null || filter9.label !== null;
@@ -141168,7 +141698,7 @@ function useFilter(items) {
141168
141698
  }
141169
141699
 
141170
141700
  // src/components/pr/CheckStatusIcon.tsx
141171
- var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
141701
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
141172
141702
  function CheckStatusIcon({
141173
141703
  owner,
141174
141704
  repo,
@@ -141178,23 +141708,23 @@ function CheckStatusIcon({
141178
141708
  const theme14 = useTheme();
141179
141709
  const { data } = useCheckRuns(owner, repo, sha, { enabled: enabled2 });
141180
141710
  if (!data || data.total_count === 0) {
141181
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141711
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141182
141712
  }
141183
141713
  const summary5 = summarizeChecks(data.check_runs);
141184
141714
  if (summary5.conclusion === "success") {
141185
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.success, children: "\u2713" });
141715
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.success, children: "\u2713" });
141186
141716
  }
141187
141717
  if (summary5.conclusion === "failure") {
141188
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.error, children: "\u2717" });
141718
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.error, children: "\u2717" });
141189
141719
  }
141190
141720
  if (summary5.conclusion === "pending") {
141191
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.warning, children: "\u25CF" });
141721
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.warning, children: "\u25CF" });
141192
141722
  }
141193
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141723
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141194
141724
  }
141195
141725
 
141196
141726
  // src/components/pr/ReviewStatusIcon.tsx
141197
- var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
141727
+ var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
141198
141728
  function getReviewDecision(reviews) {
141199
141729
  if (reviews.length === 0) return "none";
141200
141730
  const latestByUser = /* @__PURE__ */ new Map();
@@ -141218,23 +141748,23 @@ function ReviewStatusIcon({
141218
141748
  const theme14 = useTheme();
141219
141749
  const { data: reviews } = usePRReviews(owner, repo, prNumber, { enabled: enabled2 });
141220
141750
  if (!reviews || reviews.length === 0) {
141221
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141751
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: enabled2 ? "" : "\xB7" });
141222
141752
  }
141223
141753
  const decision = getReviewDecision(reviews);
141224
141754
  if (decision === "approved") {
141225
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.success, children: "A" });
141755
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.success, children: "A" });
141226
141756
  }
141227
141757
  if (decision === "changes_requested") {
141228
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.error, children: "!" });
141758
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.error, children: "!" });
141229
141759
  }
141230
141760
  if (decision === "pending") {
141231
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.warning, children: "R" });
141761
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.warning, children: "R" });
141232
141762
  }
141233
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141763
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { color: theme14.colors.muted, children: "\xB7" });
141234
141764
  }
141235
141765
 
141236
141766
  // src/components/pr/PRListItem.tsx
141237
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
141767
+ var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
141238
141768
  function PRListItem({
141239
141769
  item,
141240
141770
  isFocus
@@ -141247,13 +141777,13 @@ function PRListItem({
141247
141777
  const repoName = extractRepoFromPRUrl(item.html_url);
141248
141778
  const ownerRepo = parseGitHubPRUrl(item.html_url);
141249
141779
  const headSha = item.head.sha;
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)(
141780
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
141781
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { gap: 1, children: [
141782
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: stateColor, bold: true, children: stateIcon }),
141783
+ ownerRepo && headSha && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CheckStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, sha: headSha, enabled: isFocus }),
141784
+ ownerRepo && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ReviewStatusIcon, { owner: ownerRepo.owner, repo: ownerRepo.repo, prNumber: item.number, enabled: isFocus }),
141785
+ unread && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "*" }),
141786
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
141257
141787
  Text,
141258
141788
  {
141259
141789
  color: isFocus ? theme14.colors.listSelectedFg : unread ? theme14.colors.accent : theme14.colors.text,
@@ -141265,7 +141795,7 @@ function PRListItem({
141265
141795
  ]
141266
141796
  }
141267
141797
  ),
141268
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
141798
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141269
141799
  Text,
141270
141800
  {
141271
141801
  color: isFocus ? theme14.colors.listSelectedFg : unread ? theme14.colors.accent : theme14.colors.text,
@@ -141274,11 +141804,11 @@ function PRListItem({
141274
141804
  children: item.title
141275
141805
  }
141276
141806
  ),
141277
- item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Box_default, { gap: 0, children: item.labels.map(
141807
+ item.labels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { gap: 0, children: item.labels.map(
141278
141808
  (label) => {
141279
141809
  const bgColor = label.color ? normalizeHexColor(label.color) : void 0;
141280
141810
  const fgColor = label.color ? contrastForeground(label.color) : theme14.colors.muted;
141281
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
141811
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
141282
141812
  Text,
141283
141813
  {
141284
141814
  color: fgColor,
@@ -141291,28 +141821,28 @@ function PRListItem({
141291
141821
  }
141292
141822
  ) })
141293
141823
  ] }),
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: "|" })
141824
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { gap: 1, paddingLeft: 3, children: [
141825
+ repoName && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
141826
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.secondary, children: repoName }),
141827
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "|" })
141298
141828
  ] }),
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: [
141829
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: item.user.login }),
141830
+ item.assignees && item.assignees.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
141831
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141832
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.warning, children: [
141303
141833
  "@",
141304
141834
  item.assignees.map((a) => a.login).join(" @")
141305
141835
  ] })
141306
141836
  ] }),
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(", ") })
141837
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141838
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: timeAgo(item.created_at) }),
141839
+ item.requested_reviewers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
141840
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141841
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.info, children: item.requested_reviewers.map((r) => r.login).join(", ") })
141312
141842
  ] }),
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: [
141843
+ item.comments > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
141844
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.muted, children: "|" }),
141845
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.muted, children: [
141316
141846
  item.comments,
141317
141847
  " comments"
141318
141848
  ] })
@@ -141322,7 +141852,7 @@ function PRListItem({
141322
141852
  }
141323
141853
 
141324
141854
  // src/components/common/ErrorWithRetry.tsx
141325
- var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
141855
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
141326
141856
  function getProviderErrorHint(message) {
141327
141857
  const lower = message.toLowerCase();
141328
141858
  if (lower.includes("github") || lower.includes("api.github.com")) {
@@ -141424,25 +141954,25 @@ function ErrorWithRetry({
141424
141954
  },
141425
141955
  { isActive: isActive2 }
141426
141956
  );
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: [
141957
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", padding: 1, gap: 1, children: [
141958
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme14.colors.error, children: [
141429
141959
  "Error: ",
141430
141960
  message
141431
141961
  ] }),
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 })
141962
+ hint && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Box_default, { flexDirection: "column", children: [
141963
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.warning, children: hint.suggestion }),
141964
+ hint.detail && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.muted, children: hint.detail })
141435
141965
  ] }),
141436
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme14.colors.muted, children: [
141966
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { color: theme14.colors.muted, children: [
141437
141967
  "Press ",
141438
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "r" }),
141968
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "r" }),
141439
141969
  " to retry"
141440
141970
  ] })
141441
141971
  ] });
141442
141972
  }
141443
141973
 
141444
141974
  // src/components/common/PaginationBar.tsx
141445
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
141975
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
141446
141976
  function PaginationBar({
141447
141977
  currentPage,
141448
141978
  totalPages,
@@ -141454,38 +141984,38 @@ function PaginationBar({
141454
141984
  }) {
141455
141985
  const theme14 = useTheme();
141456
141986
  if (totalPages <= 1) {
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: [
141987
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.muted, children: [
141458
141988
  totalItems,
141459
141989
  " item",
141460
141990
  totalItems !== 1 ? "s" : ""
141461
141991
  ] }) });
141462
141992
  }
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: [
141993
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
141994
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.muted, children: [
141465
141995
  startIndex + 1,
141466
141996
  "-",
141467
141997
  endIndex,
141468
141998
  " of ",
141469
141999
  totalItems
141470
142000
  ] }),
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: [
142001
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 1, children: [
142002
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: hasPrevPage ? theme14.colors.accent : theme14.colors.muted, children: hasPrevPage ? "\u2190 [p]rev" : "\u2190 prev" }),
142003
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
142004
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.text, children: [
141475
142005
  "Page ",
141476
142006
  currentPage,
141477
142007
  "/",
141478
142008
  totalPages
141479
142009
  ] }),
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" })
142010
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: theme14.colors.muted, children: "\u2502" }),
142011
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: hasNextPage ? theme14.colors.accent : theme14.colors.muted, children: hasNextPage ? "[n]ext \u2192" : "next \u2192" })
141482
142012
  ] })
141483
142013
  ] });
141484
142014
  }
141485
142015
 
141486
142016
  // src/components/common/FilterModal.tsx
141487
- var import_react100 = __toESM(require_react(), 1);
141488
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
142017
+ var import_react101 = __toESM(require_react(), 1);
142018
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
141489
142019
  var FILTER_FIELDS = ["search", "repo", "author", "label"];
141490
142020
  function FacetSection({
141491
142021
  title,
@@ -141499,24 +142029,24 @@ function FacetSection({
141499
142029
  selectionColor,
141500
142030
  warningColor
141501
142031
  }) {
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: [
142032
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
142033
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { gap: 1, children: [
142034
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: isFocused ? accentColor : mutedColor, bold: isFocused, children: [
141505
142035
  isFocused ? "> " : " ",
141506
142036
  title
141507
142037
  ] }),
141508
- selectedValue && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: warningColor, children: [
142038
+ selectedValue && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: warningColor, children: [
141509
142039
  "[",
141510
142040
  selectedValue,
141511
142041
  "]"
141512
142042
  ] })
141513
142043
  ] }),
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) => {
142044
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
142045
+ options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: mutedColor, children: " (none)" }) : options.slice(0, 8).map((opt, idx) => {
141516
142046
  const isHighlighted = isFocused && idx === highlightIndex;
141517
142047
  const isSelected = selectedValue === opt.value;
141518
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Box_default, { gap: 1, children: [
141519
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
142048
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { gap: 1, children: [
142049
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
141520
142050
  Text,
141521
142051
  {
141522
142052
  color: isSelected ? warningColor : isHighlighted ? accentColor : textColor,
@@ -141531,14 +142061,14 @@ function FacetSection({
141531
142061
  ]
141532
142062
  }
141533
142063
  ),
141534
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: mutedColor, children: [
142064
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: mutedColor, children: [
141535
142065
  "(",
141536
142066
  opt.count,
141537
142067
  ")"
141538
142068
  ] })
141539
142069
  ] }, opt.value);
141540
142070
  }),
141541
- options.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: mutedColor, children: [
142071
+ options.length > 8 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: mutedColor, children: [
141542
142072
  " +",
141543
142073
  options.length - 8,
141544
142074
  " more"
@@ -141560,17 +142090,17 @@ function FilterModal({
141560
142090
  }) {
141561
142091
  const theme14 = useTheme();
141562
142092
  const { setInputActive } = useInputFocus();
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);
142093
+ const [activeField, setActiveField] = (0, import_react101.useState)("search");
142094
+ const [searchValue, setSearchValue] = (0, import_react101.useState)(filter9.search);
142095
+ const [repoIndex, setRepoIndex] = (0, import_react101.useState)(0);
142096
+ const [authorIndex, setAuthorIndex] = (0, import_react101.useState)(0);
142097
+ const [labelIndex, setLabelIndex] = (0, import_react101.useState)(0);
141568
142098
  const isSearchField = activeField === "search";
141569
- (0, import_react100.useEffect)(() => {
142099
+ (0, import_react101.useEffect)(() => {
141570
142100
  setInputActive(isSearchField);
141571
142101
  return () => setInputActive(false);
141572
142102
  }, [setInputActive, isSearchField]);
141573
- (0, import_react100.useEffect)(() => {
142103
+ (0, import_react101.useEffect)(() => {
141574
142104
  onSearchChange(searchValue);
141575
142105
  }, [searchValue, onSearchChange]);
141576
142106
  const getMaxIndex = (field) => {
@@ -141631,7 +142161,7 @@ function FilterModal({
141631
142161
  }
141632
142162
  });
141633
142163
  const hasAnyFilter = filter9.search !== "" || filter9.repo !== null || filter9.author !== null || filter9.label !== null;
141634
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
142164
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
141635
142165
  Box_default,
141636
142166
  {
141637
142167
  flexDirection: "column",
@@ -141642,29 +142172,29 @@ function FilterModal({
141642
142172
  paddingY: 1,
141643
142173
  gap: 1,
141644
142174
  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: [
142175
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Filter PRs" }),
142176
+ hasAnyFilter && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { gap: 1, flexWrap: "wrap", children: [
142177
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.muted, children: "Active:" }),
142178
+ filter9.search && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme14.colors.warning, children: [
141649
142179
  'search:"',
141650
142180
  filter9.search,
141651
142181
  '"'
141652
142182
  ] }),
141653
- filter9.repo && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
142183
+ filter9.repo && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme14.colors.warning, children: [
141654
142184
  "repo:",
141655
142185
  filter9.repo
141656
142186
  ] }),
141657
- filter9.author && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
142187
+ filter9.author && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme14.colors.warning, children: [
141658
142188
  "author:",
141659
142189
  filter9.author
141660
142190
  ] }),
141661
- filter9.label && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { color: theme14.colors.warning, children: [
142191
+ filter9.label && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme14.colors.warning, children: [
141662
142192
  "label:",
141663
142193
  filter9.label
141664
142194
  ] })
141665
142195
  ] }),
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)(
142196
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Box_default, { flexDirection: "column", children: [
142197
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { gap: 1, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
141668
142198
  Text,
141669
142199
  {
141670
142200
  color: isSearchField ? theme14.colors.accent : theme14.colors.muted,
@@ -141675,16 +142205,16 @@ function FilterModal({
141675
142205
  ]
141676
142206
  }
141677
142207
  ) }),
141678
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box_default, { paddingLeft: 1, children: isSearchField ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142208
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Box_default, { paddingLeft: 1, children: isSearchField ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
141679
142209
  TextInput,
141680
142210
  {
141681
142211
  defaultValue: searchValue,
141682
142212
  onChange: setSearchValue,
141683
142213
  placeholder: "Type to search..."
141684
142214
  }
141685
- ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { color: searchValue ? theme14.colors.text : theme14.colors.muted, children: searchValue || "(none)" }) })
142215
+ ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: searchValue ? theme14.colors.text : theme14.colors.muted, children: searchValue || "(none)" }) })
141686
142216
  ] }),
141687
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142217
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
141688
142218
  FacetSection,
141689
142219
  {
141690
142220
  title: "Repository",
@@ -141699,7 +142229,7 @@ function FilterModal({
141699
142229
  warningColor: theme14.colors.warning
141700
142230
  }
141701
142231
  ),
141702
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142232
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
141703
142233
  FacetSection,
141704
142234
  {
141705
142235
  title: "Author",
@@ -141714,7 +142244,7 @@ function FilterModal({
141714
142244
  warningColor: theme14.colors.warning
141715
142245
  }
141716
142246
  ),
141717
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
142247
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
141718
142248
  FacetSection,
141719
142249
  {
141720
142250
  title: "Label",
@@ -141729,31 +142259,31 @@ function FilterModal({
141729
142259
  warningColor: theme14.colors.warning
141730
142260
  }
141731
142261
  ),
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" })
142262
+ /* @__PURE__ */ (0, import_jsx_runtime44.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" })
141733
142263
  ]
141734
142264
  }
141735
142265
  ) });
141736
142266
  }
141737
142267
 
141738
142268
  // src/components/common/SortModal.tsx
141739
- var import_react103 = __toESM(require_react(), 1);
142269
+ var import_react104 = __toESM(require_react(), 1);
141740
142270
 
141741
142271
  // 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
141742
- var import_react101 = __toESM(require_react(), 1);
142272
+ var import_react102 = __toESM(require_react(), 1);
141743
142273
  function Indicator({ isSelected = false }) {
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, " "));
142274
+ return import_react102.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react102.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react102.default.createElement(Text, null, " "));
141745
142275
  }
141746
142276
  var Indicator_default = Indicator;
141747
142277
 
141748
142278
  // 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
141749
- var React58 = __toESM(require_react(), 1);
142279
+ var React59 = __toESM(require_react(), 1);
141750
142280
  function Item({ isSelected = false, label }) {
141751
- return React58.createElement(Text, { color: isSelected ? "blue" : void 0 }, label);
142281
+ return React59.createElement(Text, { color: isSelected ? "blue" : void 0 }, label);
141752
142282
  }
141753
142283
  var Item_default = Item;
141754
142284
 
141755
142285
  // 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
141756
- var import_react102 = __toESM(require_react(), 1);
142286
+ var import_react103 = __toESM(require_react(), 1);
141757
142287
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
141758
142288
 
141759
142289
  // node_modules/.pnpm/to-rotated@1.0.0/node_modules/to-rotated/index.js
@@ -141783,17 +142313,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141783
142313
  const hasLimit = typeof customLimit === "number" && items.length > customLimit;
141784
142314
  const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
141785
142315
  const lastIndex = limit - 1;
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)(() => {
142316
+ const [rotateIndex, setRotateIndex] = (0, import_react103.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
142317
+ const [selectedIndex, setSelectedIndex] = (0, import_react103.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
142318
+ const previousItems = (0, import_react103.useRef)(items);
142319
+ (0, import_react103.useEffect)(() => {
141790
142320
  if (!isDeepStrictEqual3(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
141791
142321
  setRotateIndex(0);
141792
142322
  setSelectedIndex(0);
141793
142323
  }
141794
142324
  previousItems.current = items;
141795
142325
  }, [items]);
141796
- use_input_default((0, import_react102.useCallback)((input, key) => {
142326
+ use_input_default((0, import_react103.useCallback)((input, key) => {
141797
142327
  if (input === "k" || key.upArrow) {
141798
142328
  const lastIndex2 = (hasLimit ? limit : items.length) - 1;
141799
142329
  const atFirstIndex = selectedIndex === 0;
@@ -141845,15 +142375,15 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141845
142375
  onHighlight
141846
142376
  ]), { isActive: isFocused });
141847
142377
  const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit) : items;
141848
- return import_react102.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
142378
+ return import_react103.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
141849
142379
  const isSelected = index === selectedIndex;
141850
142380
  return (
141851
142381
  // @ts-expect-error - `key` can't be optional but `item.value` is generic T
141852
- import_react102.default.createElement(
142382
+ import_react103.default.createElement(
141853
142383
  Box_default,
141854
142384
  { key: item.key ?? item.value },
141855
- import_react102.default.createElement(indicatorComponent, { isSelected }),
141856
- import_react102.default.createElement(itemComponent, { ...item, isSelected })
142385
+ import_react103.default.createElement(indicatorComponent, { isSelected }),
142386
+ import_react103.default.createElement(itemComponent, { ...item, isSelected })
141857
142387
  )
141858
142388
  );
141859
142389
  }));
@@ -141861,7 +142391,7 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
141861
142391
  var SelectInput_default = SelectInput;
141862
142392
 
141863
142393
  // src/components/common/SortModal.tsx
141864
- var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
142394
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
141865
142395
  var SORT_OPTIONS = [
141866
142396
  { key: "updated", label: "Last Updated" },
141867
142397
  { key: "created", label: "Created Date" },
@@ -141882,7 +142412,7 @@ function SortModal({
141882
142412
  onClose();
141883
142413
  }
141884
142414
  });
141885
- const items = (0, import_react103.useMemo)(
142415
+ const items = (0, import_react104.useMemo)(
141886
142416
  () => SORT_OPTIONS.map((option7) => ({
141887
142417
  label: `${option7.label}${option7.key === currentSort ? sortDirection === "desc" ? " \u2193" : " \u2191" : ""}`,
141888
142418
  value: option7.key
@@ -141901,7 +142431,7 @@ function SortModal({
141901
142431
  }
141902
142432
  onClose();
141903
142433
  };
141904
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
142434
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
141905
142435
  Box_default,
141906
142436
  {
141907
142437
  flexDirection: "column",
@@ -141912,8 +142442,8 @@ function SortModal({
141912
142442
  paddingY: 1,
141913
142443
  gap: 1,
141914
142444
  children: [
141915
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Sort by" }),
141916
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
142445
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Sort by" }),
142446
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
141917
142447
  SelectInput_default,
141918
142448
  {
141919
142449
  items,
@@ -141922,14 +142452,14 @@ function SortModal({
141922
142452
  isFocused: true
141923
142453
  }
141924
142454
  ),
141925
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: move | Enter: select | Esc: close" })
142455
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: move | Enter: select | Esc: close" })
141926
142456
  ]
141927
142457
  }
141928
142458
  ) });
141929
142459
  }
141930
142460
 
141931
142461
  // src/hooks/useNotifications.ts
141932
- var import_react104 = __toESM(require_react(), 1);
142462
+ var import_react105 = __toESM(require_react(), 1);
141933
142463
 
141934
142464
  // src/utils/notifications.ts
141935
142465
  import { execFile as execFile4 } from "child_process";
@@ -141995,8 +142525,8 @@ function buildSnapshotMap(prs) {
141995
142525
  );
141996
142526
  }
141997
142527
  function useNotifications(prs, config3, currentUserLogin) {
141998
- const previousPRsRef = (0, import_react104.useRef)(/* @__PURE__ */ new Map());
141999
- (0, import_react104.useEffect)(() => {
142528
+ const previousPRsRef = (0, import_react105.useRef)(/* @__PURE__ */ new Map());
142529
+ (0, import_react105.useEffect)(() => {
142000
142530
  if (!config3.enabled || !prs) return;
142001
142531
  const prevMap = previousPRsRef.current;
142002
142532
  if (config3.notifyOnNewPR) {
@@ -142034,7 +142564,7 @@ function useNotifications(prs, config3, currentUserLogin) {
142034
142564
  }
142035
142565
 
142036
142566
  // src/screens/PRListScreen.tsx
142037
- var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
142567
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
142038
142568
  var STATE_LABELS = {
142039
142569
  open: "Open",
142040
142570
  closed: "Closed",
@@ -142069,9 +142599,9 @@ function PRListScreen({
142069
142599
  },
142070
142600
  currentUser?.login
142071
142601
  );
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);
142602
+ const [showFilter, setShowFilter] = (0, import_react106.useState)(false);
142603
+ const [showSort, setShowSort] = (0, import_react106.useState)(false);
142604
+ const [showUnreadOnly, setShowUnreadOnly] = (0, import_react106.useState)(false);
142075
142605
  const { refresh } = useManualRefresh({
142076
142606
  isActive: !showFilter && !showSort,
142077
142607
  queryKeys
@@ -142094,7 +142624,7 @@ function PRListScreen({
142094
142624
  authorFacets,
142095
142625
  labelFacets
142096
142626
  } = useFilter(prs);
142097
- const displayItems = (0, import_react105.useMemo)(
142627
+ const displayItems = (0, import_react106.useMemo)(
142098
142628
  () => showUnreadOnly ? filteredItems.filter((pr) => isUnread(pr.html_url, pr.updated_at)) : filteredItems,
142099
142629
  [filteredItems, showUnreadOnly, isUnread]
142100
142630
  );
@@ -142150,31 +142680,31 @@ function PRListScreen({
142150
142680
  { isActive: !showFilter && !showSort }
142151
142681
  );
142152
142682
  if (isLoading && prs.length === 0) {
142153
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingIndicator, { message: loadingMessage });
142683
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LoadingIndicator, { message: loadingMessage });
142154
142684
  }
142155
142685
  if (error48) {
142156
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ErrorWithRetry, { message: String(error48), onRetry: refresh });
142686
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorWithRetry, { message: String(error48), onRetry: refresh });
142157
142687
  }
142158
142688
  if (prs.length === 0) {
142159
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(EmptyState, { message: emptyMessage });
142689
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(EmptyState, { message: emptyMessage });
142160
142690
  }
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: [
142691
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
142692
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { paddingX: 1, justifyContent: "space-between", children: [
142693
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Box_default, { gap: 2, children: [
142694
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: theme14.colors.accent, bold: true, children: title }),
142695
+ onStateChange && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text, { color: stateFilter === "open" ? theme14.colors.success : stateFilter === "closed" ? theme14.colors.error : theme14.colors.info, children: [
142166
142696
  "[",
142167
142697
  STATE_LABELS[stateFilter],
142168
142698
  "]"
142169
142699
  ] }),
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: [
142700
+ showUnreadOnly && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: theme14.colors.accent, children: "[Unread]" }),
142701
+ hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: theme14.colors.warning, children: "(filtered)" }),
142702
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text, { color: theme14.colors.muted, children: [
142173
142703
  "/ filter s sort",
142174
142704
  onStateChange ? " t state" : ""
142175
142705
  ] })
142176
142706
  ] }),
142177
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
142707
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142178
142708
  PaginationBar,
142179
142709
  {
142180
142710
  currentPage,
@@ -142187,7 +142717,7 @@ function PRListScreen({
142187
142717
  }
142188
142718
  )
142189
142719
  ] }),
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)(
142720
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box_default, { flexDirection: "column", children: pageItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { color: theme14.colors.muted, children: "No PRs match the current filters" }) }) : pageItems.map((pr, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142191
142721
  PRListItem,
142192
142722
  {
142193
142723
  item: pr,
@@ -142195,7 +142725,7 @@ function PRListScreen({
142195
142725
  },
142196
142726
  pr.id
142197
142727
  )) }),
142198
- showFilter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
142728
+ showFilter && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142199
142729
  FilterModal,
142200
142730
  {
142201
142731
  filter: filter9,
@@ -142215,7 +142745,7 @@ function PRListScreen({
142215
142745
  onClose: () => setShowFilter(false)
142216
142746
  }
142217
142747
  ),
142218
- showSort && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
142748
+ showSort && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142219
142749
  SortModal,
142220
142750
  {
142221
142751
  currentSort: filter9.sortBy,
@@ -142229,11 +142759,11 @@ function PRListScreen({
142229
142759
  }
142230
142760
 
142231
142761
  // src/screens/MyPRsScreen.tsx
142232
- var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
142762
+ var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
142233
142763
  function MyPRsScreen({ onSelect }) {
142234
- const [stateFilter, setStateFilter] = (0, import_react106.useState)("open");
142764
+ const [stateFilter, setStateFilter] = (0, import_react107.useState)("open");
142235
142765
  const { data: prs = [], isLoading, error: error48 } = useMyPRs(stateFilter);
142236
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
142766
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142237
142767
  PRListScreen,
142238
142768
  {
142239
142769
  title: "My Pull Requests",
@@ -142251,12 +142781,12 @@ function MyPRsScreen({ onSelect }) {
142251
142781
  }
142252
142782
 
142253
142783
  // src/screens/ReviewRequestsScreen.tsx
142254
- var import_react107 = __toESM(require_react(), 1);
142255
- var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
142784
+ var import_react108 = __toESM(require_react(), 1);
142785
+ var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
142256
142786
  function ReviewRequestsScreen({ onSelect }) {
142257
- const [stateFilter, setStateFilter] = (0, import_react107.useState)("open");
142787
+ const [stateFilter, setStateFilter] = (0, import_react108.useState)("open");
142258
142788
  const { data: prs = [], isLoading, error: error48 } = useReviewRequests(stateFilter);
142259
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
142789
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
142260
142790
  PRListScreen,
142261
142791
  {
142262
142792
  title: "For Review",
@@ -142274,7 +142804,7 @@ function ReviewRequestsScreen({ onSelect }) {
142274
142804
  }
142275
142805
 
142276
142806
  // src/screens/SettingsScreen.tsx
142277
- var import_react109 = __toESM(require_react(), 1);
142807
+ var import_react110 = __toESM(require_react(), 1);
142278
142808
 
142279
142809
  // src/hooks/useAuth.ts
142280
142810
  function useAuth() {
@@ -142379,7 +142909,7 @@ function useAuth() {
142379
142909
  }
142380
142910
 
142381
142911
  // src/hooks/useBookmarkedRepos.ts
142382
- var import_react108 = __toESM(require_react(), 1);
142912
+ var import_react109 = __toESM(require_react(), 1);
142383
142913
  function validateBookmarkInput(input) {
142384
142914
  const trimmed2 = input.trim();
142385
142915
  if (!trimmed2.includes("/")) {
@@ -142403,11 +142933,11 @@ function removeBookmarkFromList(repos, owner, repo) {
142403
142933
  }
142404
142934
  function useBookmarkedRepos() {
142405
142935
  const { config: config3, updateConfig } = useConfig();
142406
- const bookmarkedRepos = (0, import_react108.useMemo)(
142936
+ const bookmarkedRepos = (0, import_react109.useMemo)(
142407
142937
  () => config3?.bookmarkedRepos ?? [],
142408
142938
  [config3?.bookmarkedRepos]
142409
142939
  );
142410
- const addBookmark = (0, import_react108.useCallback)(
142940
+ const addBookmark = (0, import_react109.useCallback)(
142411
142941
  (owner, repo) => {
142412
142942
  const current2 = config3?.bookmarkedRepos ?? [];
142413
142943
  const updated = addBookmarkToList(current2, owner, repo);
@@ -142417,7 +142947,7 @@ function useBookmarkedRepos() {
142417
142947
  },
142418
142948
  [config3?.bookmarkedRepos, updateConfig]
142419
142949
  );
142420
- const removeBookmark = (0, import_react108.useCallback)(
142950
+ const removeBookmark = (0, import_react109.useCallback)(
142421
142951
  (owner, repo) => {
142422
142952
  const current2 = config3?.bookmarkedRepos ?? [];
142423
142953
  const updated = removeBookmarkFromList(current2, owner, repo);
@@ -142429,7 +142959,7 @@ function useBookmarkedRepos() {
142429
142959
  }
142430
142960
 
142431
142961
  // src/components/settings/SettingRow.tsx
142432
- var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
142962
+ var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
142433
142963
  function SettingRow({
142434
142964
  label,
142435
142965
  value: value5,
@@ -142439,8 +142969,8 @@ function SettingRow({
142439
142969
  children
142440
142970
  }) {
142441
142971
  const theme14 = useTheme();
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)(
142972
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
142973
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
142444
142974
  Text,
142445
142975
  {
142446
142976
  color: isSelected ? theme14.colors.accent : theme14.colors.muted,
@@ -142451,7 +142981,7 @@ function SettingRow({
142451
142981
  ]
142452
142982
  }
142453
142983
  ) }),
142454
- children ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
142984
+ children ?? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
142455
142985
  Text,
142456
142986
  {
142457
142987
  color: isEditing ? theme14.colors.accent : theme14.colors.text,
@@ -142459,7 +142989,7 @@ function SettingRow({
142459
142989
  children: value5
142460
142990
  }
142461
142991
  ),
142462
- hint && isSelected && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142992
+ hint && isSelected && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142463
142993
  "(",
142464
142994
  hint,
142465
142995
  ")"
@@ -142475,11 +143005,11 @@ function TokenSourceLabel({ source }) {
142475
143005
  none: { text: "Not configured", color: theme14.colors.error }
142476
143006
  };
142477
143007
  const { text, color } = labels[source];
142478
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { color, children: text });
143008
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color, children: text });
142479
143009
  }
142480
143010
 
142481
143011
  // src/screens/SettingsScreen.tsx
142482
- var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
143012
+ var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
142483
143013
  var THEME_ORDER = ["tokyo-night", "dracula", "catppuccin-mocha", "gruvbox", "high-contrast"];
142484
143014
  var PROVIDER_ORDER = ["github", "gitlab", "bitbucket", "azure", "gitea"];
142485
143015
  var PROVIDER_LABELS = {
@@ -142519,12 +143049,12 @@ function SettingsScreen() {
142519
143049
  const { setStatusMessage } = useStatusMessage();
142520
143050
  const { setInputActive } = useInputFocus();
142521
143051
  const { bookmarkedRepos, addBookmark, removeBookmark } = useBookmarkedRepos();
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);
143052
+ const [selectedItem, setSelectedItem] = (0, import_react110.useState)("token_source");
143053
+ const [editingField, setEditingField] = (0, import_react110.useState)(null);
143054
+ const [editValue, setEditValue] = (0, import_react110.useState)("");
143055
+ const [tokenMessage, setTokenMessage] = (0, import_react110.useState)(null);
143056
+ const [bookmarkSelectedIndex, setBookmarkSelectedIndex] = (0, import_react110.useState)(0);
143057
+ const [bookmarkError, setBookmarkError] = (0, import_react110.useState)(null);
142528
143058
  const isEditing = editingField !== null;
142529
143059
  const isBookmarkSection = selectedItem === "bookmarked_repos";
142530
143060
  const cycleProvider = () => {
@@ -142701,23 +143231,23 @@ function SettingsScreen() {
142701
143231
  { isActive: isBookmarkSection && !isEditing && bookmarkedRepos.length > 0 }
142702
143232
  );
142703
143233
  if (configLoading || authLoading) {
142704
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LoadingIndicator, { message: "Loading settings..." });
143234
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(LoadingIndicator, { message: "Loading settings..." });
142705
143235
  }
142706
143236
  if (configError) {
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: [
143237
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { color: theme14.colors.error, children: [
142708
143238
  "Error: ",
142709
143239
  configError
142710
143240
  ] }) });
142711
143241
  }
142712
143242
  const renderEditableField = (field, placeholder) => {
142713
143243
  if (editingField === field) {
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)(
143244
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.accent, paddingX: 1, width: 40, children: field === "new_token" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142715
143245
  PasswordInput,
142716
143246
  {
142717
143247
  onChange: setEditValue,
142718
143248
  placeholder
142719
143249
  }
142720
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143250
+ ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142721
143251
  TextInput,
142722
143252
  {
142723
143253
  defaultValue: editValue,
@@ -142726,15 +143256,15 @@ function SettingsScreen() {
142726
143256
  }
142727
143257
  ) });
142728
143258
  }
142729
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, {});
143259
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {});
142730
143260
  };
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)(
143261
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
143262
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, paddingY: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Settings" }) }),
143263
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, {}) }),
143264
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Authentication" }) }),
143265
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143266
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
143267
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
142738
143268
  Text,
142739
143269
  {
142740
143270
  color: selectedItem === "token_source" ? theme14.colors.accent : theme14.colors.muted,
@@ -142745,19 +143275,19 @@ function SettingsScreen() {
142745
143275
  ]
142746
143276
  }
142747
143277
  ) }),
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)" })
143278
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TokenSourceLabel, { source: tokenInfo?.source ?? "none" }),
143279
+ availableSources.length > 1 && selectedItem === "token_source" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to switch)" })
142750
143280
  ] }),
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)" })
143281
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
143282
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, children: " Token" }) }),
143283
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.text, children: tokenInfo?.maskedToken ?? "(none)" })
142754
143284
  ] }),
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" })
143285
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
143286
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, children: " Available" }) }),
143287
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, children: availableSources.length > 0 ? availableSources.join(", ") : "none" })
142758
143288
  ] }),
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)(
143289
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 2, paddingX: 2, marginTop: 1, children: [
143290
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
142761
143291
  Text,
142762
143292
  {
142763
143293
  color: selectedItem === "new_token" ? theme14.colors.accent : theme14.colors.muted,
@@ -142768,9 +143298,9 @@ function SettingsScreen() {
142768
143298
  ]
142769
143299
  }
142770
143300
  ) }),
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)" })
143301
+ editingField === "new_token" ? renderEditableField("new_token", getProviderMeta(getAuthProvider()).tokenPlaceholder) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "(Enter to add)" })
142772
143302
  ] }),
142773
- tokenMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 4, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143303
+ tokenMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 4, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142774
143304
  Text,
142775
143305
  {
142776
143306
  color: tokenMessage.startsWith("Error") ? theme14.colors.error : theme14.colors.success,
@@ -142778,10 +143308,10 @@ function SettingsScreen() {
142778
143308
  }
142779
143309
  ) })
142780
143310
  ] }),
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)(
143311
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, { title: "Configuration" }) }),
143312
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Configuration" }) }),
143313
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143314
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142785
143315
  SettingRow,
142786
143316
  {
142787
143317
  label: "Provider",
@@ -142790,7 +143320,7 @@ function SettingsScreen() {
142790
143320
  hint: "Enter to switch"
142791
143321
  }
142792
143322
  ),
142793
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143323
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142794
143324
  SettingRow,
142795
143325
  {
142796
143326
  label: "Theme",
@@ -142799,7 +143329,7 @@ function SettingsScreen() {
142799
143329
  hint: "Enter to cycle"
142800
143330
  }
142801
143331
  ),
142802
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143332
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142803
143333
  SettingRow,
142804
143334
  {
142805
143335
  label: "Page Size",
@@ -142810,7 +143340,7 @@ function SettingsScreen() {
142810
143340
  children: editingField === "page_size" ? renderEditableField("page_size", "1-100") : void 0
142811
143341
  }
142812
143342
  ),
142813
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143343
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142814
143344
  SettingRow,
142815
143345
  {
142816
143346
  label: "Refresh Interval",
@@ -142821,7 +143351,7 @@ function SettingsScreen() {
142821
143351
  children: editingField === "refresh_interval" ? renderEditableField("refresh_interval", "10-600") : void 0
142822
143352
  }
142823
143353
  ),
142824
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143354
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142825
143355
  SettingRow,
142826
143356
  {
142827
143357
  label: "Default Owner",
@@ -142832,7 +143362,7 @@ function SettingsScreen() {
142832
143362
  children: editingField === "default_owner" ? renderEditableField("default_owner", "owner") : void 0
142833
143363
  }
142834
143364
  ),
142835
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143365
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142836
143366
  SettingRow,
142837
143367
  {
142838
143368
  label: "Default Repo",
@@ -142844,10 +143374,10 @@ function SettingsScreen() {
142844
143374
  }
142845
143375
  )
142846
143376
  ] }),
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)(
143377
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, { title: "Notifications" }) }),
143378
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Notifications" }) }),
143379
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143380
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142851
143381
  SettingRow,
142852
143382
  {
142853
143383
  label: "Notifications",
@@ -142856,7 +143386,7 @@ function SettingsScreen() {
142856
143386
  hint: "Enter to toggle"
142857
143387
  }
142858
143388
  ),
142859
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143389
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142860
143390
  SettingRow,
142861
143391
  {
142862
143392
  label: "New PRs",
@@ -142865,7 +143395,7 @@ function SettingsScreen() {
142865
143395
  hint: "Enter to toggle"
142866
143396
  }
142867
143397
  ),
142868
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143398
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142869
143399
  SettingRow,
142870
143400
  {
142871
143401
  label: "PR Updates",
@@ -142874,7 +143404,7 @@ function SettingsScreen() {
142874
143404
  hint: "Enter to toggle"
142875
143405
  }
142876
143406
  ),
142877
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
143407
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
142878
143408
  SettingRow,
142879
143409
  {
142880
143410
  label: "Review Requests",
@@ -142884,9 +143414,9 @@ function SettingsScreen() {
142884
143414
  }
142885
143415
  )
142886
143416
  ] }),
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)(
143417
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Divider, { title: "Bookmarked Repos" }) }),
143418
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 2, children: [
143419
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
142890
143420
  Text,
142891
143421
  {
142892
143422
  color: isBookmarkSection ? theme14.colors.accent : theme14.colors.secondary,
@@ -142897,21 +143427,21 @@ function SettingsScreen() {
142897
143427
  ]
142898
143428
  }
142899
143429
  ),
142900
- isBookmarkSection && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "a:add x:remove J/K:select" })
143430
+ isBookmarkSection && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "a:add x:remove J/K:select" })
142901
143431
  ] }) }),
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:" }),
143432
+ editingField === "bookmark_add" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { paddingX: 2, flexDirection: "column", children: [
143433
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { gap: 1, children: [
143434
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.secondary, children: "owner/repo:" }),
142905
143435
  renderEditableField("bookmark_add", "e.g. facebook/react")
142906
143436
  ] }),
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 }) })
143437
+ bookmarkError && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.error, children: bookmarkError }) })
142908
143438
  ] }),
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: [
143439
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { flexDirection: "column", paddingX: 2, children: bookmarkedRepos.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142910
143440
  "No bookmarked repos. ",
142911
143441
  isBookmarkSection ? "Press a to add." : ""
142912
143442
  ] }) }) : bookmarkedRepos.map((bookmark, index) => {
142913
143443
  const isBmSelected = isBookmarkSection && index === bookmarkSelectedIndex;
142914
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
143444
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
142915
143445
  Text,
142916
143446
  {
142917
143447
  color: isBmSelected ? theme14.colors.accent : theme14.colors.text,
@@ -142926,25 +143456,25 @@ function SettingsScreen() {
142926
143456
  }
142927
143457
  ) }, `${bookmark.owner}/${bookmark.repo}`);
142928
143458
  }) }),
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: [
143459
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Box_default, { paddingX: 1, paddingTop: 2, flexDirection: "column", children: [
143460
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Config: ~/.config/lazyreview/config.yaml" }),
143461
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
142932
143462
  "Token: ",
142933
143463
  getProviderTokenFilePath(getAuthProvider()).replace(process.env["HOME"] ?? "", "~")
142934
143464
  ] }),
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)" })
143465
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Keybindings: add keybindingOverrides to config.yaml (see ? help for defaults)" })
142936
143466
  ] }),
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" }) })
143467
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { paddingX: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "j/k: navigate | Enter: select/toggle | Esc: cancel" }) })
142938
143468
  ] });
142939
143469
  }
142940
143470
 
142941
143471
  // src/screens/InvolvedScreen.tsx
142942
- var import_react110 = __toESM(require_react(), 1);
142943
- var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
143472
+ var import_react111 = __toESM(require_react(), 1);
143473
+ var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
142944
143474
  function InvolvedScreen({ onSelect }) {
142945
- const [stateFilter, setStateFilter] = (0, import_react110.useState)("open");
143475
+ const [stateFilter, setStateFilter] = (0, import_react111.useState)("open");
142946
143476
  const { data: prs = [], isLoading, error: error48 } = useInvolvedPRs(stateFilter);
142947
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
143477
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
142948
143478
  PRListScreen,
142949
143479
  {
142950
143480
  title: "Involved Pull Requests",
@@ -142962,41 +143492,421 @@ function InvolvedScreen({ onSelect }) {
142962
143492
  }
142963
143493
 
142964
143494
  // src/screens/ThisRepoScreen.tsx
142965
- var import_react111 = __toESM(require_react(), 1);
142966
- var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
143495
+ var import_react113 = __toESM(require_react(), 1);
143496
+
143497
+ // src/components/pr/CreatePRModal.tsx
143498
+ var import_react112 = __toESM(require_react(), 1);
143499
+ var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
143500
+ function CreatePRModal({
143501
+ headBranch,
143502
+ defaultBaseBranch,
143503
+ supportsDraft,
143504
+ onSubmit,
143505
+ onClose,
143506
+ isSubmitting,
143507
+ error: error48
143508
+ }) {
143509
+ const theme14 = useTheme();
143510
+ const { setInputActive } = useInputFocus();
143511
+ const [step4, setStep] = (0, import_react112.useState)("title");
143512
+ const [title, setTitle] = (0, import_react112.useState)("");
143513
+ const [body, setBody] = (0, import_react112.useState)("");
143514
+ const [baseBranch, setBaseBranch] = (0, import_react112.useState)(defaultBaseBranch);
143515
+ const [draft, setDraft] = (0, import_react112.useState)(false);
143516
+ const [editingBase, setEditingBase] = (0, import_react112.useState)(false);
143517
+ const [optionIndex, setOptionIndex] = (0, import_react112.useState)(0);
143518
+ (0, import_react112.useEffect)(() => {
143519
+ if (step4 === "title" || step4 === "body" || editingBase) {
143520
+ setInputActive(true);
143521
+ } else {
143522
+ setInputActive(false);
143523
+ }
143524
+ return () => setInputActive(false);
143525
+ }, [step4, editingBase, setInputActive]);
143526
+ const handleSubmit = (0, import_react112.useCallback)(() => {
143527
+ if (isSubmitting) return;
143528
+ if (!title.trim()) return;
143529
+ onSubmit({
143530
+ title: title.trim(),
143531
+ body: body.trim(),
143532
+ baseBranch,
143533
+ headBranch,
143534
+ draft
143535
+ });
143536
+ }, [title, body, baseBranch, headBranch, draft, isSubmitting, onSubmit]);
143537
+ const optionCount = supportsDraft ? 2 : 1;
143538
+ use_input_default(
143539
+ (input, key) => {
143540
+ if (isSubmitting) return;
143541
+ if (step4 === "title") {
143542
+ if (key.escape) {
143543
+ onClose();
143544
+ } else if (key.return) {
143545
+ if (title.trim()) {
143546
+ setStep("body");
143547
+ }
143548
+ }
143549
+ } else if (step4 === "body") {
143550
+ if (key.escape) {
143551
+ setStep("title");
143552
+ } else if (key.ctrl && input === "s") {
143553
+ setStep("options");
143554
+ }
143555
+ } else if (step4 === "options") {
143556
+ if (editingBase) {
143557
+ if (key.escape) {
143558
+ setEditingBase(false);
143559
+ } else if (key.return) {
143560
+ setEditingBase(false);
143561
+ }
143562
+ return;
143563
+ }
143564
+ if (key.escape) {
143565
+ setStep("body");
143566
+ } else if (input === "j" || key.downArrow) {
143567
+ setOptionIndex((prev) => Math.min(prev + 1, optionCount - 1));
143568
+ } else if (input === "k" || key.upArrow) {
143569
+ setOptionIndex((prev) => Math.max(prev - 1, 0));
143570
+ } else if (key.return) {
143571
+ if (optionIndex === 0) {
143572
+ setEditingBase(true);
143573
+ } else if (optionIndex === 1 && supportsDraft) {
143574
+ setDraft((prev) => !prev);
143575
+ }
143576
+ } else if (input === " ") {
143577
+ if (optionIndex === 1 && supportsDraft) {
143578
+ setDraft((prev) => !prev);
143579
+ }
143580
+ } else if (input === "c" || input === "C") {
143581
+ setStep("confirm");
143582
+ }
143583
+ } else if (step4 === "confirm") {
143584
+ if (key.escape) {
143585
+ setStep("options");
143586
+ } else if (input === "y" || input === "Y") {
143587
+ handleSubmit();
143588
+ }
143589
+ }
143590
+ },
143591
+ { isActive: true }
143592
+ );
143593
+ if (step4 === "confirm") {
143594
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
143595
+ Box_default,
143596
+ {
143597
+ flexDirection: "column",
143598
+ borderStyle: "round",
143599
+ borderColor: theme14.colors.warning,
143600
+ paddingX: 2,
143601
+ paddingY: 1,
143602
+ gap: 1,
143603
+ width: 65,
143604
+ children: [
143605
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.warning, bold: true, children: "Confirm PR Creation" }),
143606
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143607
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143608
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Title:" }),
143609
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: title })
143610
+ ] }),
143611
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143612
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Head:" }),
143613
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, children: headBranch })
143614
+ ] }),
143615
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143616
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Base:" }),
143617
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: baseBranch })
143618
+ ] }),
143619
+ supportsDraft && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143620
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Draft:" }),
143621
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: draft ? theme14.colors.warning : theme14.colors.success, children: draft ? "Yes" : "No" })
143622
+ ] }),
143623
+ body.trim() && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143624
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Body:" }),
143625
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: body.length > 50 ? `${body.slice(0, 50)}...` : body })
143626
+ ] })
143627
+ ] }),
143628
+ isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.info, children: "Creating PR..." }),
143629
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.error, children: error48 }),
143630
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "y: create PR | Esc: back" })
143631
+ ]
143632
+ }
143633
+ ) });
143634
+ }
143635
+ if (step4 === "options") {
143636
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
143637
+ Box_default,
143638
+ {
143639
+ flexDirection: "column",
143640
+ borderStyle: "round",
143641
+ borderColor: theme14.colors.accent,
143642
+ paddingX: 2,
143643
+ paddingY: 1,
143644
+ gap: 1,
143645
+ width: 65,
143646
+ children: [
143647
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "PR Options" }),
143648
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", children: [
143649
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143650
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: optionIndex === 0 ? theme14.colors.accent : theme14.colors.muted, children: optionIndex === 0 ? ">" : " " }),
143651
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Base branch:" }),
143652
+ editingBase ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.border, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
143653
+ TextInput,
143654
+ {
143655
+ defaultValue: baseBranch,
143656
+ onChange: setBaseBranch,
143657
+ placeholder: "Base branch..."
143658
+ }
143659
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, bold: optionIndex === 0, children: baseBranch })
143660
+ ] }),
143661
+ supportsDraft && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143662
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: optionIndex === 1 ? theme14.colors.accent : theme14.colors.muted, children: optionIndex === 1 ? ">" : " " }),
143663
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Draft:" }),
143664
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: draft ? theme14.colors.warning : theme14.colors.success, bold: optionIndex === 1, children: draft ? "[x] Draft PR" : "[ ] Ready for review" })
143665
+ ] })
143666
+ ] }),
143667
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143668
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143669
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Head:" }),
143670
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, children: headBranch })
143671
+ ] }),
143672
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143673
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Title:" }),
143674
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: title })
143675
+ ] })
143676
+ ] }),
143677
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.error, children: error48 }),
143678
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: editingBase ? "Enter: confirm | Esc: cancel" : "j/k: navigate | Enter: edit | Space: toggle | c: create | Esc: back" })
143679
+ ]
143680
+ }
143681
+ ) });
143682
+ }
143683
+ if (step4 === "body") {
143684
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
143685
+ Box_default,
143686
+ {
143687
+ flexDirection: "column",
143688
+ borderStyle: "round",
143689
+ borderColor: theme14.colors.accent,
143690
+ paddingX: 2,
143691
+ paddingY: 1,
143692
+ gap: 1,
143693
+ width: 65,
143694
+ children: [
143695
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "PR Description (optional)" }),
143696
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.border, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
143697
+ MultiLineInput,
143698
+ {
143699
+ placeholder: "Enter a description for your PR...",
143700
+ defaultValue: body,
143701
+ onChange: setBody,
143702
+ isActive: true,
143703
+ minHeight: 5
143704
+ }
143705
+ ) }),
143706
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143707
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143708
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Title:" }),
143709
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: title })
143710
+ ] }),
143711
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143712
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Branch:" }),
143713
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, children: headBranch }),
143714
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "->" }),
143715
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: baseBranch })
143716
+ ] })
143717
+ ] }),
143718
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Ctrl+S: continue | Esc: back to title" })
143719
+ ]
143720
+ }
143721
+ ) });
143722
+ }
143723
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Modal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
143724
+ Box_default,
143725
+ {
143726
+ flexDirection: "column",
143727
+ borderStyle: "round",
143728
+ borderColor: theme14.colors.accent,
143729
+ paddingX: 2,
143730
+ paddingY: 1,
143731
+ gap: 1,
143732
+ width: 65,
143733
+ children: [
143734
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Create Pull Request" }),
143735
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
143736
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143737
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Head:" }),
143738
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.accent, children: headBranch })
143739
+ ] }),
143740
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { gap: 1, children: [
143741
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Base:" }),
143742
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.text, children: defaultBaseBranch })
143743
+ ] })
143744
+ ] }),
143745
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { flexDirection: "column", children: [
143746
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, children: "Title:" }),
143747
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { borderStyle: "single", borderColor: theme14.colors.border, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
143748
+ TextInput,
143749
+ {
143750
+ defaultValue: title,
143751
+ onChange: setTitle,
143752
+ placeholder: "Enter PR title..."
143753
+ }
143754
+ ) })
143755
+ ] }),
143756
+ error48 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.error, children: error48 }),
143757
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Enter: continue | Esc: cancel" })
143758
+ ]
143759
+ }
143760
+ ) });
143761
+ }
143762
+
143763
+ // src/screens/ThisRepoScreen.tsx
143764
+ var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
142967
143765
  function ThisRepoScreen({ owner, repo, onSelect }) {
142968
- const [stateFilter, setStateFilter] = (0, import_react111.useState)("open");
143766
+ const [stateFilter, setStateFilter] = (0, import_react113.useState)("open");
143767
+ const [showCreatePR, setShowCreatePR] = (0, import_react113.useState)(false);
143768
+ const [createError, setCreateError] = (0, import_react113.useState)(null);
143769
+ const [branchInfo, setBranchInfo] = (0, import_react113.useState)(null);
143770
+ const [navigateToPR, setNavigateToPR] = (0, import_react113.useState)(null);
143771
+ const { setStatusMessage } = useStatusMessage();
143772
+ const { matchesAction: matchesAction2 } = useKeybindings("prList");
142969
143773
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(
142970
143774
  owner ?? "",
142971
143775
  repo ?? "",
142972
143776
  { state: stateFilter === "all" ? "all" : stateFilter === "closed" ? "closed" : "open" }
142973
143777
  );
143778
+ const createPR = useCreatePullRequest();
143779
+ const { data: newPRData } = usePullRequest(
143780
+ owner ?? "",
143781
+ repo ?? "",
143782
+ navigateToPR ?? 0
143783
+ );
143784
+ (0, import_react113.useEffect)(() => {
143785
+ if (navigateToPR && newPRData) {
143786
+ onSelect(newPRData);
143787
+ setNavigateToPR(null);
143788
+ setShowCreatePR(false);
143789
+ }
143790
+ }, [navigateToPR, newPRData, onSelect]);
143791
+ (0, import_react113.useEffect)(() => {
143792
+ if (showCreatePR && !branchInfo) {
143793
+ Promise.all([
143794
+ getCurrentBranch(),
143795
+ getDefaultBranch(),
143796
+ hasRemoteTracking()
143797
+ ]).then(([currentBranch, defaultBranch, hasTracking]) => {
143798
+ setBranchInfo({ currentBranch, defaultBranch, hasTracking });
143799
+ });
143800
+ }
143801
+ }, [showCreatePR, branchInfo]);
143802
+ const handleOpenCreatePR = (0, import_react113.useCallback)(() => {
143803
+ setCreateError(null);
143804
+ setBranchInfo(null);
143805
+ setShowCreatePR(true);
143806
+ }, []);
143807
+ const handleCloseCreatePR = (0, import_react113.useCallback)(() => {
143808
+ setShowCreatePR(false);
143809
+ setCreateError(null);
143810
+ setBranchInfo(null);
143811
+ }, []);
143812
+ const handleSubmitCreatePR = (0, import_react113.useCallback)(
143813
+ (params) => {
143814
+ if (!owner || !repo) return;
143815
+ createPR.mutate(
143816
+ {
143817
+ owner,
143818
+ repo,
143819
+ title: params.title,
143820
+ body: params.body,
143821
+ baseBranch: params.baseBranch,
143822
+ headBranch: params.headBranch,
143823
+ draft: params.draft
143824
+ },
143825
+ {
143826
+ onSuccess: (result) => {
143827
+ setStatusMessage(`PR #${result.number} created successfully`);
143828
+ setNavigateToPR(result.number);
143829
+ },
143830
+ onError: (err) => {
143831
+ const message = err instanceof Error ? err.message : String(err);
143832
+ setCreateError(message);
143833
+ }
143834
+ }
143835
+ );
143836
+ },
143837
+ [owner, repo, createPR, setStatusMessage]
143838
+ );
143839
+ use_input_default(
143840
+ (input, key) => {
143841
+ if (matchesAction2(input, key, "createPR")) {
143842
+ handleOpenCreatePR();
143843
+ }
143844
+ },
143845
+ { isActive: !showCreatePR }
143846
+ );
142974
143847
  if (!owner || !repo) {
142975
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EmptyState, { message: "Not in a git repository or remote not detected" });
143848
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(EmptyState, { message: "Not in a git repository or remote not detected" });
142976
143849
  }
142977
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
142978
- PRListScreen,
142979
- {
142980
- title: `${owner}/${repo}`,
142981
- prs,
142982
- isLoading,
142983
- error: error48,
142984
- emptyMessage: `No ${stateFilter === "all" ? "" : stateFilter + " "}PRs in ${owner}/${repo}`,
142985
- loadingMessage: `Loading PRs for ${owner}/${repo}...`,
142986
- queryKeys: [["prs", owner, repo]],
142987
- stateFilter,
142988
- onStateChange: setStateFilter,
142989
- onSelect
143850
+ const modalError = (() => {
143851
+ if (createError) return createError;
143852
+ if (branchInfo && !branchInfo.currentBranch) {
143853
+ return "Cannot create PR: not on a named branch (detached HEAD)";
142990
143854
  }
142991
- );
143855
+ if (branchInfo && branchInfo.currentBranch === branchInfo.defaultBranch) {
143856
+ return "Cannot create PR: already on the default branch";
143857
+ }
143858
+ return null;
143859
+ })();
143860
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
143861
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143862
+ PRListScreen,
143863
+ {
143864
+ title: `${owner}/${repo}`,
143865
+ prs,
143866
+ isLoading,
143867
+ error: error48,
143868
+ emptyMessage: `No ${stateFilter === "all" ? "" : stateFilter + " "}PRs in ${owner}/${repo}`,
143869
+ loadingMessage: `Loading PRs for ${owner}/${repo}...`,
143870
+ queryKeys: [["prs", owner, repo]],
143871
+ stateFilter,
143872
+ onStateChange: setStateFilter,
143873
+ onSelect
143874
+ }
143875
+ ),
143876
+ showCreatePR && branchInfo && branchInfo.currentBranch && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143877
+ CreatePRModal,
143878
+ {
143879
+ headBranch: branchInfo.currentBranch,
143880
+ defaultBaseBranch: branchInfo.defaultBranch,
143881
+ supportsDraft: true,
143882
+ onSubmit: handleSubmitCreatePR,
143883
+ onClose: handleCloseCreatePR,
143884
+ isSubmitting: createPR.isPending,
143885
+ error: modalError
143886
+ }
143887
+ ),
143888
+ showCreatePR && branchInfo && !branchInfo.currentBranch && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
143889
+ CreatePRModal,
143890
+ {
143891
+ headBranch: "",
143892
+ defaultBaseBranch: branchInfo.defaultBranch,
143893
+ supportsDraft: true,
143894
+ onSubmit: handleSubmitCreatePR,
143895
+ onClose: handleCloseCreatePR,
143896
+ isSubmitting: false,
143897
+ error: "Cannot create PR: not on a named branch (detached HEAD)"
143898
+ }
143899
+ ),
143900
+ showCreatePR && !branchInfo && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Box_default, { padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { children: "Loading branch information..." }) })
143901
+ ] });
142992
143902
  }
142993
143903
 
142994
143904
  // src/screens/BrowseRepoScreen.tsx
142995
- var import_react114 = __toESM(require_react(), 1);
143905
+ var import_react116 = __toESM(require_react(), 1);
142996
143906
 
142997
143907
  // src/hooks/useRepoContext.tsx
142998
- var import_react112 = __toESM(require_react(), 1);
142999
- var RepoContext = (0, import_react112.createContext)({
143908
+ var import_react114 = __toESM(require_react(), 1);
143909
+ var RepoContext = (0, import_react114.createContext)({
143000
143910
  localRepo: null,
143001
143911
  browseRepo: null,
143002
143912
  setBrowseRepo: () => {
@@ -143008,14 +143918,14 @@ function RepoContextProvider({
143008
143918
  localRepo,
143009
143919
  children
143010
143920
  }) {
143011
- const [browseRepo, setBrowseRepoState] = (0, import_react112.useState)(null);
143012
- const setBrowseRepo = (0, import_react112.useCallback)((owner, repo) => {
143921
+ const [browseRepo, setBrowseRepoState] = (0, import_react114.useState)(null);
143922
+ const setBrowseRepo = (0, import_react114.useCallback)((owner, repo) => {
143013
143923
  setBrowseRepoState({ owner, repo });
143014
143924
  }, []);
143015
- const clearBrowseRepo = (0, import_react112.useCallback)(() => {
143925
+ const clearBrowseRepo = (0, import_react114.useCallback)(() => {
143016
143926
  setBrowseRepoState(null);
143017
143927
  }, []);
143018
- return import_react112.default.createElement(
143928
+ return import_react114.default.createElement(
143019
143929
  RepoContext.Provider,
143020
143930
  {
143021
143931
  value: {
@@ -143029,11 +143939,11 @@ function RepoContextProvider({
143029
143939
  );
143030
143940
  }
143031
143941
  function useRepoContext() {
143032
- return (0, import_react112.useContext)(RepoContext);
143942
+ return (0, import_react114.useContext)(RepoContext);
143033
143943
  }
143034
143944
 
143035
143945
  // src/hooks/useRecentRepos.ts
143036
- var import_react113 = __toESM(require_react(), 1);
143946
+ var import_react115 = __toESM(require_react(), 1);
143037
143947
  var MAX_RECENT_REPOS = 10;
143038
143948
  function addRecentRepoToList(repos, owner, repo, now2) {
143039
143949
  const filtered = repos.filter(
@@ -143056,8 +143966,8 @@ function sortByMostRecent(repos) {
143056
143966
  function useRecentRepos() {
143057
143967
  const { config: config3, updateConfig } = useConfig();
143058
143968
  const rawRepos = config3?.recentRepos ?? [];
143059
- const recentRepos = (0, import_react113.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
143060
- const addRecentRepo = (0, import_react113.useCallback)(
143969
+ const recentRepos = (0, import_react115.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
143970
+ const addRecentRepo = (0, import_react115.useCallback)(
143061
143971
  (owner, repo) => {
143062
143972
  const current2 = config3?.recentRepos ?? [];
143063
143973
  const now2 = (/* @__PURE__ */ new Date()).toISOString();
@@ -143066,7 +143976,7 @@ function useRecentRepos() {
143066
143976
  },
143067
143977
  [config3?.recentRepos, updateConfig]
143068
143978
  );
143069
- const removeRecentRepo = (0, import_react113.useCallback)(
143979
+ const removeRecentRepo = (0, import_react115.useCallback)(
143070
143980
  (owner, repo) => {
143071
143981
  const current2 = config3?.recentRepos ?? [];
143072
143982
  const updated = removeRecentRepoFromList(current2, owner, repo);
@@ -143078,7 +143988,7 @@ function useRecentRepos() {
143078
143988
  }
143079
143989
 
143080
143990
  // src/screens/BrowseRepoScreen.tsx
143081
- var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
143991
+ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
143082
143992
  function parseRepoUrl(input) {
143083
143993
  const trimmed2 = input.trim();
143084
143994
  if (trimmed2.startsWith("http://") || trimmed2.startsWith("https://") || trimmed2.startsWith("git@")) {
@@ -143156,28 +144066,28 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143156
144066
  const { setInputActive } = useInputFocus();
143157
144067
  const { recentRepos, removeRecentRepo } = useRecentRepos();
143158
144068
  const { bookmarkedRepos } = useBookmarkedRepos();
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);
144069
+ const [inputValue, setInputValue] = (0, import_react116.useState)("");
144070
+ const [inputError, setInputError] = (0, import_react116.useState)(null);
144071
+ const [isInputFocused, setIsInputFocused] = (0, import_react116.useState)(false);
144072
+ const [selectedIndex, setSelectedIndex] = (0, import_react116.useState)(0);
143163
144073
  const bookmarkSet = new Set(bookmarkedRepos.map((b) => `${b.owner}/${b.repo}`));
143164
144074
  const filteredRecent = recentRepos.filter((r) => !bookmarkSet.has(`${r.owner}/${r.repo}`));
143165
144075
  const totalListItems = bookmarkedRepos.length + filteredRecent.length;
143166
- (0, import_react114.useEffect)(() => {
144076
+ (0, import_react116.useEffect)(() => {
143167
144077
  if (isActive2) {
143168
144078
  setIsInputFocused(true);
143169
144079
  } else {
143170
144080
  setIsInputFocused(false);
143171
144081
  }
143172
144082
  }, [isActive2]);
143173
- (0, import_react114.useEffect)(() => {
144083
+ (0, import_react116.useEffect)(() => {
143174
144084
  setInputActive(isInputFocused);
143175
144085
  return () => setInputActive(false);
143176
144086
  }, [isInputFocused, setInputActive]);
143177
- (0, import_react114.useEffect)(() => {
144087
+ (0, import_react116.useEffect)(() => {
143178
144088
  setScreenContext("browse-picker");
143179
144089
  }, []);
143180
- const handleSubmitInput = (0, import_react114.useCallback)(() => {
144090
+ const handleSubmitInput = (0, import_react116.useCallback)(() => {
143181
144091
  const result = validateRepoInput(inputValue);
143182
144092
  if (!result.valid) {
143183
144093
  setInputError(result.error);
@@ -143186,7 +144096,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143186
144096
  setInputError(null);
143187
144097
  onSelectRepo(result.owner, result.repo);
143188
144098
  }, [inputValue, onSelectRepo]);
143189
- const handleSelectFromList = (0, import_react114.useCallback)(() => {
144099
+ const handleSelectFromList = (0, import_react116.useCallback)(() => {
143190
144100
  if (totalListItems === 0) return;
143191
144101
  if (selectedIndex < bookmarkedRepos.length) {
143192
144102
  const bookmark = bookmarkedRepos[selectedIndex];
@@ -143201,7 +144111,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143201
144111
  }
143202
144112
  }
143203
144113
  }, [selectedIndex, bookmarkedRepos, filteredRecent, totalListItems, onSelectRepo]);
143204
- const handleRemoveFromList = (0, import_react114.useCallback)(() => {
144114
+ const handleRemoveFromList = (0, import_react116.useCallback)(() => {
143205
144115
  if (selectedIndex >= bookmarkedRepos.length) {
143206
144116
  const recentIdx = selectedIndex - bookmarkedRepos.length;
143207
144117
  const recent = filteredRecent[recentIdx];
@@ -143239,19 +144149,19 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143239
144149
  },
143240
144150
  { isActive: isActive2 }
143241
144151
  );
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)(
144152
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, padding: 1, children: [
144153
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.accent, bold: true, children: "Browse Repository" }),
144154
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
144155
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { gap: 1, children: [
144156
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.secondary, children: "repo path or URL:" }),
144157
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
143248
144158
  Box_default,
143249
144159
  {
143250
144160
  borderStyle: "single",
143251
144161
  borderColor: isInputFocused ? theme14.colors.accent : theme14.colors.border,
143252
144162
  paddingX: 1,
143253
144163
  width: 40,
143254
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
144164
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
143255
144165
  TextInput,
143256
144166
  {
143257
144167
  defaultValue: inputValue,
@@ -143265,14 +144175,14 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143265
144175
  }
143266
144176
  )
143267
144177
  ] }),
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 }) })
144178
+ inputError && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Box_default, { paddingLeft: 2, marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.error, children: inputError }) })
143269
144179
  ] }),
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, {}),
144180
+ bookmarkedRepos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
144181
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Bookmarks" }),
144182
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Divider, {}),
143273
144183
  bookmarkedRepos.map((bookmark, index) => {
143274
144184
  const isSelected = !isInputFocused && selectedIndex === index;
143275
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
144185
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
143276
144186
  Text,
143277
144187
  {
143278
144188
  color: isSelected ? theme14.colors.accent : theme14.colors.text,
@@ -143288,14 +144198,14 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143288
144198
  ) }, `${bookmark.owner}/${bookmark.repo}`);
143289
144199
  })
143290
144200
  ] }),
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, {}),
144201
+ filteredRecent.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
144202
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Recent" }),
144203
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Divider, {}),
143294
144204
  filteredRecent.map((repo, index) => {
143295
144205
  const listIdx = bookmarkedRepos.length + index;
143296
144206
  const isSelected = !isInputFocused && selectedIndex === listIdx;
143297
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
143298
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
144207
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Box_default, { paddingX: 1, gap: 2, children: [
144208
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
143299
144209
  Text,
143300
144210
  {
143301
144211
  color: isSelected ? theme14.colors.accent : theme14.colors.text,
@@ -143309,20 +144219,20 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2 }) {
143309
144219
  ]
143310
144220
  }
143311
144221
  ),
143312
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: new Date(repo.lastUsed).toLocaleDateString() })
144222
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: new Date(repo.lastUsed).toLocaleDateString() })
143313
144223
  ] }, `${repo.owner}/${repo.repo}`);
143314
144224
  })
143315
144225
  ] }),
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" }) })
144226
+ totalListItems === 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.muted, children: "No recent or bookmarked repos. Enter owner/repo above to get started." }) }),
144227
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Box_default, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: isInputFocused ? "Enter:search Esc:list" : "j/k:nav Enter:select x:remove /:search" }) })
143318
144228
  ] });
143319
144229
  }
143320
144230
  function BrowseList({ owner, repo, onBack, onSelect }) {
143321
- const [stateFilter, setStateFilter] = (0, import_react114.useState)("open");
144231
+ const [stateFilter, setStateFilter] = (0, import_react116.useState)("open");
143322
144232
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(owner, repo, {
143323
144233
  state: stateFilter === "all" ? "all" : stateFilter === "closed" ? "closed" : "open"
143324
144234
  });
143325
- (0, import_react114.useEffect)(() => {
144235
+ (0, import_react116.useEffect)(() => {
143326
144236
  setScreenContext("browse-list");
143327
144237
  }, []);
143328
144238
  use_input_default(
@@ -143333,7 +144243,7 @@ function BrowseList({ owner, repo, onBack, onSelect }) {
143333
144243
  },
143334
144244
  { isActive: true }
143335
144245
  );
143336
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
144246
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
143337
144247
  PRListScreen,
143338
144248
  {
143339
144249
  title: `${owner}/${repo}`,
@@ -143352,8 +144262,8 @@ function BrowseList({ owner, repo, onBack, onSelect }) {
143352
144262
  function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
143353
144263
  const { setBrowseRepo, clearBrowseRepo } = useRepoContext();
143354
144264
  const { addRecentRepo } = useRecentRepos();
143355
- const [selectedRepo, setSelectedRepo] = (0, import_react114.useState)(null);
143356
- const handleSelectRepo = (0, import_react114.useCallback)(
144265
+ const [selectedRepo, setSelectedRepo] = (0, import_react116.useState)(null);
144266
+ const handleSelectRepo = (0, import_react116.useCallback)(
143357
144267
  (owner, repo) => {
143358
144268
  setSelectedRepo({ owner, repo });
143359
144269
  setBrowseRepo(owner, repo);
@@ -143361,12 +144271,12 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
143361
144271
  },
143362
144272
  [setBrowseRepo, addRecentRepo]
143363
144273
  );
143364
- const handleBack = (0, import_react114.useCallback)(() => {
144274
+ const handleBack = (0, import_react116.useCallback)(() => {
143365
144275
  setSelectedRepo(null);
143366
144276
  clearBrowseRepo();
143367
144277
  }, [clearBrowseRepo]);
143368
144278
  if (selectedRepo) {
143369
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
144279
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
143370
144280
  BrowseList,
143371
144281
  {
143372
144282
  owner: selectedRepo.owner,
@@ -143376,29 +144286,29 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
143376
144286
  }
143377
144287
  );
143378
144288
  }
143379
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BrowsePicker, { onSelectRepo: handleSelectRepo, isActive: isActive2 });
144289
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BrowsePicker, { onSelectRepo: handleSelectRepo, isActive: isActive2 });
143380
144290
  }
143381
144291
 
143382
144292
  // src/hooks/useActivePanel.ts
143383
- var import_react115 = __toESM(require_react(), 1);
144293
+ var import_react117 = __toESM(require_react(), 1);
143384
144294
  function useActivePanel({
143385
144295
  hasSelection,
143386
144296
  isInputActive = false
143387
144297
  }) {
143388
- const [activePanel, setActivePanel] = (0, import_react115.useState)("sidebar");
143389
- (0, import_react115.useEffect)(() => {
144298
+ const [activePanel, setActivePanel] = (0, import_react117.useState)("sidebar");
144299
+ (0, import_react117.useEffect)(() => {
143390
144300
  if (!hasSelection && activePanel === "detail") {
143391
144301
  setActivePanel("list");
143392
144302
  }
143393
144303
  }, [hasSelection, activePanel]);
143394
- const handleEscape = (0, import_react115.useCallback)(() => {
144304
+ const handleEscape = (0, import_react117.useCallback)(() => {
143395
144305
  if (activePanel === "detail") {
143396
144306
  setActivePanel("list");
143397
144307
  } else if (activePanel === "list") {
143398
144308
  setActivePanel("sidebar");
143399
144309
  }
143400
144310
  }, [activePanel]);
143401
- const handleTab = (0, import_react115.useCallback)(() => {
144311
+ const handleTab = (0, import_react117.useCallback)(() => {
143402
144312
  if (activePanel === "sidebar") {
143403
144313
  setActivePanel("list");
143404
144314
  } else if (activePanel === "list" && hasSelection) {
@@ -143421,7 +144331,7 @@ function useActivePanel({
143421
144331
  }
143422
144332
 
143423
144333
  // src/hooks/useSidebarCounts.ts
143424
- var import_react116 = __toESM(require_react(), 1);
144334
+ var import_react118 = __toESM(require_react(), 1);
143425
144335
  var EMPTY_COUNTS = {
143426
144336
  involved: null,
143427
144337
  myPrs: null,
@@ -143456,8 +144366,8 @@ function extractThisRepoCount(queryClient2) {
143456
144366
  }
143457
144367
  function useSidebarCounts(isUnread) {
143458
144368
  const queryClient2 = useQueryClient();
143459
- const countsRef = (0, import_react116.useRef)(EMPTY_COUNTS);
143460
- const computeCounts = (0, import_react116.useCallback)(() => {
144369
+ const countsRef = (0, import_react118.useRef)(EMPTY_COUNTS);
144370
+ const computeCounts = (0, import_react118.useCallback)(() => {
143461
144371
  const involved = extractCount(queryClient2, "involved-prs");
143462
144372
  const myPrs = extractCount(queryClient2, "my-prs");
143463
144373
  const forReview = extractCount(queryClient2, "review-requests");
@@ -143484,7 +144394,7 @@ function useSidebarCounts(isUnread) {
143484
144394
  const browse = extractCount(queryClient2, "browse-prs");
143485
144395
  return { involved, myPrs, forReview, forReviewUnread, thisRepo, browse };
143486
144396
  }, [queryClient2, isUnread]);
143487
- const subscribe2 = (0, import_react116.useCallback)(
144397
+ const subscribe2 = (0, import_react118.useCallback)(
143488
144398
  (onStoreChange) => {
143489
144399
  const unsubscribe = queryClient2.getQueryCache().subscribe(() => {
143490
144400
  const next = computeCounts();
@@ -143498,13 +144408,13 @@ function useSidebarCounts(isUnread) {
143498
144408
  },
143499
144409
  [queryClient2, computeCounts]
143500
144410
  );
143501
- const getSnapshot2 = (0, import_react116.useCallback)(() => {
144411
+ const getSnapshot2 = (0, import_react118.useCallback)(() => {
143502
144412
  return countsRef.current;
143503
144413
  }, []);
143504
- (0, import_react116.useEffect)(() => {
144414
+ (0, import_react118.useEffect)(() => {
143505
144415
  countsRef.current = computeCounts();
143506
144416
  }, [computeCounts]);
143507
- return (0, import_react116.useSyncExternalStore)(subscribe2, getSnapshot2, () => EMPTY_COUNTS);
144417
+ return (0, import_react118.useSyncExternalStore)(subscribe2, getSnapshot2, () => EMPTY_COUNTS);
143508
144418
  }
143509
144419
 
143510
144420
  // src/utils/retryConfig.ts
@@ -143529,7 +144439,7 @@ function getRetryDelay(failureCount, error48) {
143529
144439
  }
143530
144440
 
143531
144441
  // src/app.tsx
143532
- var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
144442
+ var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
143533
144443
  function AppContent({
143534
144444
  repoOwner,
143535
144445
  repoName,
@@ -143541,8 +144451,8 @@ function AppContent({
143541
144451
  const { user, isAuthenticated, loading, saveToken, error: error48 } = useAuth();
143542
144452
  const { config: config3, updateConfig } = useConfig();
143543
144453
  const queryClient2 = useQueryClient();
143544
- const [sidebarVisible, setSidebarVisible] = (0, import_react117.useState)(true);
143545
- const [currentScreen, setCurrentScreen] = (0, import_react117.useState)({
144454
+ const [sidebarVisible, setSidebarVisible] = (0, import_react119.useState)(true);
144455
+ const [currentScreen, setCurrentScreen] = (0, import_react119.useState)({
143546
144456
  type: "list"
143547
144457
  });
143548
144458
  const directPROwner = directPR?.owner ?? repoOwner ?? "";
@@ -143554,8 +144464,8 @@ function AppContent({
143554
144464
  error: directPRError,
143555
144465
  refetch: directPRRefetch
143556
144466
  } = usePullRequest(directPROwner, directPRRepo, directPRNumber);
143557
- const [directPRNavigated, setDirectPRNavigated] = (0, import_react117.useState)(false);
143558
- import_react117.default.useEffect(() => {
144467
+ const [directPRNavigated, setDirectPRNavigated] = (0, import_react119.useState)(false);
144468
+ import_react119.default.useEffect(() => {
143559
144469
  if (directPR && directPRData && !directPRNavigated) {
143560
144470
  setDirectPRNavigated(true);
143561
144471
  setCurrentScreen({
@@ -143566,10 +144476,10 @@ function AppContent({
143566
144476
  });
143567
144477
  }
143568
144478
  }, [directPR, directPRData, directPRNavigated]);
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);
144479
+ const [tokenError, setTokenError] = (0, import_react119.useState)(null);
144480
+ const [showHelp2, setShowHelp] = (0, import_react119.useState)(false);
144481
+ const [showTokenInput, setShowTokenInput] = (0, import_react119.useState)(false);
144482
+ const [showOnboarding, setShowOnboarding] = (0, import_react119.useState)(false);
143573
144483
  const { isTokenExpired } = useTokenExpired();
143574
144484
  const { isInputActive } = useInputFocus();
143575
144485
  const { activePanel, setActivePanel } = useActivePanel({
@@ -143586,28 +144496,28 @@ function AppContent({
143586
144496
  const sidebarIndex = currentEntry ? getItemIndex(currentEntry) ?? 0 : 0;
143587
144497
  const { isUnread } = useReadState();
143588
144498
  const sidebarCounts = useSidebarCounts(isUnread);
143589
- import_react117.default.useEffect(() => {
144499
+ import_react119.default.useEffect(() => {
143590
144500
  if (!loading && !isAuthenticated && !showTokenInput) {
143591
144501
  setShowTokenInput(true);
143592
144502
  } else if (isAuthenticated && showTokenInput && !isTokenExpired) {
143593
144503
  setShowTokenInput(false);
143594
144504
  }
143595
144505
  }, [loading, isAuthenticated, showTokenInput, isTokenExpired]);
143596
- import_react117.default.useEffect(() => {
144506
+ import_react119.default.useEffect(() => {
143597
144507
  if (isTokenExpired && !showTokenInput) {
143598
144508
  setShowTokenInput(true);
143599
144509
  }
143600
144510
  }, [isTokenExpired, showTokenInput]);
143601
- import_react117.default.useEffect(() => {
144511
+ import_react119.default.useEffect(() => {
143602
144512
  if (config3 && !config3.hasOnboarded && !showOnboarding) {
143603
144513
  setShowOnboarding(true);
143604
144514
  }
143605
144515
  }, [config3, showOnboarding]);
143606
- const handleOnboardingComplete = (0, import_react117.useCallback)(() => {
144516
+ const handleOnboardingComplete = (0, import_react119.useCallback)(() => {
143607
144517
  setShowOnboarding(false);
143608
144518
  updateConfig({ hasOnboarded: true });
143609
144519
  }, [updateConfig]);
143610
- const handleTokenSubmit = (0, import_react117.useCallback)(
144520
+ const handleTokenSubmit = (0, import_react119.useCallback)(
143611
144521
  async (token) => {
143612
144522
  try {
143613
144523
  setTokenError(null);
@@ -143653,7 +144563,7 @@ function AppContent({
143653
144563
  },
143654
144564
  { isActive: !showTokenInput && !showOnboarding && !isInputActive }
143655
144565
  );
143656
- const handleSelectPR = (0, import_react117.useCallback)(
144566
+ const handleSelectPR = (0, import_react119.useCallback)(
143657
144567
  (pr, list, index) => {
143658
144568
  setCurrentScreen({
143659
144569
  type: "detail",
@@ -143664,14 +144574,14 @@ function AppContent({
143664
144574
  },
143665
144575
  []
143666
144576
  );
143667
- const handleBackToList = (0, import_react117.useCallback)(() => {
144577
+ const handleBackToList = (0, import_react119.useCallback)(() => {
143668
144578
  if (directPR) {
143669
144579
  exit4();
143670
144580
  } else {
143671
144581
  setCurrentScreen({ type: "list" });
143672
144582
  }
143673
144583
  }, [directPR, exit4]);
143674
- const handleNavigatePR = (0, import_react117.useCallback)(
144584
+ const handleNavigatePR = (0, import_react119.useCallback)(
143675
144585
  (direction) => {
143676
144586
  if (currentScreen.type !== "detail") return;
143677
144587
  const { prList, prIndex } = currentScreen;
@@ -143692,11 +144602,11 @@ function AppContent({
143692
144602
  function renderScreen() {
143693
144603
  if (directPR && !directPRNavigated) {
143694
144604
  if (directPRLoading) {
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}...` }) });
144605
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Box_default, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LoadingIndicator, { message: `Loading PR #${directPR.prNumber}...` }) });
143696
144606
  }
143697
144607
  if (directPRError) {
143698
144608
  const errorMessage = directPRError instanceof Error ? directPRError.message : String(directPRError);
143699
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
144609
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143700
144610
  ErrorWithRetry,
143701
144611
  {
143702
144612
  message: `Failed to load PR #${directPR.prNumber}: ${errorMessage}`,
@@ -143711,7 +144621,7 @@ function AppContent({
143711
144621
  const parsed = parseGitHubPRUrl(currentScreen.pr.html_url);
143712
144622
  const prOwner = parsed?.owner ?? repoOwner ?? "";
143713
144623
  const prRepo = parsed?.repo ?? repoName ?? "";
143714
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
144624
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143715
144625
  PRDetailScreen,
143716
144626
  {
143717
144627
  pr: currentScreen.pr,
@@ -143725,10 +144635,10 @@ function AppContent({
143725
144635
  );
143726
144636
  }
143727
144637
  return Match_exports.value(sidebarIndex).pipe(
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)(
144638
+ Match_exports.when(0, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InvolvedScreen, { onSelect: handleSelectPR })),
144639
+ Match_exports.when(1, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MyPRsScreen, { onSelect: handleSelectPR })),
144640
+ Match_exports.when(2, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ReviewRequestsScreen, { onSelect: handleSelectPR })),
144641
+ Match_exports.when(3, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143732
144642
  ThisRepoScreen,
143733
144643
  {
143734
144644
  owner: repoOwner,
@@ -143736,16 +144646,16 @@ function AppContent({
143736
144646
  onSelect: handleSelectPR
143737
144647
  }
143738
144648
  )),
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 }))
144649
+ Match_exports.when(4, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BrowseRepoScreen, { onSelect: handleSelectPR, isActive: activePanel !== "sidebar" })),
144650
+ Match_exports.when(5, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SettingsScreen, {})),
144651
+ Match_exports.orElse(() => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InvolvedScreen, { onSelect: handleSelectPR }))
143742
144652
  );
143743
144653
  }
143744
144654
  const terminalHeight = stdout?.rows ?? 24;
143745
144655
  const { browseRepo } = useRepoContext();
143746
144656
  const repoPath = repoOwner && repoName ? `${repoOwner}/${repoName}` : void 0;
143747
144657
  const browseRepoPath = browseRepo ? `${browseRepo.owner}/${browseRepo.repo}` : void 0;
143748
- import_react117.default.useEffect(() => {
144658
+ import_react119.default.useEffect(() => {
143749
144659
  if (currentScreen.type !== "detail") {
143750
144660
  if (sidebarIndex === 5) {
143751
144661
  setScreenContext("settings");
@@ -143770,8 +144680,8 @@ function AppContent({
143770
144680
  const currentScreenName = currentScreen.type === "list" ? screenNames[sidebarIndex] : screenNames[sidebarIndex];
143771
144681
  const prTitle = currentScreen.type === "detail" ? currentScreen.pr.title : void 0;
143772
144682
  const prNumber = currentScreen.type === "detail" ? currentScreen.pr.number : void 0;
143773
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box_default, { flexDirection: "column", height: terminalHeight, children: [
143774
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
144683
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Box_default, { flexDirection: "column", height: terminalHeight, children: [
144684
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143775
144685
  TopBar,
143776
144686
  {
143777
144687
  username: user?.login ?? "anonymous",
@@ -143784,8 +144694,8 @@ function AppContent({
143784
144694
  connectionStatus
143785
144695
  }
143786
144696
  ),
143787
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
143788
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
144697
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Box_default, { flexDirection: "row", flexGrow: 1, children: [
144698
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143789
144699
  Sidebar,
143790
144700
  {
143791
144701
  selectedIndex: sidebarIndex,
@@ -143797,12 +144707,12 @@ function AppContent({
143797
144707
  navIndex
143798
144708
  }
143799
144709
  ),
143800
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MainPanel, { isActive: activePanel === "list", children: renderScreen() })
144710
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MainPanel, { isActive: activePanel === "list", children: renderScreen() })
143801
144711
  ] }),
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)(
144712
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StatusBar, { activePanel, screenContext }),
144713
+ showHelp2 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(HelpModal, { onClose: () => setShowHelp(false) }),
144714
+ showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OnboardingScreen, { onComplete: handleOnboardingComplete }),
144715
+ showTokenInput && !showOnboarding && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143806
144716
  TokenInputModal,
143807
144717
  {
143808
144718
  onSubmit: handleTokenSubmit,
@@ -143848,14 +144758,14 @@ function AppWithTheme({
143848
144758
  const configProvider = config3?.provider ?? null;
143849
144759
  const gitDetectedProvider = toConfigProvider(detectedProvider);
143850
144760
  const activeProvider = configProvider ?? gitDetectedProvider ?? "github";
143851
- import_react117.default.useEffect(() => {
144761
+ import_react119.default.useEffect(() => {
143852
144762
  setAuthProvider(activeProvider);
143853
144763
  if (detectedBaseUrl && activeProvider === gitDetectedProvider) {
143854
144764
  setAuthBaseUrl(detectedBaseUrl);
143855
144765
  }
143856
144766
  }, [activeProvider, detectedBaseUrl, gitDetectedProvider]);
143857
144767
  const localRepo = repoOwner && repoName ? { owner: repoOwner, repo: repoName } : null;
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)(
144768
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ThemeProvider, { theme: theme14, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(RepoContextProvider, { localRepo, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorBoundary2, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143859
144769
  AppContent,
143860
144770
  {
143861
144771
  repoOwner,
@@ -143872,7 +144782,7 @@ function App2({
143872
144782
  detectedBaseUrl,
143873
144783
  directPR
143874
144784
  }) {
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)(
144785
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InputFocusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
143876
144786
  AppWithTheme,
143877
144787
  {
143878
144788
  repoOwner,
@@ -143993,7 +144903,7 @@ function parseCliArgs(argv) {
143993
144903
 
143994
144904
  // src/cli.tsx
143995
144905
  var import_yaml2 = __toESM(require_dist(), 1);
143996
- var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
144906
+ var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
143997
144907
  import { readFile as readFile3 } from "fs/promises";
143998
144908
  import { homedir as homedir5 } from "os";
143999
144909
  import { join as join7 } from "path";
@@ -144123,7 +145033,7 @@ async function main() {
144123
145033
  }
144124
145034
  }
144125
145035
  render_default(
144126
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
145036
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
144127
145037
  App2,
144128
145038
  {
144129
145039
  repoOwner,