Conversation
Console (appwrite/console)Project ID: Tip Schedule functions to run as often as every minute with cron expressions |
WalkthroughA single UI adjustment to a database management interface. The "Key" column width properties in a spreadsheet header are increased from 200 to 280 pixels for non-small viewports. Both the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/view.svelte:
- Around line 77-78: The saved column width from getColumnWidth('key',
$isSmallViewport ? 250 : 280) can be smaller than the new desktop minimum, so
enforce the minimum when applying persisted widths by taking the max between the
persisted value and the intended minimum; update the assignment that sets
minimumWidth and the width calculation for the 'key' column (referring to
getColumnWidth, minimumWidth and $isSmallViewport) so the effective width is
Math.max(persistedWidth, $isSmallViewport ? 250 : 280) (and set minimumWidth to
$isSmallViewport ? 250 : 280) to ensure returning users get at least the new
desktop minimum.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b49566a-1875-493a-acbc-486b006d6d99
📒 Files selected for processing (1)
src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/view.svelte
| width: getColumnWidth('key', $isSmallViewport ? 250 : 280), | ||
| minimumWidth: $isSmallViewport ? 250 : 280, |
There was a problem hiding this comment.
Persisted widths can bypass the new desktop minimum
On Line 77, getColumnWidth can return an older saved width (e.g., 200), so the widened default at Line 78 (280) won’t apply for returning users. That means the PR fix may not take effect when a prior preference exists.
Proposed fix
function getColumnWidth(columnId: string, defaultWidth: number): number {
const savedWidth = columnsWidth?.[columnId];
if (!savedWidth) return defaultWidth;
- return savedWidth.resized;
+ return Math.max(savedWidth.resized, defaultWidth);
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@src/routes/`(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/view.svelte
around lines 77 - 78, The saved column width from getColumnWidth('key',
$isSmallViewport ? 250 : 280) can be smaller than the new desktop minimum, so
enforce the minimum when applying persisted widths by taking the max between the
persisted value and the intended minimum; update the assignment that sets
minimumWidth and the width calculation for the 'key' column (referring to
getColumnWidth, minimumWidth and $isSmallViewport) so the effective width is
Math.max(persistedWidth, $isSmallViewport ? 250 : 280) (and set minimumWidth to
$isSmallViewport ? 250 : 280) to ensure returning users get at least the new
desktop minimum.

What does this PR do?
BEFORE
AFTER
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit