Commit graph

22 commits

Author SHA1 Message Date
Jonatan Kłosko 19baf013d5
Introduce a dedicated channel for JS widget communication (#843)
* Introduce a dedicated channel for JS widget communication

* Handle payload serialization errors

* Tie channel lifetime to the session

* Catch serialization errors instead of encoding twice

* Merge JS static and dynamic outputs

* Authenticate socket connection from session

* Update JS output format

* Remove unused helper

* Apply review comments
2022-01-06 16:31:26 +01:00
Jonatan Kłosko 844242ba80
Add support for JS output widgets (#818)
* Add support for JS output widgets

* Don't block session when fetching assets and batch calls

* Improve path component sanitisation

* Move fetching check to session caller

* Attach origin to connect and event messages
2021-12-24 14:18:34 +01:00
Jonatan Kłosko 4493a60380
Improve runtimes UI (#655)
* Show reconnect for all runtime types when applicable

* Make it clear which runtime is the default

* Show Mix.install restart suggestion only for standalone runtimes

* Fix tests not to rely on the default runtime tab
2021-10-28 19:41:07 +02:00
Jonatan Kłosko cfb719cbb0 Fix dialyzer warnings 2021-08-31 22:19:52 +02:00
Jonatan Kłosko acd100f3d3
Improve intellisense to handle structs and sigils (#513)
* Update Code.Fragment backport

* Support structs completion and show module subtype

* Support sigil completion

* Update changelog

* Don't show completion items for hidden modules

* Update Code.Fragment backport
2021-08-23 10:42:18 +02:00
Jonatan Kłosko 8e6558a83a
Introduce file system abstraction and an S3 implementation (#492)
* Introduce file system abstraction and an S3 implementation

* Support arbitrary absolute paths and delegate resolution to file system

* Remove accidental notebook file

* Apply suggestions from code review

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Apply review comments

* Add missing path assertions

* Apply review comments

* Fix test saving notebook in project root

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-08-13 21:17:43 +02:00
Jonatan Kłosko ef06e49d18
Show full documentation when hovering over an identifier (#453)
* Show full documentation when hovering over an identifier

* Remove leftover function

* Improve determining subject boundaries
2021-07-20 21:30:53 +02:00
Jonatan Kłosko d55c4a1ccc
Introduce branching sections (#449)
* Introduce branching sections

* parent_index -> branch_parent_index

* Flip the branch icon

* Don't mark branching sections as aborted if the main flow crashes

* Outline more details about branching sections in the Elixir and Livebook notebook

* Add branch indicator to the sections sidebar
2021-07-15 18:19:36 +02:00
Jonatan Kłosko 20ff5c95b8
Suggest restarting runtime on Mix.install error and add restart shortcut (#418)
* Suggest restarting runtime on Mix.install error and add restart shortcut

* Apply review comments
2021-07-01 13:23:07 +02:00
Jonatan Kłosko c4a96bc99c
Add support for Mix runtime as the default one (#334)
* Add support for Mix runtime as a default

* Support default runtime options in the CLI

* Set cell status to queued while runtime is being started

* Clean up tests
2021-06-09 16:24:02 +02:00
Jonatan Kłosko ea93edcc86
Add embedded runtime for evaluating code in the Livebook VM (#266)
* Add embedded runtime for evaluating code in the Livebook VM

* Update lib/livebook_web/live/session_live/embedded_live.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Use standard error proxy globally in the Livebook node

* Add configuration env variable for setting the default runtime

* Increase evaluation response assertion timeouts

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-05-10 14:37:38 +02:00
Jonatan Kłosko 700987dc02
Add editor completion to Elixir cells (#208)
* Implement editor completion for Elixir cells

* Add completion tests

* Refactor completion

* Only extract Markdown docs for now

* Fix Elixir version-dependent test

* Fix docs matching

* Use upcoming Code.cursor_context/2

* Start temporary completion processes under a supervisor

* Show Erlang docs in completion items

* Update to latest Code.cursor_context

* Refactor completion

* Fix module completion when alias expands to Erlang module

* Remove tests-generated notebook

* Show variables and map fields differently

* Adjust signatures formatting
2021-04-20 19:34:17 +02:00
Jonatan Kłosko d48ae131e6
Add test for standalone Mix runtime (#184) 2021-04-14 20:12:14 +02:00
Jonatan Kłosko cf35a46ecf Create write-protected file on the fly in tests 2021-04-14 16:48:11 +02:00
Jonatan Kłosko 83b94c6b0b Add test for selecting a write-protected file 2021-04-14 16:39:12 +02:00
Jonatan Kłosko 5e20541774
Set proper file in env when the notebook is persisted (#95)
* Set proper file in env when the notebook is persisted

* Fix typo
2021-03-21 16:53:00 +01:00
Jonatan Kłosko 8b37e32e3a
Escript (#77)
* Set up Escript packaging

* Use MD5 digest sa ETAG

* Make sure changes to the static files recompile the relevant module

* Manually start the application in Escript

* Set up basic CLI

* Run formatter

* Start Elixir app before anything else

* Improve version output

* Build Escript to project root directory

* Improve assets handling

* Move plug related modules under plugs directory

* Include bundled assets in the repository

* Use the same plug with different static providers in prod and dev

* Refactor providers

* Rename StaticProvidedPlug to StaticPlug
2021-03-17 01:53:44 +01:00
Jonatan Kłosko dae6d5c9c3
Rename project (#68)
* Rename references

* Update file and directory names

* Fix homepage tests
2021-03-03 22:56:28 +01:00
Jonatan Kłosko 0925ec77cd
Implement notebook persistence and import (#44)
* Basic filesystem navigation

* Add file picker modal

* Implement autosave when dirty and show the status

* Add hompage link in the session view

* Improve file picker and use in both places

* Move session list to homepage

* Some refactoring

* Show import messages if any

* Fix and extend tests

* Show a message when there are no sessions running

* Rename import to fork and make that clear in notebook name

* Fix old route

* Show info when no file is connected to the given session

* Show runtime type next to filename

* Show button for joining session when a running path is selected

* Move modal components to SessionLive namespace

* Add FileGuard to lock files used for notebook persistence

* Use radio for specifying persistence type

* Don't lock nil path

* Simplify FileGuard implementation

* Test notebook persistence

* Fix typo

* Further simplify FileGuard

* Improve file listing

* Don't show parent dir when there's a basename being typed

* Add path component tests
2021-02-21 16:54:44 +01:00
José Valim 309c9c8a51
Update to Elixir v1.11 and remove unused files (#32) 2021-02-16 12:29:41 +01:00
Jonatan Kłosko 79e5c432b3
Move evaluation to a separate Elixir runtime (#20)
* Isolate evaluation in separate node for each session

* Start new remote upon first evaluation and handle nodedown

* Add UI for managing evaluation node, improve naming and structure

* Show runtime initialization errors and some fixes

* Improve standalone node initialization

* Correctly handle multiple sessions connecting to the same node

* Fix session tests concerning evaluation

* Documentation and some refactoring

* Various improvements

* Configure schedulers to get to sleep immediately after evaluation

* Move EvaluatorSpervisor into the Remote namespace

* Fix evaluators cleanup

* Add tests

* Improve flash messages

* Introduce remote genserver taking care of cleanup

* Redefine the Runtime protocol to serve as an interface for evaluation

* Cleanup operations

* Use reference for communication with a standalone node

* Use shortnames for distribution by default

* Update node configuration and make sure epmd is running

* Rename Remote to ErlDist
2021-02-11 12:42:17 +01:00
José Valim 79792777a7 Initial commit 2021-01-07 20:56:24 +01:00