boardx / boardx/workspacex

旧 Chat 屏已无可达路由:/chat/legacy 被 307,约 4000 行组件成死代码,灰度回退变单向门

Open
#3,024 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
969

Description

## 现象

`#2890`(`d30ac48e8`,2026-09-07)在 `apps/web/next.config.mjs` 里同时做了两件事:

1. 删掉 `beforeFiles` 里那条把 `/chat?projectId=` 改写到 `/chat/legacy` 的 rewrite;
2. 在 `redirects()` 里加了 `{ source: "/chat/legacy", destination: "/chat", permanent: false }`。

结果:**旧屏在产品里没有任何可达入口**。`ChatReadScreen` / `PersonalChatScreen` 的唯一渲染点是 `apps/web/app/chat/legacy/page.tsx`,而那条路由现在必然重定向走。

## 两个后果

### ① 灰度回退变成单向门

`app/chat/legacy/page.tsx` 的头注(#2890 之前写的)明确说:

> 本路由存在到 DA-19h(旧轨道退役,需人类再次确认)为止——不要因为它「旧」就顺手删,回退路径消失等于灰度变成单向门。

#2890 没有删文件,但把回退路径**关掉了**,效果一样,且没有走"人类再次确认"这一步。需要人类裁决:这是有意的旧轨道退役(那就把文件也清掉、把这段头注作废),还是回退路径应当恢复。

### ② 约 4000 行组件成为死代码

| 文件 | 行数 | 现状 |
| --- | --- | --- |
| `apps/web/components/chat/chat-live-message-panel.tsx` | 1911 | 无可达路由 |
| `apps/web/components/chat/chat-read-screen.tsx` | 1127 | 无可达路由 |
| `apps/web/components/chat/personal-chat-screen.tsx` | — | 无可达路由 |

连同 `message-context-snapshot.tsx` / `message-thinking-chain.tsx` / `MessageAttachments` 等只被它们消费的组件。它们同时是 v2 若干缺口(见本 issue 的兄弟 issue)的**现成参考实现**,所以不建议在缺口补齐之前删除——但也不该继续以"回退入口"的名义留在那里误导人。

## 已做的最小更正

issue #2997 的 PR 已就地更正 `app/chat/legacy/page.tsx` 的头注(原文说"由 `/chat/page.tsx` 分岔",而那个文件早在 #2067 就删了)。**删不删组件本身留给本 issue 裁决。**

Contributor guide

No contributing guide indexed for this repository

Research direction

Read apps/web/next.config.mjs and apps/web/app/chat/legacy/page.tsx first, then inspect the components listed in the issue and the changes from #2890 and #2997. Done means the project has an explicit decision to restore the fallback route or retire it, with the route note, configuration, and dead-code handling aligned with that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.