Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/app/api/v1/endpoints/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async def register(user_data: UserCreate, db: AsyncSession = Depends(get_db)):
password=hashed_password,
username=user_data.username,
# New users should start on the latest schema version
version="0.4.1",
version="0.6.0",
)
await user.save(db)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SettingsInitializer(UserInitializerBase):
"description": "Footer copyright line content",
"category": "ui",
"type": "object",
"default_value": '{"text": "© 2025 BrainDrive"}',
"default_value": '{"text": "AIs can make mistakes. Check important info."}',
"allowed_scopes": '["system", "user"]',
"validation": None,
"is_multiple": False,
Expand Down Expand Up @@ -130,7 +130,7 @@ class SettingsInitializer(UserInitializerBase):
{
"definition_id": "copyright_settings",
"name": "Copyright",
"value": '{"text": "© 2025 BrainDrive"}',
"value": '{"text": "AIs can make mistakes. Check important info."}',
"scope": "user",
"page_id": None
},
Expand Down
35 changes: 35 additions & 0 deletions backend/app/core/user_updater/updaters/settings_to_v060.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import logging
from sqlalchemy.ext.asyncio import AsyncSession

from app.core.user_updater.base import UserUpdaterBase
from app.core.user_updater.registry import register_updater

logger = logging.getLogger(__name__)


class SettingsToV060(UserUpdaterBase):
"""Update users from version 0.4.5 to 0.6.0."""

name = "settings_to_v060"
description = "Update users to version 0.6.0"
from_version = "0.4.5"
to_version = "0.6.0"
priority = 1200

async def apply(self, user_id: str, db: AsyncSession, **kwargs) -> bool:
"""Apply the update for the given user."""
try:
logger.info("Updating user %s from version 0.4.5 to 0.6.0", user_id)

# Add migration logic here if needed for 0.6.0
# Currently this is a no-op version bump.

logger.info("Successfully updated user %s to version 0.6.0", user_id)
return True
except Exception as e:
logger.error("Error applying SettingsToV060 updater for %s: %s", user_id, e)
return False


register_updater(SettingsToV060)

2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DashboardLayout = () => {
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const [sidebarOpen, setSidebarOpen] = useState(!isMobile);
const settingsService = useSettings();
const defaultCopyright = { text: '© 2025 BrainDrive' };
const defaultCopyright = { text: 'AIs can make mistakes. Check important info.' };
const [copyright, setCopyright] = useState(defaultCopyright);

// Update sidebar state when screen size changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ViewModeSelector } from './ViewModeSelector';
import { PageSelector } from './PageSelector';
import { ToolbarActions } from './ToolbarActions';
import { usePluginStudio } from '../../hooks';
import './hidden-icons.css';
import AddIcon from '@mui/icons-material/Add';
import WarningIcon from '@mui/icons-material/Warning';
import SaveIcon from '@mui/icons-material/Save';
Expand Down Expand Up @@ -274,4 +275,4 @@ export const GridToolbar: React.FC<GridToolbarProps> = ({ onSave }) => {
</Box>
</Box>
);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const ToolbarActions: React.FC<ToolbarActionsProps> = ({
onClick={() => onPreviewModeChange(!previewMode)}
color={previewMode ? "primary" : "default"}
size="small"
className="ps-toolbar-icon--hidden"
>
{previewMode ? <VisibilityIcon /> : <VisibilityOffIcon />}
</IconButton>
Expand Down Expand Up @@ -99,4 +100,4 @@ export const ToolbarActions: React.FC<ToolbarActionsProps> = ({
)}
</Box>
);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
onDoubleClick={() => handleViewModeDoubleClick('mobile')}
color={viewMode.type === 'mobile' ? 'primary' : 'default'}
size="small"
className="ps-toolbar-icon--hidden"
>
<SmartphoneIcon />
</IconButton>
Expand All @@ -58,6 +59,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
onDoubleClick={() => handleViewModeDoubleClick('tablet')}
color={viewMode.type === 'tablet' ? 'primary' : 'default'}
size="small"
className="ps-toolbar-icon--hidden"
>
<TabletIcon />
</IconButton>
Expand All @@ -69,6 +71,7 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
onDoubleClick={() => handleViewModeDoubleClick('desktop')}
color={viewMode.type === 'desktop' ? 'primary' : 'default'}
size="small"
className="ps-toolbar-icon--hidden"
>
<DesktopWindowsIcon />
</IconButton>
Expand All @@ -88,4 +91,4 @@ export const ViewModeSelector: React.FC<ViewModeSelectorProps> = ({
</Box>
</Box>
);
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.ps-toolbar-icon--hidden {
visibility: hidden; /* keep layout size, hide visuals */
pointer-events: none; /* prevent interaction */
}

10 changes: 7 additions & 3 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ body {
user-select: none;
}

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

.react-resizable-handle {
position: absolute;
Expand Down