fix: keep western labels near their planets and chats on the current person
Independent Staging Quality Gate / validate (push) Failing after 6m46s
Independent Staging Quality Gate / publish (push) Skipped

Cap planet captions at 30 degrees with a third ring, fall back only within the current person's sessions, and load self when the people catalog fails.
This commit is contained in:
jesse-ux
2026-09-25 23:02:17 +08:00
parent b8712dad50
commit d08ffdc0a6
28 changed files with 538 additions and 545 deletions
+7 -26
View File
@@ -42,7 +42,8 @@ import { SidebarTrigger } from "@/components/ui/sidebar";
import { useHomeShellRegistration } from "@/hooks/use-home-shell-registration";
import { useSessionList } from "@/hooks/use-session-list";
import { composerDraftSnapshot, setComposerDraft } from "@/lib/composer-draft";
import { bindCurrentSubjectAccount, useCurrentSubjectProfile } from "@/lib/current-subject";
import { sessionMatchesSubject } from "@/lib/chat-profile-picker-model";
import { bindCurrentSubjectAccount, readCurrentSubjectId, useCurrentSubjectProfile } from "@/lib/current-subject";
import { DailyStarlanguageBinder } from "@/components/daily-starlanguage-binder";
import { NewChatDeepLink, SynastryDeepLink } from "@/components/people-home-links";
import { StarterEntries, StarterGreeting } from "@/components/starter-home";
@@ -327,7 +328,7 @@ export default function Home() {
});
const activeSession = sessions.find((session) => session.id === activeSessionId)
?? sessions.find((session) => session.sessionType !== "birth_time_rectification");
?? sessions.find((session) => session.sessionType !== "birth_time_rectification" && sessionMatchesSubject(session, readCurrentSubjectId()));
const activeRectificationSession = composerLocksAsRectification(activeSession, sessions);
const rectificationSurfaceOpen = Boolean(activeRectificationSession && activeSession && activeSession.id === rectificationSessionId);
const rectificationComposerLocked = Boolean(activeRectificationSession && !rectificationSurfaceOpen);
@@ -505,7 +506,7 @@ export default function Home() {
const {
status: chatProfileStatus,
markReady: markChatProfilesReady,
markFailed: markChatProfilesFailed,
markDegraded: markChatProfilesDegraded,
beginReload: beginChatProfileReload,
} = useChatProfileCatalog(accountId);
const subjectDeleted = chatSubjectSendBlocked({
@@ -529,8 +530,7 @@ export default function Home() {
})
.catch(() => {
if (chartLibraryLoadedAccount.current !== requested) return;
markChatProfilesFailed(requested);
setComposerNotice("星盘库暂时无法读取,请重试。");
markChatProfilesDegraded(requested);
});
}
@@ -560,26 +560,7 @@ export default function Home() {
})
.catch(() => {
if (chartLibraryLoadedAccount.current !== accountId) return;
markChatProfilesFailed(accountId);
setComposerNotice("星盘库暂时无法读取,请重试。", {
label: "重试",
onClick: () => {
beginChatProfileReload();
void fetchCloudChartLibrary()
.then((cloudLibrary) => {
if (chartLibraryLoadedAccount.current !== accountId) return;
const next = chartLibraryFromCloudOthers(cloudLibrary, profileForLibrary, upsertSelfChart);
setChartLibrary(next);
bindCurrentSubjectAccount(accountId, next.filter((record) => record.role === "other").map((record) => record.id));
markChatProfilesReady(accountId);
})
.catch(() => {
if (chartLibraryLoadedAccount.current !== accountId) return;
markChatProfilesFailed(accountId);
setComposerNotice("星盘库暂时无法读取,请重试。");
});
},
});
markChatProfilesDegraded(accountId);
});
void fetchCloudSynastryHistory()
.then((cloudHistory) => {
@@ -601,7 +582,7 @@ export default function Home() {
});
}
setChartLibrary((current) => upsertSelfChart(current, profileForLibrary));
}, [account, accountId, applyCloudSynastryHistory, beginChatProfileReload, clearSynastryHistory, markChatProfilesFailed, markChatProfilesReady, profile]);
}, [account, accountId, applyCloudSynastryHistory, beginChatProfileReload, clearSynastryHistory, markChatProfilesDegraded, markChatProfilesReady, profile]);
const profileComplete = isProfileComplete(profile);
const dailyProfile = useCurrentSubjectProfile(profile);