Strip pin metadata from web conversations

This commit is contained in:
kris
2026-04-11 03:05:37 +08:00
parent 5bf745f45f
commit e0c0ea1814
4 changed files with 100 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ import {
StatusBar,
} from "@/components/app-ui";
import { requirePageSession } from "@/lib/boss-auth";
import { getConversationHomeItems } from "@/lib/boss-projections";
import { getConversationWebItems } from "@/lib/boss-projections";
import { readState } from "@/lib/boss-data";
export const dynamic = "force-dynamic";
@@ -15,7 +15,7 @@ export const dynamic = "force-dynamic";
export default async function ConversationsPage() {
await requirePageSession();
const state = await readState();
const conversations = getConversationHomeItems(state);
const conversations = getConversationWebItems(state);
return (
<AppShell>

View File

@@ -660,6 +660,14 @@ export function getConversationHomeItems(state: BossState): ConversationItem[] {
return sortConversationItems(passthrough);
}
export function getConversationWebItems(state: BossState): ConversationItem[] {
return getConversationHomeItems(state).map((item) => ({
...item,
topPinnedLabel: undefined,
manualPinned: false,
}));
}
export function getConversationHomeItemForProject(state: BossState, projectId: string): ConversationItem | null {
const normalizedProjectId = projectId.trim();
if (!normalizedProjectId) {