- Generating Formats ({progress.completed}/{progress.total})
+ Generating Formats (Format {progress.currentPosition} of {progress.total})
{progress.active && `Currently processing: ${getFormatLabels([progress.active])}`}
@@ -404,8 +409,6 @@ export const FormattedOutput = ({
const isFormatLoading = isLoading?.get(format) ?? false
const isFormatExpanded = expandedFormats.has(format)
- console.log(`[FormattedOutput RENDER FormatSection] format: ${format}, content length: ${content.length}, isLoading: ${isFormatLoading}, isExpanded: ${isFormatExpanded}`)
-
return (
-
Quick Presets
-
Common format combinations
+
Quick Presets
+
Common format combinations
{selectedPresetId && (
@@ -78,8 +78,8 @@ export const FormatPresetSelector = ({
disabled={disabled}
className={`rounded-xl border px-4 py-3 text-left transition hc-surface ${
isSelected
- ? 'border-synapse-500 bg-synapse-50 shadow-soft hc-surface--active'
- : 'border-neutral-200 hover:border-neutral-300 hover:bg-neutral-50'
+ ? 'border-synapse-500 bg-synapse-50 shadow-soft hc-surface--active dark:border-synapse-400 dark:bg-synapse-900/30'
+ : 'border-neutral-200 hover:border-neutral-300 hover:bg-neutral-50 dark:border-neutral-700 dark:hover:border-neutral-500 dark:hover:bg-neutral-800/60'
} ${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'}`}
aria-pressed={isSelected}
>
@@ -88,7 +88,9 @@ export const FormatPresetSelector = ({
diff --git a/src/components/preferences/FormatPreviewCard.tsx b/src/components/preferences/FormatPreviewCard.tsx
index 7abe4b5..0f13fd6 100644
--- a/src/components/preferences/FormatPreviewCard.tsx
+++ b/src/components/preferences/FormatPreviewCard.tsx
@@ -64,8 +64,8 @@ export const FormatPreviewCard = ({
disabled={disabled}
className={`flex h-full flex-col items-start rounded-2xl border px-5 py-4 text-left transition hc-surface ${
isSelected
- ? 'border-primary-600 bg-primary-50 shadow-[0_0_0_4px_rgba(59,130,246,0.15)] hc-surface--active'
- : 'border-neutral-200 hover:border-neutral-300 hover:bg-neutral-50'
+ ? 'border-primary-600 bg-primary-50 shadow-[0_0_0_4px_rgba(59,130,246,0.15)] hc-surface--active dark:border-primary-400 dark:bg-primary-900/30 dark:shadow-[0_0_0_4px_rgba(56,189,248,0.25)]'
+ : 'border-neutral-200 hover:border-neutral-300 hover:bg-neutral-50 dark:border-neutral-700 dark:hover:border-neutral-500 dark:hover:bg-neutral-800/60'
} ${disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'}`}
aria-pressed={isSelected}
>
@@ -76,13 +76,15 @@ export const FormatPreviewCard = ({
-
{config.label}
+ {config.label}
{isSelected && (
-
+
Selected
)}
@@ -119,14 +121,14 @@ export const FormatPreviewCard = ({
{/* Description */}
-
{config.description}
+
{config.description}
{/* Preview */}
-
-
+
+
Preview
-
+
{config.preview}
diff --git a/src/components/preferences/FormatSelector.tsx b/src/components/preferences/FormatSelector.tsx
index 8612808..130ff0c 100644
--- a/src/components/preferences/FormatSelector.tsx
+++ b/src/components/preferences/FormatSelector.tsx
@@ -25,32 +25,23 @@ export const FormatSelector = ({
const handleFormatToggle = (type: FormatType) => {
const isSelected = selectedFormats.includes(type)
- // If toggling summary
- if (type === 'summary') {
- if (isSelected) {
- // Deselecting summary
- onChangeFormats(selectedFormats.filter((f) => f !== type))
- } else {
- // Selecting summary - replace all other formats
- onChangeFormats(['summary'])
+ let updatedFormats: FormatType[]
+
+ if (isSelected) {
+ const next = selectedFormats.filter((format) => format !== type)
+
+ // Prevent empty selection – keep at least one format
+ if (next.length === 0) {
+ return
}
+
+ updatedFormats = next
} else {
- // Toggling a non-summary format
- if (isSelected) {
- // Deselecting this format - prevent empty selection
- const newFormats = selectedFormats.filter((f) => f !== type)
- if (newFormats.length > 0) {
- onChangeFormats(newFormats)
- }
- // If this would result in empty selection, do nothing (keep at least one format)
- } else {
- // Selecting this format - remove summary if present
- const newFormats = selectedFormats.filter((f) => f !== 'summary')
- onChangeFormats([...newFormats, type])
- }
+ updatedFormats = [...selectedFormats, type]
}
- // Clear preset when manual selection changes
+ onChangeFormats(updatedFormats)
+
if (selectedPreset) {
onChangePreset(null)
}
@@ -76,10 +67,12 @@ export const FormatSelector = ({
{/* Divider */}
- or choose individual formats
+
+ or choose individual formats
+
@@ -97,10 +90,10 @@ export const FormatSelector = ({
{/* Selected formats summary */}
{selectedFormats.length > 0 && isValidFormatCombination(selectedFormats) && (
-
+
-
+
{selectedFormats.length} format{selectedFormats.length > 1 ? 's' : ''} selected
-
+
Your content will be restructured into: {getFormatLabels(selectedFormats)}
@@ -127,10 +120,10 @@ export const FormatSelector = ({
{/* Warning for invalid combinations */}
{!isValidFormatCombination(selectedFormats) && (
-
+
-
Invalid format combination
-
+
Invalid format combination
+
Please select at least one format.
diff --git a/src/components/ui/MultiFormatProgress.tsx b/src/components/ui/MultiFormatProgress.tsx
index a0dd1cc..bf81bc5 100644
--- a/src/components/ui/MultiFormatProgress.tsx
+++ b/src/components/ui/MultiFormatProgress.tsx
@@ -111,7 +111,9 @@ export const MultiFormatProgress = ({
Overall Progress
- {aggregate.completedCount} of {aggregate.totalCount} formats
+ {aggregate.currentFormat
+ ? `Format ${Math.min(aggregate.completedCount + 1, aggregate.totalCount)} of ${aggregate.totalCount}`
+ : `${aggregate.completedCount} of ${aggregate.totalCount} formats complete`}
{
render()
expect(screen.getByText('Overall Progress')).toBeInTheDocument()
- expect(screen.getByText('1 of 3 formats')).toBeInTheDocument()
+ expect(screen.getByText('Format 2 of 3')).toBeInTheDocument()
expect(screen.getByText(/currently processing: bullet points/i)).toBeInTheDocument()
})
diff --git a/src/components/workspace/FormatQuickSelector.tsx b/src/components/workspace/FormatQuickSelector.tsx
index 692eaac..9cec947 100644
--- a/src/components/workspace/FormatQuickSelector.tsx
+++ b/src/components/workspace/FormatQuickSelector.tsx
@@ -1,4 +1,5 @@
import { useId, useState } from 'react'
+import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent } from 'react'
import { InlineHelp } from '@/components/common/InlineHelp'
import type { FormatType } from '@/lib/chrome-ai/types'
import { FORMAT_OPTIONS, FORMAT_PRESETS, getFormatLabels } from '@/constants/formats'
@@ -11,18 +12,34 @@ interface PreviewTooltipProps {
const PreviewTooltip = ({ preview, label }: PreviewTooltipProps) => {
const [show, setShow] = useState(false)
+ const handleOpen = () => setShow(true)
+ const handleClose = () => setShow(false)
+ const handleToggle = (event?: ReactMouseEvent | ReactKeyboardEvent) => {
+ if (event) {
+ event.stopPropagation()
+ event.preventDefault()
+ }
+ setShow((prev) => !prev)
+ }
+
return (
-