Commit Graph

24 Commits

Author SHA1 Message Date
Saxon Fletcher
a224598f1e Decouple editor panel (#37707)
* decouple editor panel from global state

* refactor again

* dont close assistant

* remove async

* onsave props

* Fix TS errors

* Remove editorPanel state from app-state, use useHotKey hooks for keyboard shortcuts

* Minor UX improvements to EditorPanel

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-06 15:03:53 +07:00
Joshen Lim
cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* Replace all usage of useProjectContext with useSelectedProjectQuery

* Replace all usage of useSelectedProject with useSelectedProjectQuery

* Replace all usage of useProjectByRef with useProjectByRefQuery

* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery

* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks

* Deprecate ProjecContext
2025-08-06 10:53:10 +07:00
Saxon Fletcher
94c45c2863 AI UI refine and renaming (#36819)
* ui refinements

* rename chat

* copy

* prose message styles

* add icon back

* fix message save

* simplify empty state

* update suggestions

* pass through props

* button styles

* onboarding icons

* name button

* remove results

* current chat name

* use type

* fix down arrow

* re-add chat name
2025-07-08 12:09:11 +10:00
Joshen Lim
256dbb7f38 Feature flag MCP changes (#36689)
* Feature flag assistant endpoint + opt in UI

* Feature flag bedrock stuff for the other endpoints like title, cron, complete

* add edge function complete v2

* revert to old complete

* Revert hardcode

* fix chart colour

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-06-26 18:41:31 +08:00
Joshen Lim
ff3832a659 Fix query block read only catch (#35543)
* Fix query block read only catch

* Update apps/studio/components/ui/QueryBlock/QueryBlock.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-05-08 15:35:08 +08:00
Joshen Lim
4a5e1a8bd4 Update query block bar hover behaviour (#35374)
* Update query block bar hover behaviour

* Smol fix
2025-04-30 17:47:47 +08:00
Joshen Lim
9088aa7fe8 Fix query block not showing labels (#35328)
* Fix query block not showing labels

* Readd the css file for react-resizable.

* Add react-resizable package to resolve a style.css file not found issue

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-28 22:13:38 +02:00
Joshen Lim
3996052921 Add error handling UI for QueryBlock (#35032) 2025-04-21 16:17:45 +07:00
Joshen Lim
5a3d00a56e Support drag drop SQL block from assistant to empty custom report (#34930) 2025-04-14 16:54:33 +08:00
Joshen Lim
84f73bb675 Chore/use readonly connection string for queryblock (#34892)
* Use read only connection string in queryblock

* Add comments
2025-04-11 16:43:06 +08:00
Jordi Enric
1588f04909 Charts: Strings in Y Axis break charts. (#34804)
fix
2025-04-07 18:17:19 +02:00
Joshen Lim
8239e2f27b Cache results in assistant panel (#34509)
* Cache results in assistant panel

* Small fixes

* fix

* disable switching chats while new messages are streaming in

* small comment

* Fix Create new snippet CTA in query block

* Add useCallbacks

* Update

* Remove console log

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-03-31 19:24:21 +08:00
Long Hoang
69726689c9 chore: remove event enums (#33730)
* chore: remove event enums

* chore: remove more event enums

* chore: remove unused HomepageHeroRequestDemoClickedEvent

* chore: remove unused HomepageHeroRequestDemoClickedEvent

* chore: rename custom_report events to use underscores

* chore: remove telemetry enum

* chore: remove unused imports

* chore: remove enums from merged events

* chore: remove unused imports

* chore: add typedocs for module and hide exported types that are not events
2025-02-25 13:08:31 +08:00
Saxon Fletcher
28fe5811de Inline editor feature preview (#33541)
* add edge function knowledge

* deploy edge function mutaton

* add edge function block with deploy

* update function url

* update tools

* editor sql

* add templates

* use monaco editor

* hook up templates

* fixes

* add behind feature flag

* preview docs

* move editor

* initialPrompt

* consolidate widgets

* remove generic editor

* move logic

* fix ts

* include schema metadata

* Fix width of save snippet button

* Set tooltip position

* Use inlineLink component

* Remove unnecessary z index

* Lint

* Lint import statements in EditorPanel

* fixes

* fix keyboard shortcut

* show/hide results and invalidation

* fix focus issues in widget

* fixes

* fix ts

* Support cmd enter shortcut to run query in InlineEditor

* Update InlineEditorPreview to use admonition

* prompt updates

* add discussion url to preview

* schemas array

* One last clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-19 14:58:58 +10:00
Saxon Fletcher
8cc3139b22 fix success message in query block (#33250)
* fix success message in query block

* Small clean up to remove dupe empty results component

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-04 13:33:09 +10:00
Joshen Lim
02d943e9d6 Add refresh button to reports (#33211)
* Add refresh to custom reports

* Add refresh button to API and storage reports

* Add refresh button to database report

* Clean up database report

* Clean up custom report
2025-02-03 11:59:28 +08:00
Joshen Lim
90a939506c Feat/reports v2/misc wrap up (#32989)
* Add telemetry for add SQL block and dragging SQL block from assistant

* Add UI indication for drag support block in Assistant

* Add UI indication for SQL block support in SQL editor Chart options

* Feat/reports v2/create report (#33022)

* re-add chart label

* fix undefined value

* remove mouse over on chart

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-01-23 13:25:31 +08:00
Alaister Young
30c390c19c chore: unify telemetry event sending (#32861)
* chore: unify telemetry event sending

* organize some imports

* remove final useTelemetryProps

* add www telemetry actions typing and docs

* remove gaevents

* fix build

* move telemetry identify into PageTelemetry

* fix telemetry constants import

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-01-22 23:52:32 +08:00
Long Hoang
feaf64e55d Fix event grouping (#32928)
* fix: pass ref and slug for event grouping

* fix: add missing imports

* fix: correct types

* remove duplicate import

* fix: duplicates and extra events from merge

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
2025-01-22 22:41:41 +08:00
Joshen Lim
60763ab1e7 Reports V2: support dragging blocks from assistant to custom report (#32964)
* Support dragging blocks from assistant to custom report

* Show toast when new snippet is created from dragging block into custom report

* Only show drag handle for block in assistant panel if in custom reports

* Feature flag dragging Assistant query block to custom report

* Optimize DX for dragging block into report from assistant

* Update import

* Remove max width

* Fix dragging non sql block causing client crash

* Fix chart suffix

* Fix tooltip value for non % values

* Misc fixes

* Support persisting non sql block line or bar view, and fix cancelling not resetting the block state

* Update

* Preserve chart config when dragging block from assistant to report

* Fix
2025-01-22 16:35:52 +08:00
Joshen Lim
3440dc9c95 Feat/reports v2/standardize block design (#32936)
* Standardize block designs

* Clean up

* Add warning threshold colors for infra-monitoring stats

* Address all other comments

* Swap create custom report to use PUT
2025-01-21 20:56:13 +08:00
Ivan Vasilov
52735e38bf chore: Rename all uses of Tooltip_Shadcn_ to just Tooltip (#32860)
* Rename all uses of Tooltip_Shadcn_ to just Tooltip.

* Fix a leftover change.
2025-01-20 22:23:45 +01:00
Joshen Lim
0129c94cf1 ReportsV2 P2: Support adding SQL snippets to Reports (#32851)
* midway

* Render, save, and save configuration of SQL blocks

* Fix re ordering of blocks not showing save UI

* Remove console log

* Smol fix

* Add queryHeight param to queryBlock

* Reinstate telemetry for run query clicked from assistant

* Add

* Add resizing

* Change compactType

* Fix switching reports doesnt update

* ONly show date picker if theres a chart thats using daily stats or infra monitoring

* Fix client crash

* Smol update
2025-01-20 15:49:32 +08:00
Joshen Lim
0710d62665 ReportsV2 P1: Add Query block component (#32738)
* Create QueryBlock component which will be a shared component used in AI Assistant and Reports

* Deprecate AIAssistantPanel/SqlSnippet.ts

* Fix user messages not getting persisted, only assistant messages

* Add loading state to for query results in QueryBlock + hide block view configuration if query block is not chart

* Address feedback

* Fix TS

* fix double border

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-01-15 13:08:26 +08:00