Skip to content

Comments

refactor: minor refactoring#86

Merged
DaxServer merged 1 commit intomainfrom
minor-refactor
Jul 23, 2025
Merged

refactor: minor refactoring#86
DaxServer merged 1 commit intomainfrom
minor-refactor

Conversation

@DaxServer
Copy link
Owner

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Sidebar now automatically hides when viewing a project for a cleaner interface.
  • Chores

    • Added a project configuration file for deployment setup.
  • Documentation

    • Updated testing standards to emphasize testing real implementations and avoiding logic or mocks in tests.
  • Refactor

    • Improved test setup and assertion styles for drag-drop and validation store tests for better consistency and isolation.
    • Renamed the store reset method for validation to enhance clarity and alignment with other stores.

Walkthrough

This update introduces new test guidelines, adds a Vercel project configuration, and refactors several frontend test files to improve test isolation by resetting Pinia store states before each test. Assertion styles in tests are made more expressive, and the validation store's reset function is renamed for consistency. The DefaultLayout now conditionally displays the Sidebar based on the current route.

Changes

File(s) Change Summary
.kiro/steering/code-conventions.md Added two new guidelines to the Testing Standards section: avoid mocking and avoid logic in tests.
.vercel/project.json Added new Vercel project configuration file with project name.
frontend/src/components/tests/ItemEditor.test.ts Added store.$reset() in beforeEach to ensure Pinia store state isolation in tests.
frontend/src/layouts/DefaultLayout.vue Added computed property to conditionally render Sidebar based on route; Sidebar hidden on 'ProjectView' route.
frontend/src/stores/tests/drag-drop.store.test.ts Refactored test setup to centralize store instance and reset; updated assertions to .toBeTrue()/.toBeFalse().
frontend/src/stores/tests/schema.store.test.ts Added store.$reset() in beforeEach for test isolation.
frontend/src/stores/tests/validation.store.test.ts Updated assertions to .toBeTrue()/.toBeFalse(); replaced clearAll() with $reset(); removed unused import.
frontend/src/stores/validation.store.ts Renamed clearAll() to $reset() for store reset; updated export accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App (DefaultLayout)
    participant Router
    participant Sidebar

    User->>App (DefaultLayout): Navigates to a route
    App (DefaultLayout)->>Router: Get current route name
    App (DefaultLayout)->>Sidebar: Render Sidebar if route ≠ 'ProjectView'
    Sidebar-->>App (DefaultLayout): Sidebar visible or hidden
Loading

Estimated code review effort

2 (~15 minutes)

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7df0618 and 643dc58.

📒 Files selected for processing (8)
  • .kiro/steering/code-conventions.md (1 hunks)
  • .vercel/project.json (1 hunks)
  • frontend/src/components/__tests__/ItemEditor.test.ts (1 hunks)
  • frontend/src/layouts/DefaultLayout.vue (1 hunks)
  • frontend/src/stores/__tests__/drag-drop.store.test.ts (8 hunks)
  • frontend/src/stores/__tests__/schema.store.test.ts (1 hunks)
  • frontend/src/stores/__tests__/validation.store.test.ts (10 hunks)
  • frontend/src/stores/validation.store.ts (2 hunks)
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript or JavaScript files
Do not use dotenv; Bun automatically loads .env files
Use Bun.serve() for HTTP servers and WebSockets instead of express
Use bun:sqlite for SQLite instead of better-sqlite3
Use Bun.redis for Redis instead of ioredis
Use Bun.sql for Postgres instead of pg or postgres.js
Use built-in WebSocket instead of ws
Prefer Bun.file over node:fs's readFile/writeFile
Use Bun.$ (e.g., Bun.$ls``) instead of execa for running shell commands

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/validation.store.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun test instead of jest for running tests

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for building HTML, TypeScript, or CSS files

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/validation.store.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state
Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components
.kiro/steering/code-conventions.md (3)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-20T14:13:40.153Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use bun test instead of jest for running tests

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Place composables in the composables/ directory

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use useApi composable (Elysia Eden) for all API calls

frontend/src/components/__tests__/ItemEditor.test.ts (5)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

frontend/src/stores/validation.store.ts (1)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

