Bind dashboard secret operations to the explicitly selected project. - Include project identity in secrets and sync-passphrase requests. - Reject missing project IDs before fallback project-store resolution. - Prevent stale cross-project UI responses and document recovery guidance. Files changed: .changeset/fn-8808-secrets-project-binding.md | 7 + docs/secrets.md | 6 + packages/dashboard/app/components/SecretsView.tsx | 134 ++++++++++++++----- .../dashboard/app/components/SettingsModal.tsx | 2 +- .../__tests__/SecretsView.mobile.test.tsx | 9 ++ .../app/components/__tests__/SecretsView.test.tsx | 137 ++++++++++++++++++++ .../__tests__/SettingsModal.mcp.test.tsx | 69 +++++++++- .../__tests__/SettingsModal.test-harness.tsx | 8 +- .../app/components/dashboard/MainContent.tsx | 2 +- .../app/components/overflowViewRegistry.tsx | 2 +- .../settings/sections/McpServersCard.tsx | 58 +++++++-- .../settings/sections/SecretsSection.tsx | 5 +- .../__tests__/register-secrets-routes.test.ts | 142 +++++++++++++++++++-- .../src/routes/register-secrets-routes.ts | 53 +++++--- 14 files changed, 551 insertions(+), 83 deletions(-) Fusion-Task-Id: FN-8808 Fusion-Task-Lineage: dd224dbe-46a5-49a6-b6e9-5d5bbe4e742e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
28 lines
898 B
TypeScript
28 lines
898 B
TypeScript
/**
|
|
* Secrets section (U9 / KTD-10).
|
|
*
|
|
* Thin Project-group wrapper around the self-contained SecretsView card. Carries
|
|
* no modal form state — the shell owns persistence; this section only titles and
|
|
* mounts the relocated card (mirrors the RuntimesSections convention).
|
|
*/
|
|
import { useTranslation } from "react-i18next";
|
|
import { SecretsView } from "../../SecretsView";
|
|
import type { ToastType } from "../../../hooks/useToast";
|
|
|
|
export interface SecretsSectionProps {
|
|
addToast: (message: string, type?: ToastType) => void;
|
|
projectId?: string;
|
|
}
|
|
|
|
export function SecretsSection({ addToast, projectId }: SecretsSectionProps) {
|
|
const { t } = useTranslation("app");
|
|
return (
|
|
<>
|
|
<h4 className="settings-section-heading">{t("settings.nav.secrets", "Secrets")}</h4>
|
|
<SecretsView addToast={addToast} projectId={projectId} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default SecretsSection;
|