Commit Graph

14 Commits

Author SHA1 Message Date
Charis 4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Joshen Lim a057c951ea Make edge functions page accessible on coming up (#42549)
## Context

Related prior work was making edge functions page accessible while
project is restoring - however the status of the project gets flipped to
COMING_UP while it's restoring hence why the functions page was still
inaccessible.

## Changes involved

- Update `NavigationBar.utils` to have edge functions link to
`/functions` irregardless of project status
- (Unrelated) Disable (with tooltip) deploy new function CTA on edge
functions page if project is not active
<img width="403" height="108" alt="image"
src="https://github.com/user-attachments/assets/88479247-999b-4d41-a444-6705f8c3993e"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Deploy Edge Function button now disables and shows a tooltip when the
project is inactive to make deployment status clear.

* **Bug Fixes**
* Edge Functions link now points consistently to the functions view
regardless of project build state.

* **Refactor**
* Consolidated project-active check and reorganized related UI wiring to
standardize inactive-state handling across settings and controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-09 16:56:23 +08:00
Joshen Lim f293036ec7 Add UX guardrails for edge functions RE unsaved and unimported files (#41921)
* Add UX guardrails for edge functions RE unsaved and unimported files

* useLatest on hasUnsavedChanges

* Remove checking of unimported files + add VS code like indicator for modified and unsaved files

* Nit

* Fix TS

* Fix

* nit

* Fixes

* Nit

* move hasUnsavedChanges on demand

* code rabbit nit

* code rabbit nit 2

* prettier

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-01-22 13:31:28 +08:00
Francesco Sansalvadore 5213e681b4 feat(studio): add "create" command menu commands (#41473) 2025-12-29 09:18:06 +01:00
Lakshan Perera b698230349 fix: allow using .tsx and .jsx as entrypoints in functions (#40885) 2025-11-28 14:21:04 +08:00
Ali Waseem 86755ba1fd feat: Edge functions search and sorting (#40796)
* added sorting and search for edge functions

* updated logic

* updated types

* updated types

* updated search bar

* updated to remove unneeded map
2025-11-25 13:37:34 -07:00
Lakshan Perera 426c371d59 fix: correctly set entrypoint, import map path and static patterns for new functions (#40368)
* fix: correctly set entrypoint, import map path and static patterns for new functions

* Smol refactor

* Use TimestampInfo for last updated column in edge functions

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-12 17:13:22 +08:00
Lakshan Perera 95eedb927e Updates to Edge Functions dashboard code editor (#39991)
* feat: use mgmt-api's function body endpoint

* skip json files from static patterns

* set the default content for deno.json

* feat: add drag and drop file support to FileExplorerAndEditor

- Add drag and drop functionality to accept files
- Dropped files are automatically read and added to the files list
- Visual feedback with drag overlay during drag operations
- Files maintain existing data format with id, name, content, and selected state
- Last dropped file is automatically selected for editing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add binary file handling to FileExplorerAndEditor

- Add binary file detection for common file extensions (.wasm, images, executables, etc.)
- Show "Cannot Edit Selected File" error message when trying to edit binary files
- Binary files dropped via drag-and-drop retain their original binary content
- Only show error in editor view, files remain accessible in file list
- Text files continue to work normally with full editing capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* do not ignore empty files

* exclude wasm files from static patterns

* Remove eszip parser test as dependency has been removed

* Fix TS issues

* Fix TS issues

* Fix pnpm-lock

* Fix

* Fix

* Nit

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-30 14:30:54 +08:00
Saxon Fletcher 738c568e6b Sidebar manager (#39795)
* sidebar-manager

* storage keys

* tests

* more ai spots

* test fix

* revert to default

* remove ref

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix ts

* fix

* fux

* fux query param

* clean

* fix

* more

* mock local storage

* simplify

* remove provider test

* remve useopensidebar

* fix(new homepage): open ai assistant on advisor card button clicks

* Update apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* refine

* FIX

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-10-28 10:07:21 +10: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 c1f964bc06 Add edge functions empty state for local/self-host (#36322)
* Add edge functions empty state for local/self-host

* Update based on feedback + add secrets page

* Nit

* Nit copy
2025-06-16 16:02:13 +08:00
Terry Sutton ba001856e1 Add ef loading state (#36124)
* Add ef loading state

* Add prop
2025-06-03 13:16:30 +08:00
Saxon Fletcher a4cac72473 Deploy edge function warning (#34555)
* fix: add jsr:@std/path module

* fix: use relative paths for files in editor

* add a deploy warning to edge functions update

* hide deploy if can't write

* remove retry

* Fix

* Small clean up

* Address feedback

* Fix

---------

Co-authored-by: Lakshan Perera <lakshan@laktek.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-31 18:02:41 +08:00