Skip to content

chore: nuxt updated#133

Merged
hmbanan666 merged 1 commit intomainfrom
nuxt-update
Sep 4, 2025
Merged

chore: nuxt updated#133
hmbanan666 merged 1 commit intomainfrom
nuxt-update

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Sep 4, 2025

Summary by CodeRabbit

  • New Features

    • New agreements now default to the “Not paid” patent status.
    • Patent status selectors list “Not paid” first for quicker selection.
  • Chores

    • Updated dependencies (Nuxt and UI packages) for stability and compatibility.
  • Refactor

    • Internal typing adjustments with no change to runtime behavior.

@hmbanan666 hmbanan666 self-assigned this Sep 4, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 4, 2025

Walkthrough

Type annotations were added to column-visibility dropdown callbacks across several Vue pages. Patent status defaults and mapping were updated: database default changed to 'not_paid', helpers now explicitly return string with a default branch, and select option order adjusted. AgreementPatentStatus union order was rearranged. Workspace dependencies were bumped.

Changes

Cohort / File(s) Summary
Column visibility dropdown typing
apps/web-app/app/pages/agreement/index.vue, apps/web-app/app/pages/head/task/index.vue, apps/web-app/app/pages/kitchen/index.vue, apps/web-app/app/pages/print/index.vue, apps/web-app/app/pages/product/[productId]/usage.vue, apps/web-app/app/pages/product/index.vue
Added explicit (column: any) parameter types in .filter/.map over getAllColumns(); runtime unchanged.
Patent status helpers
apps/web-app/shared/utils/helpers.ts
getPatentStatus now returns string explicitly and adds a default '' branch; switch order adjusted. getPatentStatusForSelect option order changed (now starts with not_paid).
Database: types and table default
packages/database/src/types.ts, packages/database/src/tables.ts
AgreementPatentStatus union order rearranged; partnerAgreements.patentStatus default changed from 'in_work' to 'not_paid'.
Workspace dependency bumps
pnpm-workspace.yaml
Version bumps: @antfu/eslint-config ^5.2.1 → ^5.2.2, @nuxt/ui ^3.3.2 → ^3.3.3, nuxt ^4.0.2 → ^4.1.0.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as Web UI (pages/*)
  participant DB as DB (partnerAgreements)
  participant Helpers as helpers.getPatentStatus

  User->>UI: Open Agreement/Products page
  UI->>DB: Fetch partner agreement (patentStatus)
  DB-->>UI: patentStatus (defaults to "not_paid" if unset)
  UI->>Helpers: getPatentStatus(status)
  alt known status
    Helpers-->>UI: mapped label (string)
  else unknown/undefined
    Helpers-->>UI: "" (default branch)
  end
  UI-->>User: Render status label and column dropdown
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A nibble of types, a sprinkle of strings,
Default seeds set where the database sings.
Columns now tidy, dropdowns all neat—
Status hops first with a not_paid beat.
I thump in delight, review is light—
Code fields in order, carrots in sight! 🥕

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nuxt-update

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addederuda@​3.4.31001009680100
Updated@​nuxt/​devtools@​2.6.2 ⏵ 2.6.39810010094 +1100
Addedeslint@​9.33.09710010094100
Updated@​antfu/​eslint-config@​5.2.1 ⏵ 5.2.296 +110010096 +2100
Updated@​nuxt/​ui@​3.3.2 ⏵ 3.3.398 +110010099 +2100

View full report

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 4, 2025

@hmbanan666 hmbanan666 merged commit 6f92e00 into main Sep 4, 2025
7 of 8 checks passed
@hmbanan666 hmbanan666 deleted the nuxt-update branch September 4, 2025 12:59
Copy link
Copy Markdown

@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

🧹 Nitpick comments (8)
pnpm-workspace.yaml (1)

6-6: Add missing Node engine constraints and verify Nuxt/Vue peerDependencies

  • Only the root package (roll-stack) specifies engines.node (>=22.18.0); add a consistent engines.node (≥18 or ≥20) field to all other packages.
  • No package declares peerDependencies for nuxt, @nuxt/ui, or vue; confirm whether they’re required.
  • pnpm-lock.yaml correctly reflects the @antfu/eslint-config@5.2.2 bump.
apps/web-app/app/pages/head/task/index.vue (1)

75-76: Avoid any: type columns as TanStack Column<Task, unknown>

Keeps IntelliSense and catches API drift while remaining template-friendly.

Apply:

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<Task, unknown>) => column.getCanHide())
+              .map((column: Column<Task, unknown>) => ({

Add to <script setup>:

import type { Column } from '@tanstack/table-core'
apps/web-app/app/pages/product/[productId]/usage.vue (1)

16-17: Strongly type table columns

Prefer Column<MenuCategory, unknown> to preserve API typing.

Apply:

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<MenuCategory, unknown>) => column.getCanHide())
+              .map((column: Column<MenuCategory, unknown>) => ({

And in <script setup>:

import type { Column } from '@tanstack/table-core'
apps/web-app/app/pages/print/index.vue (1)

37-38: Type safety for columns in template

Use Column<PrintWithData, unknown> instead of any.

Apply:

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<PrintWithData, unknown>) => column.getCanHide())
+              .map((column: Column<PrintWithData, unknown>) => ({

Add to <script setup>:

import type { Column } from '@tanstack/table-core'
apps/web-app/app/pages/agreement/index.vue (1)

18-19: Replace any with precise TanStack Column type

Improves TS coverage without changing behavior.

Apply:

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<PartnerAgreementWithAllData, unknown>) => column.getCanHide())
+              .map((column: Column<PartnerAgreementWithAllData, unknown>) => ({

And add:

import type { Column } from '@tanstack/table-core'
apps/web-app/app/pages/product/index.vue (1)

27-29: Avoid any: type columns with TanStack Column to keep safety

Use Column<ProductWithData, unknown> instead of any in filter/map.

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<ProductWithData, unknown>) => column.getCanHide())
+              .map((column: Column<ProductWithData, unknown>) => ({

Add import in <script setup>:

import type { Column } from '@tanstack/table-core'
apps/web-app/app/pages/kitchen/index.vue (1)

18-20: Same: replace any with Column<KitchenWithData, unknown>

Keep template type-safe; mirrors product page suggestion.

-              .filter((column: any) => column.getCanHide())
-              .map((column: any) => ({
+              .filter((column: Column<KitchenWithData, unknown>) => column.getCanHide())
+              .map((column: Column<KitchenWithData, unknown>) => ({

Also add:

import type { Column } from '@tanstack/table-core'
apps/web-app/shared/utils/helpers.ts (1)

34-46: Drop default to keep exhaustiveness on AgreementPatentStatus

Default branch hides future status additions from the type checker. Prefer exhaustive switch (or assertNever).

 export function getPatentStatus(status: AgreementPatentStatus): string {
   switch (status) {
     case 'not_paid':
       return 'Не оплачен'
     case 'in_work':
       return 'В работе'
     case 'on_registration':
       return 'На регистрации'
     case 'registered':
       return 'Зарегистрирован'
-    default:
-      return ''
   }
 }

Optional helper (outside this range) if you want a runtime guard:

function assertNever(x: never): never { throw new Error(`Unhandled status: ${x}`) }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0bab5b9 and 7bcd559.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • apps/web-app/app/pages/agreement/index.vue (1 hunks)
  • apps/web-app/app/pages/head/task/index.vue (1 hunks)
  • apps/web-app/app/pages/kitchen/index.vue (1 hunks)
  • apps/web-app/app/pages/print/index.vue (1 hunks)
  • apps/web-app/app/pages/product/[productId]/usage.vue (1 hunks)
  • apps/web-app/app/pages/product/index.vue (1 hunks)
  • apps/web-app/shared/utils/helpers.ts (1 hunks)
  • packages/database/src/tables.ts (1 hunks)
  • packages/database/src/types.ts (1 hunks)
  • pnpm-workspace.yaml (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/database/src/tables.ts (1)
packages/database/src/types.ts (1)
  • AgreementPatentStatus (21-21)
apps/web-app/shared/utils/helpers.ts (1)
packages/database/src/types.ts (1)
  • AgreementPatentStatus (21-21)
⏰ 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). (1)
  • GitHub Check: build
🔇 Additional comments (2)
packages/database/src/types.ts (1)

21-21: Union reorder is fine

Order change preserves the set of literals; no runtime impact. Aligns with new DB default and helpers.

apps/web-app/shared/utils/helpers.ts (1)

49-55: Select options order update matches new default

Not_paid first is consistent across DB and UI. LGTM.

lumpSumPayment: numeric('lump_sum_payment', { mode: 'number' }).notNull().default(0),
comment: varchar('comment'),
patentStatus: varchar('patent_status').notNull().default('in_work').$type<AgreementPatentStatus>(),
patentStatus: varchar('patent_status').notNull().default('not_paid').$type<AgreementPatentStatus>(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Change DB default → add migration and check seed assumptions

Default switched to 'not_paid'. Ensure a migration alters the column default and that any seeds/tests relying on 'in_work' are adjusted.

Example Drizzle SQL migration:

ALTER TABLE "partner_agreements"
  ALTER COLUMN "patent_status" SET DEFAULT 'not_paid';

Quick scan script to find hardcoded assumptions:


🏁 Script executed:

#!/bin/bash
rg -nP "(patent_status|patentStatus).*(in_work)"
rg -nP "default\\(['\"]in_work['\"]\\)"

Length of output: 224


🏁 Script executed:

#!/bin/bash
# Search migrations for patent_status default alterations
rg -nP 'ALTER TABLE.*patent_status.*DEFAULT' -g '*/migrations/*'
# Search seeds for explicit patent_status 'in_work' usage
rg -nP 'patent_status.*in_work' -g '*/seed*/*'

Length of output: 413


🏁 Script executed:

#!/bin/bash
# Locate migrations directories
find . -type d -iname '*migrations*'

# Search migration files for any patent_status references
rg -n 'patent_status' -g '*/migrations/*'

# Locate seed directories
find . -type d -iname '*seed*'

# Search seed files for patent_status and in_work usages
rg -n 'patent_status' -g '*/seed*/*'
rg -n 'in_work' -g '*/seed*/*'

# Search entire codebase for in_work references (tests, services, etc.)
rg -n 'in_work'

Length of output: 1047


Add migration to update patent_status default

  • Create a migration altering partner_agreements.patent_status default to 'not_paid' (e.g.
    ALTER TABLE "partner_agreements"
      ALTER COLUMN "patent_status" SET DEFAULT 'not_paid';
    ```)  
  • Manually verify there are no seed scripts or test fixtures still assuming the old default ('in_work')—none were found in migrations/ or seed*/ directories, but double-check any custom fixtures.
🤖 Prompt for AI Agents
In packages/database/src/tables.ts around line 128, the schema default for
patentStatus was changed to 'not_paid' but no DB migration was added; create a
new migration that runs an ALTER TABLE "partner_agreements" ALTER COLUMN
"patent_status" SET DEFAULT 'not_paid' (and the corresponding DOWN migration to
reset to the previous default if needed), apply it to your migrations directory,
and run/verify it against your dev DB; also search and manually verify all seed
scripts, test fixtures, and custom fixtures for any assumptions of the old
default 'in_work' and update them if found.

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