Repository navigation
Conversation
- Add src/lib/like.ts with escapeLikeValue() and toLikePattern() helpers - getValues: escape search terms and wrap in %, add ESCAPE '\\' for PG - getGoal: translate every * to %, escape metacharacters, PG ESCAPE '\\' - getFunnel: escape step filter values, handle inner * wildcards, PG ESCAPE '\\' - Add/update tests for PG and ClickHouse alignment
Add a BoardHeatmap component that renders click or scroll heatmaps directly on boards, visible on shared boards. - Add BoardHeatmap component with click dot overlay and scroll bands - Register component in boardComponentRegistry with mode, path, screen config fields - Add BoardHeatmap to board component compatibility matrix for website entity type
|
@sahil2448 is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
[Medium impact] The PR changes three bounded analytics workflows. This PR needs fixes before merging because it cannot build and several heatmap flows do not work. Findings
SummaryAdds a website-only heatmap widget to boards, with click, scroll, page-path, and screen settings. Also changes SQL search escaping and adds online indicators to the realtime log.
Reviews (1) · Last reviewed commit: "feat: add Heatmap component to Boards" · Reviewed by Greptile |
| name: 'path', | ||
| label: 'Page path', | ||
| type: 'text', | ||
| placeholder: '/path/to/page', |
There was a problem hiding this comment.
| } = useHeatmapQuery({ | ||
| websiteId, | ||
| mode, | ||
| }); |
There was a problem hiding this comment.
Shared boards cannot load heatmaps
useHeatmapQuery calls /websites/:websiteId/heatmaps, whose route requires canViewAuthenticatedWebsite. That helper rejects every request without auth.user, including valid board share tokens. Visitors opening a shared board therefore see an error instead of the heatmap. Add an appropriately scoped board-share path before advertising shared-board support.
Knowledge Base Used: Share/public access flow
| .join(' OR ')})`; | ||
| } else { | ||
| searchQuery = getSearchSQL(column); | ||
| searchQuery = \`${getSearchSQL(column)} escape '\\'\`; |
There was a problem hiding this comment.
Path searches still use wildcards
The literal-search fix misses fields stored in website_event. Their single-term query still binds the unescaped %${search}% value on line 85. Once the syntax errors are fixed, a path search containing _ or % still treats those characters as wildcards and can return unrelated values. Escape the value in both table branches and test both paths.
| {isScrollMode ? ( | ||
| <ScrollBands | ||
| scroll={scroll} | ||
| pageW={detailData.scroll?.pageW ?? 0} | ||
| pageH={detailData.scroll?.pageH ?? 0} | ||
| viewportW={detailData.scroll?.viewportW ?? 0} | ||
| viewportH={detailData.scroll?.viewportH ?? 0} | ||
| /> | ||
| ) : ( | ||
| <ClickOverlay points={points} maxCount={maxCount} /> |
There was a problem hiding this comment.
| <LoadingPanel | ||
| data={detailData} | ||
| isLoading={detailLoading} | ||
| error={error} |
There was a problem hiding this comment.
The detail query's error is discarded. If the pages request succeeds but the selected-page request fails, LoadingPanel receives the pages query's error instead. With no detailData, the widget becomes blank rather than showing the failure. Capture the detail query's error and pass it to this panel.
Use a variable for the backslash character instead of inline escape '\\' inside template literals, which caused a parse error in the Vite/oxc transformer.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Replace template literals containing invalid escape sequences (backslash-backtick and backslash-quote) with string concatenation for the SQL ESCAPE clause. This fixes the oxc parser parse error that was blocking CI.
…s.ts - Replace invalid backslash-backtick template literal delimiters (` with backtick only) - Fix escape clause backslashes (4→2 in source) to match test expectations - Wrap decodeURIComponent in try-catch to handle invalid URI encoding (e.g. bare %) - Use decodedSearch variable consistently in multi-term search path
Pull Request Description
Closes : #4719
Summary
Add a Heatmap board component so users can view click and scroll heatmaps directly on boards, including shared boards.
Problem
Boards currently have no component for click or scroll heatmaps. The only heatmap-like widget is
WeeklyTraffic(traffic by day and hour). Users can only link to the Heatmaps tab in a TextBlock, which doesn't work on shared boards.Solution
Added a new
BoardHeatmapcomponent (category: visualization, group: Traffic) with these options:The component uses the board's date range and filters, renders the existing heatmap overlay, and is visible on shared boards.
Changes
src/app/(main)/boards/BoardHeatmap.tsxsrc/app/(main)/boards/boardComponentRegistry.tsxBoardHeatmapwith config fields (mode, path, screen)src/lib/boardComponentCompatibility.tsBoardHeatmapas website-only componentTesting
WeeklyTraffic,WorldMap, etc.)useHeatmapQueryhook which respects board date range and filtersBranch:
feat/add-heatmap-board-componentRemote URL: https://github.com/sahil2448/umami/pull/new/feat/add-heatmap-board-component
Need help on this PR? Tag
@codesmith-botwith what you need.