fix(FN-1488): add showQuickChatFAB setting to control Quick Chat FAB visibility

- Add showQuickChatFAB boolean setting to ProjectSettings type
- Add useAppSettings hook function for accessing the setting
- Wire QuickChatFAB visibility in App.tsx based on setting
- Hide QuickChatFAB in MobileNavBar when setting is false
- Add Settings UI toggle for the new setting
- Add CSS for hiding QuickChatFAB on mobile when disabled
- Add comprehensive tests for all affected components
- Fix QuickChatFAB onOpenChange test to use controlled mode
- Update settings reference documentation
This commit is contained in:
gsxdsm
2026-04-11 00:18:22 -07:00
parent 5efe862c68
commit afa2e153ee
15 changed files with 271 additions and 13 deletions

View File

@@ -99,6 +99,7 @@ const PROJECT_KEYS: (keyof ProjectSettings)[] = [
"reflectionIntervalMs",
"reflectionAfterTask",
"reviewHandoffPolicy",
"showQuickChatFAB",
];
function assertExactKeyCoverage(scopeName: string, actual: readonly string[], expected: readonly string[]): void {

View File

@@ -1144,6 +1144,10 @@ export interface ProjectSettings {
* - "always": Always handoff after completion (not implemented, reserved for future)
*/
reviewHandoffPolicy?: "disabled" | "comment-triggered" | "always";
/** When true, show the quick-chat floating action button (FAB) in the dashboard.
* When false, the FAB is hidden but chat remains accessible via the More menu.
* Default: true. */
showQuickChatFAB?: boolean;
}
/**
@@ -1255,6 +1259,7 @@ export const DEFAULT_PROJECT_SETTINGS: ProjectSettings = {
reflectionIntervalMs: 3_600_000,
reflectionAfterTask: true,
reviewHandoffPolicy: "disabled",
showQuickChatFAB: true,
};
/**
@@ -1361,6 +1366,7 @@ export const PROJECT_SETTINGS_KEYS: ReadonlyArray<keyof ProjectSettings> = [
"reflectionIntervalMs",
"reflectionAfterTask",
"reviewHandoffPolicy",
"showQuickChatFAB",
] as const;
// ── Compile-time parity: ensures every interface key is listed exactly once ──