frontend/src/stores/__tests__/validation.store.test.ts (7)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-20T14:13:40.153Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use bun test instead of jest for running tests

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{ts,vue} : Type safety everywhere

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components

frontend/src/stores/__tests__/drag-drop.store.test.ts (4)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

frontend/src/layouts/DefaultLayout.vue (7)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use <script setup lang="ts"> at the top, template second, style last (rarely used) in Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Vue 3 with Composition API and <script setup lang="ts"> in all Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use readonly and shallowReactive for large or expensive data

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Use composables for logic that is not global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{ts,vue} : Type safety everywhere

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use useApi composable (Elysia Eden) for all API calls

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use v-memo, shallowRef, markRaw, and Suspense for performance optimization

frontend/src/stores/__tests__/schema.store.test.ts (3)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

🧬 Code Graph Analysis (1)
frontend/src/stores/__tests__/drag-drop.store.test.ts (1)
frontend/src/stores/drag-drop.store.ts (1)
  • useDragDropStore (10-174)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript or JavaScript files
Do not use dotenv; Bun automatically loads .env files
Use Bun.serve() for HTTP servers and WebSockets instead of express
Use bun:sqlite for SQLite instead of better-sqlite3
Use Bun.redis for Redis instead of ioredis
Use Bun.sql for Postgres instead of pg or postgres.js
Use built-in WebSocket instead of ws
Prefer Bun.file over node:fs's readFile/writeFile
Use Bun.$ (e.g., Bun.$ls``) instead of execa for running shell commands

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/validation.store.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun test instead of jest for running tests

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit Inference Engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for building HTML, TypeScript, or CSS files

Files:

  • frontend/src/components/__tests__/ItemEditor.test.ts
  • frontend/src/stores/validation.store.ts
  • frontend/src/stores/__tests__/validation.store.test.ts
  • frontend/src/stores/__tests__/drag-drop.store.test.ts
  • frontend/src/stores/__tests__/schema.store.test.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state
Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components
.kiro/steering/code-conventions.md (3)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-20T14:13:40.153Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use bun test instead of jest for running tests

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Place composables in the composables/ directory

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use useApi composable (Elysia Eden) for all API calls

frontend/src/components/__tests__/ItemEditor.test.ts (5)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

frontend/src/stores/validation.store.ts (1)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

frontend/src/stores/__tests__/validation.store.test.ts (7)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-20T14:13:40.153Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use bun test instead of jest for running tests

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{ts,vue} : Type safety everywhere

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Pinia for state management in all Vue components

frontend/src/stores/__tests__/drag-drop.store.test.ts (4)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not proxy or export Pinia store state/actions from composables

frontend/src/layouts/DefaultLayout.vue (7)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use <script setup lang="ts"> at the top, template second, style last (rarely used) in Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use Vue 3 with Composition API and <script setup lang="ts"> in all Vue components

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use readonly and shallowReactive for large or expensive data

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Use composables for logic that is not global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{ts,vue} : Type safety everywhere

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use useApi composable (Elysia Eden) for all API calls

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use v-memo, shallowRef, markRaw, and Suspense for performance optimization

frontend/src/stores/__tests__/schema.store.test.ts (3)

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.{vue,ts} : Use Pinia stores for global state

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/composables/**/*.ts : Do not export store state from composables

Learnt from: CR
PR: DaxServer/dataforge#0
File: .cursor/rules/frontend-setup.rule.md:0-0
Timestamp: 2025-07-20T14:13:24.706Z
Learning: Applies to src/**/*.vue : Use storeToRefs for state in components

🧬 Code Graph Analysis (1)
frontend/src/stores/__tests__/drag-drop.store.test.ts (1)
frontend/src/stores/drag-drop.store.ts (1)
  • useDragDropStore (10-174)
🔇 Additional comments (12)
.kiro/steering/code-conventions.md (1)

153-154: Excellent addition of testing best practices.

These guidelines promote robust testing by encouraging real implementation testing and keeping tests focused on behavior verification without embedded logic. This aligns well with the test improvements seen across the frontend test files.

frontend/src/stores/validation.store.ts (2)

62-65: LGTM: Improved API consistency with Pinia conventions.

