-
-
Notifications
You must be signed in to change notification settings - Fork 70
feat: support track uv data in VSCode extension. #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vue-vine ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@vue-vine/compiler
create-vue-vine
@vue-vine/eslint-config
@vue-vine/eslint-parser
@vue-vine/eslint-plugin
@vue-vine/language-server
@vue-vine/language-service
@vue-vine/nuxt
vue-vine-tsc
@vue-vine/vite-plugin
vue-vine
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (5)
pnpm-workspace.yaml (1)
65-65
: Alphabetical order keeps diffs clean.
'@umami/node'
is inserted beforeelement-plus
, breaking the existing alpha-sort convention inside each catalog. Resorting avoids noisy future diffs.- '@umami/node': ^0.4.0 - element-plus: ^2.9.11 + element-plus: ^2.9.11 + '@umami/node': ^0.4.0packages/vscode-ext/.npmrc (1)
1-1
: Double-check the need to pin the registry at package scope.Setting a private
.npmrc
overrides any corporate mirror / CI caching rules defined at repo or user level. If the intention is only to guarantee public npm for the Umami package, consider instead:@umami:registry=https://registry.npmjs.org
to avoid affecting all other scopes.
packages/vscode-ext/src/index.ts (1)
51-57
: Two output channels with overlapping purpose.You create
outputChannelName = 'Vine Language Server'
for the LSP and another'Vue Vine Extension'
for general logs. Consider re-using one or adopting a naming convention (Vue Vine: LSP
,Vue Vine: Extension
) to keep VSCode’s Output panel tidy.packages/vscode-ext/src/view-features.ts (1)
15-16
: Don’t await telemetry in the command path.Restarting the server is a user-visible action; waiting for an HTTP call slows it down. Trigger the call asynchronously and swallow errors.
- await track.trackEvent('restart_server') + void track.trackEvent('restart_server') + .catch(err => client.outputChannel?.appendLine(`telemetry failed: ${err}`))packages/vscode-ext/src/track.ts (1)
58-73
: Date objects indata
may be lost in JSON serialization
JSON.stringify
convertsDate
to ISO strings only when the property value is a Date, but Umami client may internally applynew URLSearchParams()
which will calltoString()
instead (giving an unreadable value).Safest path: convert outgoing
Date
values totoISOString()
before passing them.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
packages/vscode-ext/.npmrc
(1 hunks)packages/vscode-ext/package.json
(1 hunks)packages/vscode-ext/src/index.ts
(2 hunks)packages/vscode-ext/src/track.ts
(1 hunks)packages/vscode-ext/src/view-features.ts
(1 hunks)pnpm-workspace.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: test (lts/*, ubuntu-latest)
- GitHub Check: test (lts/*, macos-latest)
- GitHub Check: test (lts/*, windows-latest)
🔇 Additional comments (3)
packages/vscode-ext/src/view-features.ts (1)
6-9
: Dependency injection looks good. PassingTrack
explicitly keeps the module pure and testable—nicely done.packages/vscode-ext/src/track.ts (2)
4-7
: Union type is clear & future-proof
LimitingTrackEvent
to a string union makes the API self-documenting and keeps autocomplete tight. Nice!
46-55
: ```shell
#!/bin/bashDownload and inspect @umami/node v0.4.0 source for
identify
payload keysnpm pack @umami/node@0.4.0
tar -xzf umami-node-0.4.0.tgz
grep -R "identify" -n package
grep -R "sessionId" -n package
grep -R "userId" -n package</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce user-configurable data tracking to the VSCode extension "vue-vine-extension." New configuration options allow users to control analytics collection and warning visibility. A tracking class leveraging Umami analytics is implemented, and tracking is integrated into extension activation and server restart events. User-facing warnings and configuration handling are also added. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VSCode
participant Extension
participant Track (Analytics)
participant Umami
User->>VSCode: Activates extension
VSCode->>Extension: Calls activate()
Extension->>Track: Initialize with config, versions, machineId
Extension->>Track: trackEvent('extension_activated')
Track->>Umami: Send activation event
Extension->>User: (If enabled) Show data tracking warning
User->>Extension: Responds to warning (Why?/Turn off/Don't show again)
Extension->>VSCode: Updates config if needed
User->>Extension: Requests server restart
Extension->>Track: trackEvent('restart_server')
Track->>Umami: Send restart event
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Using Umami to generate UV data:
Data collection warning
Here's an announcement to all Vue Vine users.
From this version (maybe 1.4.12 or 1.5.0) we'll add a UV data tracker in our extension.
We promise not to collect any data other than those triggered by functions such as plugin activation and language server restart, and to carefully abide by the principle of data sensitivity.
Summary by CodeRabbit
New Features
Chores