)
}
@@ -256,19 +264,28 @@ export function DynamicPropertiesPanel({
}, [onAddProperty])
return (
-
+
+ {/* Editable properties section */}
{propertyEntries.map(([key, value]) => (
))}
-
-
{showAddDialog
?
setShowAddDialog(false)} />
: setShowAddDialog(true)} disabled={!onAddProperty} />
}
+ {/* Read-only Info section */}
+
)
}
diff --git a/src/components/Inspector.test.tsx b/src/components/Inspector.test.tsx
index d7e31820..0d771cfa 100644
--- a/src/components/Inspector.test.tsx
+++ b/src/components/Inspector.test.tsx
@@ -279,4 +279,49 @@ This is a test note with some words to count.
)
expect(screen.getByText('No revision history')).toBeInTheDocument()
})
+
+ it('shows separate Info section with read-only metadata', () => {
+ render(
+
+ )
+ expect(screen.getByText('Info')).toBeInTheDocument()
+ expect(screen.getByText('Modified')).toBeInTheDocument()
+ expect(screen.getByText('Created')).toBeInTheDocument()
+ expect(screen.getByText('Size')).toBeInTheDocument()
+ })
+
+ it('renders editable properties with interactive styling', () => {
+ render(
+
+ )
+ const editableRows = screen.getAllByTestId('editable-property')
+ expect(editableRows.length).toBeGreaterThan(0)
+ editableRows.forEach(row => {
+ expect(row.className).toContain('hover:bg-muted')
+ })
+ })
+
+ it('renders read-only properties with muted non-interactive styling', () => {
+ render(
+
+ )
+ const readOnlyRows = screen.getAllByTestId('readonly-property')
+ expect(readOnlyRows.length).toBe(4) // Modified, Created, Words, Size
+ readOnlyRows.forEach(row => {
+ expect(row.className).not.toContain('hover:bg-muted')
+ expect(row.className).not.toContain('cursor-pointer')
+ })
+ })
})