-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[WIKI-556] chore: disable tracking of page hover #7650
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
WalkthroughAdds an optional track_visit flag to page retrieval. Frontend propagates a trackVisit boolean through store and service to include track_visit in the GET query. Backend reads the query param and conditionally enqueues recent_visited_task only when true. No other logic or API endpoints changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as PageDetailsPage (SWR)
participant S as ProjectPageStore
participant SV as ProjectPageService
participant API as API /page retrieve
participant Q as Task Queue
participant DB as DB
U->>S: fetchPageDetails(ws, project, page, { trackVisit: true })
S->>SV: fetchById(ws, project, page, true)
SV->>API: GET /.../pages/{id}?track_visit=true
API->>DB: Fetch page by id
DB-->>API: Page data
alt track_visit = true
API-->>Q: recent_visited_task.delay(page, user)
else track_visit = false
Note over API: Skip enqueue
end
API-->>SV: 200 OK (page)
SV-->>S: Page
S-->>U: Page
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
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: 0
🧹 Nitpick comments (3)
apps/api/plane/app/views/page/base.py (1)
201-201: Parse boolean query param more robustlyAccept common truthy values and avoid relying on exact "true".
- track_visit = request.query_params.get("track_visit", "false").lower() == "true" + tv = request.query_params.get("track_visit") + track_visit = str(tv).lower() in {"1", "true", "t", "yes", "y", "on"}apps/web/core/store/pages/project-page.store.ts (2)
247-253: Default trackVisit to false at the store boundaryKeeps semantics clear and call sites minimal; pairs with service change.
- fetchPageDetails = async ( - workspaceSlug: string, - projectId: string, - pageId: string, - { trackVisit }: { trackVisit: boolean } - ) => { + fetchPageDetails = async ( + workspaceSlug: string, + projectId: string, + pageId: string, + { trackVisit = false }: { trackVisit?: boolean } = {} + ) => { @@ - const page = await this.service.fetchById(workspaceSlug, projectId, pageId, trackVisit); + const page = await this.service.fetchById(workspaceSlug, projectId, pageId, trackVisit);Also applies to: 262-262
52-57: Makeoptionsparameter optional onfetchPageDetails
Loosen the signature to avoid breaking callers and clearly document intent:- fetchPageDetails: ( - workspaceSlug: string, - projectId: string, - pageId: string, - { trackVisit }: { trackVisit: boolean } - ) => Promise<TPage | undefined>; + fetchPageDetails: ( + workspaceSlug: string, + projectId: string, + pageId: string, + options?: { trackVisit?: boolean } + ) => Promise<TPage | undefined>;No legacy 3-arg calls to
fetchPageDetailswere found, so this is safe to apply.
📜 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.
📒 Files selected for processing (4)
apps/api/plane/app/views/page/base.py(2 hunks)apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx(1 hunks)apps/web/core/services/page/project-page.service.ts(1 hunks)apps/web/core/store/pages/project-page.store.ts(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/web/core/services/page/project-page.service.ts (1)
packages/types/src/page/core.ts (1)
TPage(5-24)
apps/web/core/store/pages/project-page.store.ts (1)
packages/types/src/page/core.ts (1)
TPage(5-24)
⏰ 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 and lint web apps
🔇 Additional comments (3)
apps/api/plane/app/views/page/base.py (1)
234-241: LGTM: visit tracking is now opt-inConditionally enqueueing recent_visited_task based on track_visit aligns with the PR goal.
apps/web/core/services/page/project-page.service.ts (1)
26-31: MaketrackVisitoptional and omittrack_visit=false
Change the signature totrackVisit?: booleanand only pass{ params: { track_visit: true } }whentrackVisitis truthy—this preserves existing 4-argument calls and avoids sendingtrack_visit=false.apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx (1)
61-64: LGTM: tracking only on explicit page viewPassing
{ trackVisit: true }from the details page preserves visit logging while keeping hover fetches silent.
Description
this pull request resolves the issue from removing the page from the recent visit on hovering on the page.
Type of Change
Summary by CodeRabbit
New Features
Chores