Renaming clearAll() to $reset() aligns with Pinia's conventional naming patterns for reset methods. The $ prefix appropriately indicates this is a system/special method, and the functionality remains unchanged.


111-111: LGTM: Export updated to match renamed method.

The export correctly reflects the method rename from clearAll to $reset, maintaining API consistency.

.vercel/project.json (1)

1-1: LGTM: Standard Vercel project configuration.

This is a properly formatted Vercel project configuration file with the required project name identifier.

frontend/src/components/__tests__/ItemEditor.test.ts (1)

43-43: LGTM: Excellent test isolation improvement.

Adding store.$reset() in the beforeEach hook ensures each test starts with a clean store state, preventing state leakage between tests. This aligns with the new testing guidelines and uses the properly renamed $reset() method.

frontend/src/stores/__tests__/schema.store.test.ts (1)

51-51: LGTM: Consistent test isolation pattern.

Adding store.$reset() in the beforeEach hook maintains consistency with other test files and ensures proper test isolation by resetting store state before each test.

frontend/src/stores/__tests__/validation.store.test.ts (3)

4-4: Good cleanup of unused import.

Removing the unused ValidationContext type import improves code cleanliness.


352-352: Excellent alignment with Pinia conventions.

Using $reset() instead of a custom clearAll() method aligns with Pinia's built-in store reset functionality, improving consistency across the codebase.


387-387: Improved assertion expressiveness.

The change from .toBe(true/false) to .toBeTrue()/.toBeFalse() makes the test assertions more expressive and follows testing best practices.

Also applies to: 419-419, 434-435, 448-449, 495-495, 505-505, 509-509, 519-519, 559-559

frontend/src/layouts/DefaultLayout.vue (1)

12-12: Clean conditional rendering implementation.

The v-if="showSidebar" directive provides an elegant solution for hiding the sidebar on the ProjectView route, improving the user experience by maximizing screen real estate for project viewing.

frontend/src/stores/__tests__/drag-drop.store.test.ts (2)

10-10: Excellent test isolation improvement.

Adding centralized store initialization with $reset() in beforeEach ensures each test starts with a clean state, preventing test interference and improving reliability.

Also applies to: 16-18


67-69: Consistent and expressive assertion style.

The systematic replacement of .toBe(true/false) with .toBeTrue()/.toBeFalse() throughout the test suite improves readability and follows testing best practices. This change maintains the same test coverage while making assertions more expressive.

Also applies to: 80-80, 82-82, 99-100, 114-114, 118-118, 122-123, 233-233, 236-236, 239-239, 242-242, 246-246, 249-249, 252-252, 255-255, 259-259, 264-264, 267-267, 294-296, 352-352, 377-377, 383-383, 389-389, 395-395

Comment on lines +1 to +8
<script setup lang="ts">
const route = useRoute()

// Hide sidebar when viewing a project
const showSidebar = computed(() => {
return route.name !== 'ProjectView'
})
</script>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add missing imports for Vue composables.

The code uses useRoute() and computed() but doesn't import them. Add the necessary imports:

<script setup lang="ts">
+import { computed } from 'vue'
+import { useRoute } from 'vue-router'
+
const route = useRoute()

// Hide sidebar when viewing a project
const showSidebar = computed(() => {
  return route.name !== 'ProjectView'
})
</script>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<script setup lang="ts">
const route = useRoute()
// Hide sidebar when viewing a project
const showSidebar = computed(() => {
return route.name !== 'ProjectView'
})
</script>
<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
// Hide sidebar when viewing a project
const showSidebar = computed(() => {
return route.name !== 'ProjectView'
})
</script>
🤖 Prompt for AI Agents
In frontend/src/layouts/DefaultLayout.vue lines 1 to 8, the code uses the Vue
composables useRoute() and computed() without importing them. Fix this by adding
the appropriate import statements at the top of the script section: import {
useRoute, computed } from 'vue-router' or 'vue' as applicable, ensuring both
functions are properly imported before usage.

@DaxServer DaxServer merged commit 7023574 into main Jul 23, 2025
5 checks passed
@DaxServer DaxServer deleted the minor-refactor branch July 23, 2025 16:22
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.

1 participant