Skip to content

Commit cc25ac2

Browse files
authored
Merge pull request #71 from BrainDriveAI/chore/small-cleanups
Chore: Update to version 0.6.0 and UI cleanup for plugin studio
2 parents 0882e18 + b4c7cac commit cc25ac2

File tree

9 files changed

+59
-10
lines changed

9 files changed

+59
-10
lines changed

backend/app/api/v1/endpoints/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ async def register(user_data: UserCreate, db: AsyncSession = Depends(get_db)):
216216
password=hashed_password,
217217
username=user_data.username,
218218
# New users should start on the latest schema version
219-
version="0.4.1",
219+
version="0.6.0",
220220
)
221221
await user.save(db)
222222

backend/app/core/user_initializer/initializers/settings_initializer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class SettingsInitializer(UserInitializerBase):
7272
"description": "Footer copyright line content",
7373
"category": "ui",
7474
"type": "object",
75-
"default_value": '{"text": "© 2025 BrainDrive"}',
75+
"default_value": '{"text": "AIs can make mistakes. Check important info."}',
7676
"allowed_scopes": '["system", "user"]',
7777
"validation": None,
7878
"is_multiple": False,
@@ -130,7 +130,7 @@ class SettingsInitializer(UserInitializerBase):
130130
{
131131
"definition_id": "copyright_settings",
132132
"name": "Copyright",
133-
"value": '{"text": "© 2025 BrainDrive"}',
133+
"value": '{"text": "AIs can make mistakes. Check important info."}',
134134
"scope": "user",
135135
"page_id": None
136136
},
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import logging
2+
from sqlalchemy.ext.asyncio import AsyncSession
3+
4+
from app.core.user_updater.base import UserUpdaterBase
5+
from app.core.user_updater.registry import register_updater
6+
7+
logger = logging.getLogger(__name__)
8+
9+
10+
class SettingsToV060(UserUpdaterBase):
11+
"""Update users from version 0.4.5 to 0.6.0."""
12+
13+
name = "settings_to_v060"
14+
description = "Update users to version 0.6.0"
15+
from_version = "0.4.5"
16+
to_version = "0.6.0"
17+
priority = 1200
18+
19+
async def apply(self, user_id: str, db: AsyncSession, **kwargs) -> bool:
20+
"""Apply the update for the given user."""
21+
try:
22+
logger.info("Updating user %s from version 0.4.5 to 0.6.0", user_id)
23+
24+
# Add migration logic here if needed for 0.6.0
25+
# Currently this is a no-op version bump.
26+
27+
logger.info("Successfully updated user %s to version 0.6.0", user_id)
28+
return True
29+
except Exception as e:
30+
logger.error("Error applying SettingsToV060 updater for %s: %s", user_id, e)
31+
return False
32+
33+
34+
register_updater(SettingsToV060)
35+

frontend/src/components/dashboard/DashboardLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const DashboardLayout = () => {
1313
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
1414
const [sidebarOpen, setSidebarOpen] = useState(!isMobile);
1515
const settingsService = useSettings();
16-
const defaultCopyright = { text: '© 2025 BrainDrive' };
16+
const defaultCopyright = { text: 'AIs can make mistakes. Check important info.' };
1717
const [copyright, setCopyright] = useState(defaultCopyright);
1818

1919
// Update sidebar state when screen size changes

frontend/src/features/plugin-studio/components/grid-toolbar/GridToolbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ViewModeSelector } from './ViewModeSelector';
44
import { PageSelector } from './PageSelector';
55
import { ToolbarActions } from './ToolbarActions';
66
import { usePluginStudio } from '../../hooks';
7+
import './hidden-icons.css';
78
import AddIcon from '@mui/icons-material/Add';
89
import WarningIcon from '@mui/icons-material/Warning';
910
import SaveIcon from '@mui/icons-material/Save';
@@ -274,4 +275,4 @@ export const GridToolbar: React.FC<GridToolbarProps> = ({ onSave }) => {
274275
</Box>
275276
</Box>
276277
);
277-
};
278+
};

frontend/src/features/plugin-studio/components/grid-toolbar/ToolbarActions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const ToolbarActions: React.FC<ToolbarActionsProps> = ({
5151
onClick={() => onPreviewModeChange(!previewMode)}
5252
color={previewMode ? "primary" : "default"}
5353
size="small"
54+
className="ps-toolbar-icon--hidden"
5455
>
5556
{previewMode ? <VisibilityIcon /> : <VisibilityOffIcon />}
5657
</IconButton>
@@ -99,4 +100,4 @@ export const ToolbarActions: React.FC<ToolbarActionsProps> = ({
99100
)}
100101
</Box>
101102
);
102-
};
103+
};

frontend/src/features/plugin-studio/components/grid-toolbar/ViewModeSelector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
4747
onDoubleClick={() => handleViewModeDoubleClick('mobile')}
4848
color={viewMode.type === 'mobile' ? 'primary' : 'default'}
4949
size="small"
50+
className="ps-toolbar-icon--hidden"
5051
>
5152
<SmartphoneIcon />
5253
</IconButton>
@@ -58,6 +59,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
5859
onDoubleClick={() => handleViewModeDoubleClick('tablet')}
5960
color={viewMode.type === 'tablet' ? 'primary' : 'default'}
6061
size="small"
62+
className="ps-toolbar-icon--hidden"
6163
>
6264
<TabletIcon />
6365
</IconButton>
@@ -69,6 +71,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
6971
onDoubleClick={() => handleViewModeDoubleClick('desktop')}
7072
color={viewMode.type === 'desktop' ? 'primary' : 'default'}
7173
size="small"
74+
className="ps-toolbar-icon--hidden"
7275
>
7376
<DesktopWindowsIcon />
7477
</IconButton>
@@ -88,4 +91,4 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
8891
</Box>
8992
</Box>
9093
);
91-
};
94+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.ps-toolbar-icon--hidden {
2+
visibility: hidden; /* keep layout size, hide visuals */
3+
pointer-events: none; /* prevent interaction */
4+
}
5+

frontend/src/index.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ body {
4040
user-select: none;
4141
}
4242

43-
.react-grid-item:hover {
44-
border-color: #999;
45-
}
43+
/*
44+
Removed hover border effect to avoid white border flash on modules
45+
when hovering in published/runtime pages. Styling for hover states in
46+
editor contexts is handled by scoped styles under the unified page
47+
renderer (e.g., PluginStudioAdapter). Keeping global hover neutral
48+
prevents unintended visual changes in dark mode.
49+
*/
4650

4751
.react-resizable-handle {
4852
position: absolute;

0 commit comments

Comments
 (0)