ci: add typecheck job and simplify npm scripts#218
Conversation
Adds a new 'typecheck' job to the CI pipeline to ensure TypeScript type safety for all pull requests. Additionally, npm scripts in the root `package.json` have been refactored to remove the `core:` prefix, making them easier to run.
The handling of the Escape key has been refactored to follow a strict, sequential process, ensuring a more predictable and intuitive user experience. The new exit sequence is as follows: 1. Deactivate any active providers. 2. Clear clipboard or file attachments. 3. Clear the search input query. 4. Hide the CoreBox window. This change resolves an issue where the window could be hidden prematurely when the user's intent was merely to dismiss an attached item like a clipboard entry. Additionally, extensive JSDoc comments have been added to the `useClipboard`, `useKeyboard`, and `useSearch` hooks, replacing inline comments to improve overall code clarity and maintainability.
|
Warning Rate limit exceeded@TalexDreamSoul has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 36 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR introduces a CI typecheck job, simplifies npm scripts by removing the "core:" prefix, and refactors multiple renderer hooks to enhance clipboard management, keyboard handling, and search functionality with new state management methods. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (5)
.github/workflows/ci.yml (1)
82-107: Typecheck job looks good overall.The new CI job follows best practices: uses frozen lockfile, appropriate Node version matching
volta.nodein package.json, and aligns with the documentedpnpm typecheckcommand from learnings.Two minor observations:
Inconsistent checkout version: This job uses
actions/checkout@v4whilejob2(line 75) uses@v3. Consider updatingjob2for consistency.Runs unconditionally: Unlike
job2which hasif: ${{ always() && needs.job1.outputs.markdown_change == 'true' }}, this job runs on every PR. This is likely intentional for type safety, but worth confirming if you want to skip typecheck when only non-code files change.apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts (2)
203-206: Mutating array length directly may cause reactivity issues.Using
searchResults.value.length = 0mutates the array in place. In Vue 3 withref, this should work, but reassigning is more idiomatic and explicit:- searchResults.value.length = 0 + searchResults.value = []
360-368:deactivateAllProvidersduplicates logic fromdeactivateProvider(undefined).The body of
deactivateAllProvidersis identical to whatdeactivateProvider()does when called without arguments. Consider consolidating:async function deactivateAllProviders(): Promise<void> { - const newState = await touchChannel.send('core-box:deactivate-providers') - activeActivations.value = newState - searchVal.value = '' // Clear search input to clear item list - await handleSearch() + await deactivateProvider() }apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.ts (2)
84-90: Useconsole.debuginstead ofconsole.warnfor diagnostic logging.Per coding guidelines, use log4js with structured namespaces. At minimum,
console.warnshould be reserved for actual warnings. These are informational logs:- console.warn('[Clipboard] AutoPaste time check', { + console.debug('[Clipboard] AutoPaste time check', {This applies to similar occurrences at lines 110, 137, 157, 169, 183, 221, 232, 307, and 315.
199-199: Synchronous IPC call may cause UI jank.
touchChannel.sendSync('clipboard:get-latest')blocks the renderer process. For clipboard operations that may involve file system or image processing, consider using async IPC:- function handlePaste(options?: { overrideDismissed?: boolean }): void { + async function handlePaste(options?: { overrideDismissed?: boolean }): Promise<void> { const overrideDismissed = options?.overrideDismissed ?? false - const clipboard = touchChannel.sendSync('clipboard:get-latest') as IClipboardItem | null + const clipboard = await touchChannel.send('clipboard:get-latest') as IClipboardItem | nullNote: This would require updating callers to handle the async return.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/ci.yml(1 hunks)apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.ts(7 hunks)apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.ts(3 hunks)apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts(6 hunks)package.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
apps/core-app/src/renderer/src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/core-app/src/renderer/src/**/*.{ts,tsx,vue}: Implement Vue 3 components with TypeScript in the renderer process. Organize components in src/components/, view layouts in src/views/, and state management via Pinia stores and composables in src/modules/hooks/.
Use Pinia stores and composables in src/modules/hooks/ for state management in the renderer process instead of local component state.
Use Vue Router 4.5.1 for client-side routing in the renderer application.
apps/core-app/src/renderer/src/**/*.{ts,tsx,vue}: Use Pinia stores and composables in src/modules/hooks/ for state management in renderer process Vue components
Use Vue 3, TypeScript, Pinia for state management, and UnoCSS for styling in renderer process
Files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
apps/core-app/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/core-app/src/**/*.{ts,tsx}: Use log4js for logging with structured namespaces, timestamps, and colored output. Provide meaningful namespace identifiers for debugging.
Import and use shared types and utilities from @talex-touch/utils package. Use enums like TuffInputType, TalexEvents, and ChannelType from the shared package.
Files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
apps/core-app/src/renderer/src/**/*.{vue,ts,tsx,css,scss}
📄 CodeRabbit inference engine (CLAUDE.md)
Use UnoCSS 66.3.3+ for utility-first CSS styling instead of traditional CSS frameworks.
Files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
apps/core-app/src/renderer/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Pinia 3.0.3 for state management in the renderer application.
Files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
apps/core-app/src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Import shared types and utilities from @talex-touch/utils package in plugins and application code
Files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Execute type checking with `npm run typecheck` (main + renderer process) from apps/core-app/ directory
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Run `npm run typecheck` within apps/core-app/ for TypeScript validation. Use `npm run typecheck:node` for main process and `npm run typecheck:web` for renderer process validation.
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to **/plugins/**/*.{ts,tsx,js,jsx} : Use TuffInputType enum values (text, image, files, html) when handling clipboard data in plugins. Check query.inputs array to find specific input types and access their content and thumbnail properties.
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Applies to plugins/**/*.ts : Handle clipboard data in plugins by checking if query is a string (backward compatibility) or TuffQuery object with inputs array containing type-specific data
📚 Learning: 2025-11-29T07:46:02.249Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Execute type checking with `npm run typecheck` (main + renderer process) from apps/core-app/ directory
Applied to files:
.github/workflows/ci.ymlpackage.json
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Run `npm run typecheck` within apps/core-app/ for TypeScript validation. Use `npm run typecheck:node` for main process and `npm run typecheck:web` for renderer process validation.
Applied to files:
.github/workflows/ci.ymlpackage.json
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Use pnpm workspace commands for development. Core development uses `pnpm core:dev` for the development server, `pnpm core:build` for production builds, with platform-specific variants for Windows, macOS, and Linux.
Applied to files:
package.json
📚 Learning: 2025-11-29T07:46:02.249Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Use `pnpm core:dev` to start Electron application development server
Applied to files:
package.json
📚 Learning: 2025-11-29T07:46:02.249Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Monorepo structure uses pnpm workspace with apps/, packages/, plugins/, and apps/docs/ directories
Applied to files:
package.json
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Maintain the talex-touch/utils package as a shared npm package for external plugin developers. Ensure type definitions and utilities are exported for public use.
Applied to files:
package.json
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to apps/core-app/src/main/modules/box-tool/**/*.{ts,tsx} : Position CoreBox windows screen-aware using cursor position to select the appropriate display in multi-monitor setups.
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.ts
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to **/plugins/**/*.{ts,tsx,js,jsx} : Use TuffInputType enum values (text, image, files, html) when handling clipboard data in plugins. Check query.inputs array to find specific input types and access their content and thumbnail properties.
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
📚 Learning: 2025-11-29T07:46:02.249Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Applies to plugins/**/*.ts : Handle clipboard data in plugins by checking if query is a string (backward compatibility) or TuffQuery object with inputs array containing type-specific data
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.tsapps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to apps/core-app/src/renderer/src/**/*.{ts,tsx,vue} : Use Pinia stores and composables in src/modules/hooks/ for state management in the renderer process instead of local component state.
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to **/plugins/**/*.{ts,tsx,js,jsx} : Handle backward compatibility in plugins by checking if query is a string (legacy text-only query) before treating it as a TuffQuery object with inputs array.
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to **/plugins/**/manifest.json : Declare acceptedInputTypes array in plugin manifest features to specify supported input types (text, image, files, html) from clipboard data.
Applied to files:
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts
🧬 Code graph analysis (2)
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.ts (1)
apps/core-app/src/renderer/src/modules/box/adapter/index.ts (1)
BoxMode(1-1)
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts (1)
apps/core-app/src/renderer/src/modules/channel/channel-core.ts (1)
touchChannel(196-196)
🔇 Additional comments (8)
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useKeyboard.ts (2)
27-30: Good documentation of the keyboard handler.The JSDoc comment clearly describes the function's purpose.
110-144: Well-structured ESC key sequential handling.The refactored ESC flow is clear and follows a logical priority order. The inline documentation accurately describes each step.
One minor observation: on line 121,
handleExit()is called which (peruseSearch.ts) will invokedeactivateAllProviders()and return early without hiding the window—matching the intended behavior of step 1.apps/core-app/src/renderer/src/modules/box/adapter/hooks/useSearch.ts (3)
49-52: Debounce timing looks appropriate.35ms base debounce with 100ms when providers are active provides responsive feedback while avoiding excessive queries.
220-225: Good defensive guard for missing item.Adding the early return with warning when
handleExecuteis called without an item prevents potential null reference errors.
201-214: The original review comment is factually incorrect about the@vueuse/coreAPI.
useDebounceFnfrom@vueuse/coredoes have aflush()method. According to official documentation,flush()immediately invokes any pending debounced call and clears the pending timer, returning the result of that immediate invocation. The code at lines 209-213 is correct, and the@ts-ignorecomments are unnecessary but harmless—they can be removed sinceflush()is a legitimate, documented method on the debounce function returned byuseDebounceFn.Likely an incorrect or invalid review comment.
apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.ts (3)
12-33: Clean timestamp normalization helper.The
normalizeTimestampfunction handles various input types defensively with properNumber.isFinitechecks. Good edge case handling.
95-190: Comprehensive auto-fill logic with good duplicate prevention.The
handleAutoFillfunction properly:
- Checks preconditions before processing
- Uses timestamp-based deduplication
- Handles files, short text, long text, and images distinctly
- Cleans up expired records probabilistically to prevent memory growth
297-323: I'll verify the review comment about the channel listener cleanup issue. Let me start by examining the implementation ofregChanneland how theuseClipboardhook is used.
<function_calls>
#!/bin/bashFirst, locate the useClipboard file and understand its structure
find . -name "useClipboard.ts" -type f
</function_calls>
<function_calls>
#!/bin/bashCheck the full useClipboard.ts file structure
wc -l "apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.ts"
</function_calls>
<function_calls>
#!/bin/bashRead the useClipboard.ts file to understand context and cleanup patterns
cat -n "apps/core-app/src/renderer/src/modules/box/adapter/hooks/useClipboard.ts"
</function_calls>
Removes the `core:` prefix from pnpm build scripts in the build-and-release workflow. This change aligns with recent script simplifications. Additionally, applies code style formatting to the search-logger module.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts (1)
37-40: Migrate from rawconsole+chalkto the project's standard logger viacreateLogger()The review comment correctly identifies a logging inconsistency, but the recommendation should be clarified. While the project documentation mentions log4js, the actual logging standard is implemented via the custom
createLogger()function inapps/core-app/src/main/utils/logger.ts, which wraps console output (polyfilled to log4js) with structured namespaces, timestamps, and colored output.Changes needed:
- Replace raw
console.logandconsole.errorcalls withcreateLogger('box-tool:search-engine')- Remove the
chalkimport and formatting chains; the logger handles coloring via namespace-based palette- Use logger methods:
logger.info(),logger.warn(),logger.error(),logger.debug(),logger.success()- Support structured metadata via the optional
LogOptionsparameter (e.g.,{ meta: { key: value } })This approach clears the
no-consolelint flags, provides consistent logging across the codebase, and leverages the project's established logging infrastructure rather than duplicating console + chalk patterns.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build-and-release.yml(2 hunks)apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts(10 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
apps/core-app/src/main/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/core-app/src/main/**/*.{ts,tsx}: Register IPC channel handlers in the main process using regChannel(type, eventName, callback). Use ChannelType.MAIN for main-renderer communication and ChannelType.PLUGIN for plugin-specific channels.
Use sendPlugin(pluginName, eventName, arg) to send messages from main process to plugins, and use requestKey(name) to manage encrypted keys for plugin isolation.
Use TouchWindow wrapper for window creation instead of directly using Electron BrowserWindow. Enable platform-specific effects: Vibrancy on macOS and Mica on Windows.
Use two-phase window setup with TouchWindow: separate creation from rendering. Use autoShow option to control initial visibility.
Use DevProcessManager to prevent app quit events in development environment, allowing custom cleanup without forcing application exit.
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
apps/core-app/src/main/modules/box-tool/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Position CoreBox windows screen-aware using cursor position to select the appropriate display in multi-monitor setups.
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
apps/core-app/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/core-app/src/**/*.{ts,tsx}: Use log4js for logging with structured namespaces, timestamps, and colored output. Provide meaningful namespace identifiers for debugging.
Import and use shared types and utilities from @talex-touch/utils package. Use enums like TuffInputType, TalexEvents, and ChannelType from the shared package.
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
apps/core-app/src/main/modules/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
apps/core-app/src/main/modules/**/*.ts: In main process architecture, inherit from BaseModule with requiredonInit()andonDestroy()methods, and optionalcreated(),start(), andstop()lifecycle methods
Module directory pattern: request isolated directory from ModuleManager for module-specific persistent storage without knowing root path
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
apps/core-app/src/main/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
apps/core-app/src/main/**/*.ts: Register IPC channels usingregChannel(type: ChannelType, eventName: string, callback)and send messages viasend(),sendTo(), orsendPlugin()methods
Use log4js for structured logging with namespaces, timestamps, and colored output for debugging
DevProcessManager prevents application quit events during development to allow custom cleanup logic
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
apps/core-app/src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Import shared types and utilities from @talex-touch/utils package in plugins and application code
Files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T07:46:02.249Z
Learning: Execute type checking with `npm run typecheck` (main + renderer process) from apps/core-app/ directory
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Run `npm run typecheck` within apps/core-app/ for TypeScript validation. Use `npm run typecheck:node` for main process and `npm run typecheck:web` for renderer process validation.
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Use pnpm workspace commands for development. Core development uses `pnpm core:dev` for the development server, `pnpm core:build` for production builds, with platform-specific variants for Windows, macOS, and Linux.
Applied to files:
.github/workflows/build-and-release.yml
📚 Learning: 2025-11-29T07:45:45.435Z
Learnt from: CR
Repo: talex-touch/tuff PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T07:45:45.435Z
Learning: Applies to apps/core-app/src/**/*.{ts,tsx} : Use log4js for logging with structured namespaces, timestamps, and colored output. Provide meaningful namespace identifiers for debugging.
Applied to files:
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
🪛 ESLint
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
[error] 15-15: Expected a comma.
(style/member-delimiter-style)
[error] 15-15: Expected a comma.
(style/member-delimiter-style)
[error] 41-41: Closing curly brace appears on the same line as the subsequent block.
(style/brace-style)
[error] 46-46: Closing curly brace appears on the same line as the subsequent block.
(style/brace-style)
[error] 83-83: Closing curly brace appears on the same line as the subsequent block.
(style/brace-style)
[error] 83-83: 'error' is defined but never used.
(unused-imports/no-unused-vars)
[error] 83-83: 'error' is defined but never used.
(ts/no-unused-vars)
[error] 104-104: Closing curly brace appears on the same line as the subsequent block.
(style/brace-style)
[error] 108-108: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 109-109: Closing curly brace appears on the same line as the subsequent block.
(style/brace-style)
[error] 125-125: Expect newline after if
(antfu/if-newline)
[error] 131-131: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 132-132: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 133-133: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 134-134: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 145-145: Expect newline after if
(antfu/if-newline)
[error] 149-149: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 150-150: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 151-151: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 152-152: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 179-179: Expect newline after if
(antfu/if-newline)
[error] 185-185: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 186-186: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 187-187: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 187-187: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 188-188: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 197-197: Expect newline after if
(antfu/if-newline)
[error] 198-198: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 199-199: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 200-200: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 200-200: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 201-201: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 207-207: Expect newline after if
(antfu/if-newline)
[error] 208-208: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 209-209: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 210-210: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 210-210: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 211-211: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 221-221: Expect newline after if
(antfu/if-newline)
[error] 233-233: Expect newline after if
(antfu/if-newline)
[error] 235-235: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 236-236: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 237-237: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 237-237: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 238-238: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 248-248: Expect newline after if
(antfu/if-newline)
[error] 249-249: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 250-250: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 251-251: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 251-251: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 252-252: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 255-255: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 260-260: Expect newline after if
(antfu/if-newline)
[error] 261-261: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 262-262: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 263-263: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 263-263: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 264-264: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 270-270: Expect newline after if
(antfu/if-newline)
[error] 271-271: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 272-272: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 273-273: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 273-273: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 282-282: Expect newline after if
(antfu/if-newline)
[error] 283-283: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 284-284: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 285-285: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 285-285: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 286-286: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 292-292: Expect newline after if
(antfu/if-newline)
[error] 293-293: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 294-294: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 295-295: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 295-295: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 296-296: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 302-302: Expect newline after if
(antfu/if-newline)
[error] 303-303: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 304-304: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 305-305: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 305-305: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 306-306: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 307-307: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 313-313: Expect newline after if
(antfu/if-newline)
[error] 314-314: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 315-315: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 316-316: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 316-316: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 322-322: Expect newline after if
(antfu/if-newline)
[error] 323-323: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 324-324: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 325-325: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 325-325: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 326-326: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 327-327: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 333-333: Expect newline after if
(antfu/if-newline)
[error] 334-334: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 335-335: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 336-336: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 336-336: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 337-337: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 338-338: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 344-344: Expect newline after if
(antfu/if-newline)
[error] 345-345: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 346-346: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 347-347: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 347-347: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 348-348: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 349-349: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 355-355: Expect newline after if
(antfu/if-newline)
[error] 356-356: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 357-357: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 358-358: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 358-358: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 359-359: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 365-365: Expect newline after if
(antfu/if-newline)
[error] 366-366: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 367-367: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 368-368: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 368-368: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 374-374: Expect newline after if
(antfu/if-newline)
[error] 375-375: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 376-376: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 377-377: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 377-377: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 383-383: Expect newline after if
(antfu/if-newline)
[error] 384-384: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 385-385: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 386-386: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 394-394: Expect newline after if
(antfu/if-newline)
[error] 395-395: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 396-396: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 397-397: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 397-397: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 403-403: Expect newline after if
(antfu/if-newline)
[error] 404-404: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 405-405: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 406-406: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 411-411: Expect newline after if
(antfu/if-newline)
[error] 412-412: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 413-413: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 414-414: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 414-414: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 415-415: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 421-421: Expect newline after if
(antfu/if-newline)
[error] 422-422: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 423-423: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 424-424: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 424-424: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 430-430: Expect newline after if
(antfu/if-newline)
[error] 431-431: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 432-432: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 433-433: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 433-433: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 434-434: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 440-440: Expect newline after if
(antfu/if-newline)
[error] 441-441: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 442-442: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 443-443: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 443-443: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 449-449: Expect newline after if
(antfu/if-newline)
[error] 450-450: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 451-451: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 452-452: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 452-452: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 458-458: Expect newline after if
(antfu/if-newline)
[error] 459-459: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 460-460: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 461-461: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 461-461: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 462-462: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 468-468: Expect newline after if
(antfu/if-newline)
[error] 469-469: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 470-470: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 471-471: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 471-471: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 477-477: Expect newline after if
(antfu/if-newline)
[error] 478-478: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 479-479: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 480-480: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 480-480: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 481-481: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 490-490: Expect newline after if
(antfu/if-newline)
[error] 491-491: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 492-492: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 493-493: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 493-493: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 494-494: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 500-500: Expect newline after if
(antfu/if-newline)
[error] 501-501: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 507-507: Expect newline after if
(antfu/if-newline)
[error] 508-508: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 512-512: Expect newline after if
(antfu/if-newline)
[error] 513-513: Unexpected console statement. Only these console methods are allowed: warn, error.
(no-console)
[error] 514-514: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 515-515: Expected indentation of 6 spaces
(style/indent-binary-ops)
[error] 515-515: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
[error] 516-516: '+' should be placed at the beginning of the line.
(style/operator-linebreak)
🔇 Additional comments (1)
.github/workflows/build-and-release.yml (1)
298-299: All npm script updates have been properly implemented and are consistent across the codebase.The verification confirms:
- ✓ All six new
build:*scripts are defined in package.json- ✓ Scripts correctly delegate to the
@talex-touch/core-appworkspace- ✓ No remaining references to old
core:build:*commands in workflow files- ✓ Old scripts have been removed from package.json
The workflow changes are ready and fully aligned with package.json definitions.
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
Outdated
Show resolved
Hide resolved
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
Outdated
Show resolved
Hide resolved
apps/core-app/src/main/modules/box-tool/search-engine/search-logger.ts
Outdated
Show resolved
Hide resolved
…ogger.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: TalexDreamSoul <59305952+TalexDreamSoul@users.noreply.github.com>
…ogger.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: TalexDreamSoul <59305952+TalexDreamSoul@users.noreply.github.com>
…ogger.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: TalexDreamSoul <59305952+TalexDreamSoul@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.