Skip to content

chore: removed old libs#36

Merged
hmbanan666 merged 4 commits into
mainfrom
updates
Aug 1, 2025
Merged

chore: removed old libs#36
hmbanan666 merged 4 commits into
mainfrom
updates

Conversation

@hmbanan666

@hmbanan666 hmbanan666 commented Aug 1, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Chart tooltips now display the number of checks with correct Russian pluralization, alongside average check values.
  • Chores

    • Removed Kubernetes deployment and secret files for the web-parser service.
    • Updated project description in the main package.
    • Removed unused development dependencies and build scripts from various packages.
    • Simplified package configurations to reference source files directly.
    • Updated clean scripts to target the correct output directories.
    • Upgraded the dotenv dependency version in the workspace.
    • Improved backend task efficiency by optimizing metric updates.

@hmbanan666 hmbanan666 self-assigned this Aug 1, 2025
@coderabbitai

coderabbitai Bot commented Aug 1, 2025

Copy link
Copy Markdown

Walkthrough

This update removes build configuration files and scripts related to the unbuild tool from the database and geo-database packages, and adjusts package exports to reference source files directly. Kubernetes manifests for the web-parser component are deleted. Minor UI improvements are made to chart tooltips, and some package descriptions and dependencies are updated.

Changes

Cohort / File(s) Change Summary
Chart Tooltip Enhancement
apps/web-app/app/components/chart/KitchenChecks.client.vue
Modified the chart tooltip to display the number of checks with correct Russian pluralization before the average check value.
Kitchen Metrics Calculation Refactor
apps/web-app/server/tasks/kitchen/average-update.ts
Refactored the update logic to iterate over existing network metrics, summing checks and revenue for each date, updating metrics in place, and removing redundant calculations and metric creation.
Kubernetes Web-Parser Manifests Removal
k8s/web-parser/deployment.yaml, k8s/web-parser/secret.yaml
Deleted Kubernetes Deployment and Secret manifests for the web-parser application, removing configuration and deployment resources for this component.
Project Description & Dependency Update
package.json
Updated the project description to reference Sushi Love and removed dotenv-cli from devDependencies.
Database Package Build System Removal
packages/database/build.config.ts, packages/database/package.json
Deleted the build configuration file and removed build scripts, build-related fields, and the unbuild dependency. Changed exports to point directly to the TypeScript source file.
Geo-Database Package Build System Removal
packages/geo-database/build.config.ts, packages/geo-database/package.json
Deleted the build configuration file and removed build scripts and the unbuild dependency from the package configuration.
Workspace Dependency Update
pnpm-workspace.yaml
Removed dotenv-cli from the catalog and updated the dotenv version. Also updated versions of @antfu/eslint-config, @iconify-json/*, @nuxtjs/i18n, @types/pg, @vueuse/*, drizzle-orm, eslint, playwright, and vue-tsc.
Web App Clean Script Update
apps/web-app/package.json
Changed the clean script to remove the .output directory instead of dist.
Web Storefront Clean Script Update
apps/web-storefront/package.json
Changed the clean script to remove the .output directory instead of dist.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ChartComponent
    User->>ChartComponent: Hover over chart point
    ChartComponent->>ChartComponent: Fetch date, day, checks count, average check, network average
    ChartComponent->>User: Display tooltip with checks count (Russian plural), average check, network average
Loading
sequenceDiagram
    participant TaskRunner
    participant MetricsDB
    participant RevenuesDB

    TaskRunner->>MetricsDB: Get all existing network metrics
    loop For each metric
        TaskRunner->>RevenuesDB: Fetch all revenues for metric date
        alt Revenues exist
            TaskRunner->>TaskRunner: Sum checks and revenue
            TaskRunner->>MetricsDB: Update metric with new sums
        else No revenues
            TaskRunner->>TaskRunner: Skip metric
        end
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny hopped through code so neat,
Swept away old builds and a Kubernetes seat.
Tooltips now sing in Russian rhyme,
Checks and averages, all in line.
With scripts trimmed down, the garden’s bright—
This patch brings change, both small and light!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cc83bb7 and 23f1436.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • pnpm-workspace.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm-workspace.yaml
⏰ 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
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch updates

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 generate unit tests to generate unit tests for 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (4)
packages/geo-database/package.json (2)

9-17: clean still targets dist/ when no build artefacts are produced
With the build / postinstall scripts gone, dist/ will never be created. Keeping the clean target creates dead-weight script noise.

-    "clean": "rm -rf dist",
+    "clean": "true"            # or drop the script entirely

24-31: Stale dev-dependencies (unbuild, dotenv) after build removal
unbuild is only useful when a build step exists, and dotenv is usually tied to dotenv/config import removal observed elsewhere. Eliminating them trims install time and audit surface.

-    "dotenv": "catalog:",
-    "unbuild": "catalog:",
packages/database/package.json (1)

6-8: Package now exports raw TypeScript – verify downstream compatibility
Consumers outside the repo (or even ESM loaders without ts-node/tsx) cannot execute .ts directly. Consider publishing transpiled JS or documenting that only workspace tooling is supported.

apps/web-app/server/tasks/kitchen/average-update.ts (1)

18-20: Clean up commented code.

The calculation logic is correct for summing checks and total revenue. However, consider removing the commented-out averageCheck calculation if it's no longer needed, or add a comment explaining why it's preserved.

 const checks = allRevenuesThisPeriod.reduce((acc, curr) => acc + curr.checks, 0)
-// const averageCheck = Math.round(allRevenuesThisPeriod.reduce((acc, curr) => acc + curr.averageCheck, 0) / allRevenuesThisPeriod.length)
 const total = Math.round(allRevenuesThisPeriod.reduce((acc, curr) => acc + curr.total, 0))
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3056f9c and e49a733.

⛔ 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/components/chart/KitchenChecks.client.vue (1 hunks)
  • apps/web-app/server/tasks/kitchen/average-update.ts (1 hunks)
  • k8s/web-parser/deployment.yaml (0 hunks)
  • k8s/web-parser/secret.yaml (0 hunks)
  • package.json (1 hunks)
  • packages/database/build.config.ts (0 hunks)
  • packages/database/drizzle.config.ts (0 hunks)
  • packages/database/package.json (2 hunks)
  • packages/geo-database/package.json (1 hunks)
  • pnpm-workspace.yaml (0 hunks)
💤 Files with no reviewable changes (5)
  • packages/database/drizzle.config.ts
  • pnpm-workspace.yaml
  • packages/database/build.config.ts
  • k8s/web-parser/secret.yaml
  • k8s/web-parser/deployment.yaml
🔇 Additional comments (6)
packages/database/package.json (1)

24-29: 👍 Dev-dependency list is leaner
Removal of dotenv and unbuild is consistent with the simplified workflow.

package.json (1)

6-6: LGTM on description tweak
The wording change is harmless and self-explanatory.

apps/web-app/server/tasks/kitchen/average-update.ts (3)

10-10: Good refactoring approach.

Fetching existing network metrics first is more efficient for an update operation, ensuring we only process metrics that already exist rather than potentially creating duplicates.


12-16: LGTM! Clean loop structure with proper guard clause.

The refactored approach iterates over existing metrics and fetches relevant revenue data for each date. The guard clause efficiently skips processing when no revenue data exists.


22-25: Efficient update operation.

The refactored code properly updates existing metrics using their IDs rather than creating new ones. This is more efficient and maintains data integrity.

apps/web-app/app/components/chart/KitchenChecks.client.vue (1)

130-130: Excellent localization enhancement.

The tooltip template correctly implements Russian pluralization for check counts and provides comprehensive information. The pluralization forms ('чек', 'чека', 'чеков') are grammatically correct for Russian, enhancing the user experience for Russian-speaking users.

@hmbanan666 hmbanan666 changed the title chore: some updates chore: removed old libs Aug 1, 2025
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2025

Copy link
Copy Markdown

@hmbanan666 hmbanan666 merged commit 9b5709f into main Aug 1, 2025
8 checks passed
@hmbanan666 hmbanan666 deleted the updates branch August 1, 2025 09:58
@coderabbitai coderabbitai Bot mentioned this pull request Aug 22, 2025
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