Skip to content

Conversation

@HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Dec 29, 2025

What does this PR do?

Before

image image

After

image image image image

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

  • New Features

    • IP addresses in session and activity tables are now copyable for easier sharing.
  • Improvements

    • Tables use responsive/min-width column sizing for better display across screen sizes and side-sheet states.
    • Consistent date/time formatting across activity views.
    • Email-only or anonymous users now display meaningful initials and email text instead of generic placeholders.
    • Side navigation may now appear on account routes for improved navigation access.

✏️ Tip: You can customize this high-level summary in your review settings.

@appwrite
Copy link

appwrite bot commented Dec 29, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Realtime gives you live updates for users, storage, functions, and databases

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Walkthrough

Four UI files were changed: two session list pages, the activity table component, and the console layout. InteractiveText from @appwrite.io/pink-svelte was added and used to render IP cells as copyable text. Table column width specs were converted from fixed pixels to min-width objects; actions column remains 100. activity.svelte gained a getColumnWidth helper, consolidated rendering into a single Table.Root, standardized user/avatar rendering (showing AvatarInitials with userEmail when userName is absent), preserved location fallback to "Unknown", and continued using toLocaleDateTime for dates. layout.svelte removed the account-path exclusion for side navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adjusting column widths for sessions and activity tables for smaller devices, which matches the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e57d7db and ba3dce0.

📒 Files selected for processing (1)
  • src/lib/layout/activity.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/layout/activity.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines 17 to 38
const columns: PinkColumn[] = [
{ id: 'user', ...(insideSideSheet ? { width: 140 } : {}) },
{ id: 'event', ...(insideSideSheet ? { width: 125 } : {}) },
{ id: 'location', ...(insideSideSheet ? { width: 100 } : {}) },
{ id: 'ip', ...(insideSideSheet ? { width: { min: 150 } } : {}) },
{ id: 'date', ...(insideSideSheet ? { width: { min: 200 } } : {}) }
{
id: 'user',
...(insideSideSheet ? { width: 140 } : { width: { min: 100 } })
},
{
id: 'event',
...(insideSideSheet ? { width: 125 } : { width: { min: 160 } })
},
{
id: 'location',
...(insideSideSheet ? { width: 100 } : { width: { min: 120 } })
},
{
id: 'ip',
...(insideSideSheet ? { width: { min: 150 } } : { width: { min: 250 } })
},
{
id: 'date',
...(insideSideSheet ? { width: { min: 200 } } : { width: { min: 180 } })
}
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make a method to return values based on the if/else check.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/lib/layout/activity.svelte (1)

17-35: Inconsistent width configuration strategy.

The function returns mixed types: fixed numbers for some columns (e.g., user: 140, event: 125) and { min: number } objects for others within the same context. This inconsistency can lead to unpredictable responsive behavior.

For consistent table layout behavior, consider using either all fixed widths or all min-width objects within each context (insideSheet vs. default).

🔎 Suggested approach for consistency
 function getColumnWidth(columnId: string): { width?: number | { min: number } } {
     const widthConfig: Record<
         string,
         { insideSheet: number | { min: number }; default: number | { min: number } }
     > = {
-        user: { insideSheet: 140, default: { min: 100 } },
-        event: { insideSheet: 125, default: { min: 160 } },
-        location: { insideSheet: 100, default: { min: 120 } },
+        user: { insideSheet: { min: 140 }, default: { min: 100 } },
+        event: { insideSheet: { min: 125 }, default: { min: 160 } },
+        location: { insideSheet: { min: 100 }, default: { min: 120 } },
         ip: { insideSheet: { min: 150 }, default: { min: 250 } },
         date: { insideSheet: { min: 200 }, default: { min: 180 } }
     };
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 781dfe5 and ce7564d.

📒 Files selected for processing (3)
  • src/lib/layout/activity.svelte
  • src/routes/(console)/account/sessions/+page.svelte
  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/account/sessions/+page.svelte
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
src/routes/**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
🧠 Learnings (4)
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/routes/**/*.svelte : Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Applied to files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
📚 Learning: 2025-09-30T07:41:06.679Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2425
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte:454-468
Timestamp: 2025-09-30T07:41:06.679Z
Learning: In `src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte`, the column suggestions API (console.suggestColumns) has a maximum limit of 7 columns returned, which aligns with the initial placeholder count of 7 in customColumns.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
📚 Learning: 2025-11-19T11:22:42.553Z
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.553Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Cursor integration URL format `https://cursor.com/link/prompt` with the `text` query parameter is correct and functional.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to **/*.svelte : Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Applied to files:

  • src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte
  • src/lib/layout/activity.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (6)
src/lib/layout/activity.svelte (3)

6-6: LGTM: InteractiveText import added correctly.

The import follows the coding guidelines and supports the new copyable IP functionality.


37-43: Good refactoring: method for column width logic.

The use of getColumnWidth to compute widths addresses the previous review feedback about extracting if/else logic into a method. The spread operator cleanly merges the width configuration with column IDs.

Based on learnings, this pattern aligns with the previous review suggestion to create methods for conditional logic.


52-98: InteractiveText component API usage is correct.

The props variant="copy", text, and isVisible are used consistently throughout the codebase with the same pattern (e.g., in sessions/+page.svelte, domains/recordTable.svelte, and other files displaying copyable text). The usage in the activity log table is correct.

src/routes/(console)/project-[region]-[project]/auth/user-[user]/sessions/+page.svelte (3)

3-10: LGTM: InteractiveText import added correctly.

The import addition follows the coding guidelines and maintains clean multiline formatting.


46-48: Excellent: Consistent responsive width strategy.

The column width updates use { min: number } objects consistently for all data columns while keeping the actions column fixed. This approach ensures predictable responsive behavior across different screen sizes.

This is cleaner and more consistent than the mixed approach in activity.svelte.


94-94: Good UX improvement: Copyable IP addresses.

The use of InteractiveText for IP addresses improves user experience by enabling easy copying. The implementation is consistent with the changes in activity.svelte.

export let databasesScreen = false;
export let useCreateLinkForPagination = true;
function getColumnWidth(columnId: string): { width?: number | { min: number } } {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the pinkcolumn type here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants