Revert "Add experimental newest-first issue thread" (#5460)

This is actually bad. Glad it was under experiments.
This commit is contained in:
Devin Foley 2026-05-07 16:50:31 -07:00 committed by GitHub
parent a904effb96
commit 0e1a582831
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 106 additions and 415 deletions

View file

@ -205,7 +205,6 @@ export function InstanceExperimentalSettings() {
const enableEnvironments = experimentalQuery.data?.enableEnvironments === true;
const enableIsolatedWorkspaces = experimentalQuery.data?.enableIsolatedWorkspaces === true;
const enableNewestFirstIssueThread = experimentalQuery.data?.enableNewestFirstIssueThread === true;
const autoRestartDevServerWhenIdle = experimentalQuery.data?.autoRestartDevServerWhenIdle === true;
const enableIssueGraphLivenessAutoRecovery =
experimentalQuery.data?.enableIssueGraphLivenessAutoRecovery === true;
@ -299,25 +298,6 @@ export function InstanceExperimentalSettings() {
</div>
</section>
<section className="rounded-xl border border-border bg-card p-5">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1.5">
<h2 className="text-sm font-semibold">Enable Newest-First Issue Thread</h2>
<p className="max-w-2xl text-sm text-muted-foreground">
Show issue comments and messages with the newest activity first, move the jump control to the bottom of
the page, and surface plain comment timestamps in the header area.
</p>
</div>
<ToggleSwitch
checked={enableNewestFirstIssueThread}
onCheckedChange={() =>
toggleMutation.mutate({ enableNewestFirstIssueThread: !enableNewestFirstIssueThread })}
disabled={toggleMutation.isPending}
aria-label="Toggle newest-first issue thread experimental setting"
/>
</div>
</section>
<section className="rounded-xl border border-border bg-card p-5">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1.5">

View file

@ -59,7 +59,6 @@ const mockProjectsApi = vi.hoisted(() => ({
const mockInstanceSettingsApi = vi.hoisted(() => ({
getGeneral: vi.fn(),
getExperimental: vi.fn(),
}));
const mockNavigate = vi.hoisted(() => vi.fn());
@ -193,7 +192,6 @@ vi.mock("../components/InlineEditor", () => ({
vi.mock("../components/IssueChatThread", () => ({
IssueChatThread: (props: {
newestFirst?: boolean;
onWorkModeChange?: (workMode: string) => void;
issueWorkMode?: string;
onStopRun?: (runId: string) => Promise<void>;
@ -806,9 +804,6 @@ describe("IssueDetail", () => {
keyboardShortcuts: false,
feedbackDataSharingPreference: "prompt",
});
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
enableNewestFirstIssueThread: false,
});
mockIssuesListRender.mockClear();
mockIssueChatThreadRender.mockClear();
});
@ -844,45 +839,6 @@ describe("IssueDetail", () => {
expect(consoleErrorSpy).not.toHaveBeenCalled();
});
it("passes oldest-first thread mode when the experimental flag is disabled", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue());
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
<IssueDetail />
</QueryClientProvider>,
);
});
await flushReact();
expect(mockIssueChatThreadRender.mock.calls.at(-1)?.[0]).toMatchObject({
newestFirst: false,
});
});
it("passes newest-first thread mode when the experimental flag is enabled", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue());
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
enableNewestFirstIssueThread: true,
});
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
<IssueDetail />
</QueryClientProvider>,
);
});
await flushReact();
expect(mockIssueChatThreadRender.mock.calls.at(-1)?.[0]).toMatchObject({
newestFirst: true,
});
});
it("passes blocker attention to the issue detail header status icon", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue({
status: "blocked",

View file

@ -592,7 +592,6 @@ type IssueDetailChatTabProps = {
issueId: string;
companyId: string;
projectId: string | null;
newestFirstIssueThreadEnabled: boolean;
issueStatus: Issue["status"];
issueWorkMode: IssueWorkMode;
executionRunId: string | null;
@ -656,7 +655,6 @@ const IssueDetailChatTab = memo(function IssueDetailChatTab({
issueId,
companyId,
projectId,
newestFirstIssueThreadEnabled,
issueWorkMode,
issueStatus,
executionRunId,
@ -857,7 +855,6 @@ const IssueDetailChatTab = memo(function IssueDetailChatTab({
) : null}
<IssueChatThread
composerRef={composerRef}
newestFirst={newestFirstIssueThreadEnabled}
comments={commentsWithRunMeta}
interactions={interactions}
feedbackVotes={feedbackVotes}
@ -1318,12 +1315,6 @@ export function IssueDetail() {
});
const resolvedHasActiveRun = issue ? shouldTrackIssueActiveRun(issue) && hasActiveRun : hasActiveRun;
const hasLiveRuns = liveRunCount > 0 || resolvedHasActiveRun;
const { data: experimentalSettings } = useQuery({
queryKey: queryKeys.instance.experimentalSettings,
queryFn: () => instanceSettingsApi.getExperimental(),
placeholderData: keepPreviousDataForSameQueryTail(issueId ?? "pending"),
});
const newestFirstIssueThreadEnabled = experimentalSettings?.enableNewestFirstIssueThread === true;
useEffect(() => {
if (!hasLiveRuns && locallyQueuedCommentRunIds.size > 0) {
setLocallyQueuedCommentRunIds(new Map());
@ -3790,7 +3781,6 @@ export function IssueDetail() {
issueId={issue.id}
companyId={issue.companyId}
projectId={issue.projectId ?? null}
newestFirstIssueThreadEnabled={newestFirstIssueThreadEnabled}
issueStatus={issue.status}
issueWorkMode={issue.workMode ?? "standard"}
executionRunId={issue.executionRunId ?? null}