authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:12:47-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:12:47-07:00
logea0487cc9adf9f51c865fe39128102afc532bcfc
treecfab1917769a9553f6d664ea7d75526245767455
parenta9caf7b7089afb6f1b3b888ea404b75b8f9e88e1
signature Signed by PGP key B5690EEEBB952194

refactor(web): remove unused pull request state label (#9984)


2 files changed, 0 insertions(+), 17 deletions(-)

apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts-10
...@@ -38,7 +38,6 @@ import {...@@ -38,7 +38,6 @@ import {
38 shouldRefreshPullRequestActivity,38 shouldRefreshPullRequestActivity,
39 resolveBaseFreshness,39 resolveBaseFreshness,
40 buildPullRequestTimeline,40 buildPullRequestTimeline,
41 describePullRequestState,
42 editPullRequestThreadComment,41 editPullRequestThreadComment,
43 writePullRequestDetailSnapshot,42 writePullRequestDetailSnapshot,
44} from "./pullRequestDetail.logic";43} from "./pullRequestDetail.logic";
...@@ -199,15 +198,6 @@ describe("pull request primary control", () => {...@@ -199,15 +198,6 @@ describe("pull request primary control", () => {
199 });198 });
200});199});
201200
202describe("pull request state description", () => {
203 it("keeps draft and conflicts orthogonal to the terminal states", () => {
204 expect(describePullRequestState("open", true)).toBe("Draft");
205 expect(describePullRequestState("open", false)).toBe("Ready for review");
206 expect(describePullRequestState("merged", true)).toBe("Merged");
207 expect(describePullRequestState("closed", false)).toBe("Closed");
208 });
209});
210
211describe("pull request handoff labels", () => {201describe("pull request handoff labels", () => {
212 it("names the open thread when actions write to its composer", () => {202 it("names the open thread when actions write to its composer", () => {
213 expect(pullRequestHandoffLabels(true)).toEqual({203 expect(pullRequestHandoffLabels(true)).toEqual({
apps/web/src/components/pullRequest/pullRequestDetail.logic.ts-7
...@@ -189,13 +189,6 @@ export function isStackedPullRequestBase(...@@ -189,13 +189,6 @@ export function isStackedPullRequestBase(
189 return defaultBranch !== baseBranch;189 return defaultBranch !== baseBranch;
190}190}
191191
192/** Plain-language state, shown beside the author. Conflicts are a merge signal, not a state. */
193export function describePullRequestState(state: PullRequestState, isDraft: boolean): string {
194 if (state === "merged") return "Merged";
195 if (state === "closed") return "Closed";
196 return isDraft ? "Draft" : "Ready for review";
197}
198
199/** Chronological ascending, oldest to newest — reversed for the "newest" reading order. */192/** Chronological ascending, oldest to newest — reversed for the "newest" reading order. */
200export function orderPullRequestComments<T extends { readonly createdAt: string }>(193export function orderPullRequestComments<T extends { readonly createdAt: string }>(
201 comments: ReadonlyArray<T>,194 comments: ReadonlyArray<T>,