Skip to content
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

👀 Safe preview: Open notebooks without running #2563

Merged
merged 56 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3cb1b25
👀 Open notebooks without running
fonsp May 15, 2023
2808105
sanitize html WIP
fonsp May 17, 2023
c08a968
Merge branch 'main' into wait-to-run
fonsp May 17, 2023
4639b6e
merge part 2
fonsp May 17, 2023
0d1594c
Use DOMPurify instead of Sanitize API
fonsp May 18, 2023
f2d4523
Link HTML sanitization to JL permission
fonsp May 18, 2023
483b04d
disable fancy html features when sanitized
fonsp May 18, 2023
3115e28
Prevent "restart required" when modifying environment before starting…
fonsp May 18, 2023
6ac699b
Show risky URL source
fonsp Sep 18, 2023
3d6637b
Merge branch 'main' into wait-to-run
fonsp Sep 18, 2023
6fa2501
Store "risky source" in notebook metadata
fonsp Sep 18, 2023
82d089f
Fix "Start notebook in background" button
fonsp Sep 18, 2023
ce84ff7
shorter warning
fonsp Sep 18, 2023
091b48f
Update DOMPurify.d.ts
fonsp Sep 19, 2023
5265e83
css tweaks
fonsp Sep 19, 2023
d919bd3
popup: big option
fonsp Sep 19, 2023
b234b5a
Better info about Safe preview mode
fonsp Sep 19, 2023
3c434a6
Configuration `warn_about_untrusted_code` to disable warnings
fonsp Sep 19, 2023
03d033e
derp
fonsp Sep 19, 2023
ff3a890
Clearly show code and unexecuted cells for untrusted notebook
fonsp Sep 19, 2023
002e8de
css tweaks
fonsp Sep 19, 2023
3be70e7
Update editor.css
fonsp Sep 19, 2023
d10f789
Merge branch 'main' into wait-to-run
fonsp Sep 19, 2023
0e936c2
style tweakz
fonsp Sep 19, 2023
67f8f4c
Render md-only cells in safe preview mode
fonsp Sep 19, 2023
bdcc0d5
small screen CSS tweak
fonsp Sep 19, 2023
afd4a37
Merge branch 'main' into wait-to-run
fonsp Oct 21, 2023
4106b5a
click permission button in frontend tests
fonsp Oct 21, 2023
3436dc8
fixture
fonsp Oct 21, 2023
329d430
Merge branch 'main' into wait-to-run
fonsp Oct 21, 2023
66f7041
Fix sanitization in log display
fonsp Oct 21, 2023
0868a91
backend tests
fonsp Oct 21, 2023
929e9e3
Safe preview for notebooks from clipboard
fonsp Oct 21, 2023
b46d910
part 2
fonsp Oct 21, 2023
1414f65
Frontend tests for opening files
fonsp Oct 21, 2023
1ddabcd
Show message about sanitized html
fonsp Oct 21, 2023
518ad34
Some frontend tests
fonsp Oct 21, 2023
2fa997f
more frontend test stability
fonsp Oct 21, 2023
643a4db
Render cells as queued when restarting process
fonsp Oct 21, 2023
c6340cb
Merge branch 'main' into wait-to-run
fonsp Oct 21, 2023
dbffdea
fix
fonsp Oct 22, 2023
ad2035d
Merge branch 'main' into wait-to-run
fonsp Oct 22, 2023
99ff590
test modifying cells
fonsp Oct 22, 2023
084578b
Merge branch 'main' into wait-to-run
fonsp Oct 22, 2023
a3f5072
Update slide_controls.js
fonsp Oct 22, 2023
fe1adbf
Merge branch 'main' into wait-to-run
fonsp Oct 22, 2023
90dcedc
ugh
fonsp Oct 22, 2023
a4b85cb
Keep the prompt because you are used to press enter
fonsp Oct 22, 2023
ab575e6
asdf
fonsp Oct 22, 2023
87a5a2f
Merge branch 'main' into wait-to-run
fonsp Oct 22, 2023
ca4cc95
fixxx
fonsp Oct 22, 2023
1187e09
Test risky URL
fonsp Oct 22, 2023
2e770f1
hoppa
fonsp Oct 22, 2023
2296d94
frontend tests
fonsp Oct 22, 2023
da27294
tweak
fonsp Oct 22, 2023
bc5860c
Make HTML santizer message more stable
fonsp Oct 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweak
  • Loading branch information
fonsp committed Oct 22, 2023
commit da27294274683ec3e30b56b67094d389f77f8790
2 changes: 1 addition & 1 deletion frontend/components/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const statusmap = (/** @type {EditorState} */ state, /** @type {LaunchParameters
state.backend_launch_phase < BackendLaunchPhase.ready) ||
state.initializing ||
state.moving_file,
process_waiting_for_permission: state.notebook.process_status === ProcessStatus.waiting_for_permission,
process_waiting_for_permission: state.notebook.process_status === ProcessStatus.waiting_for_permission && !state.initializing,
process_restarting: state.notebook.process_status === ProcessStatus.waiting_to_restart,
process_dead: state.notebook.process_status === ProcessStatus.no_process || state.notebook.process_status === ProcessStatus.waiting_to_restart,
nbpkg_restart_required: state.notebook.nbpkg?.restart_required_msg != null,
Expand Down
2 changes: 1 addition & 1 deletion frontend/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const empty_notebook_state = ({ notebook_id }) => ({
path: default_path,
shortpath: "",
in_temp_dir: true,
process_status: ProcessStatus.waiting_for_permission,
process_status: ProcessStatus.starting,
last_save_time: 0.0,
last_hot_reload_time: 0.0,
cell_inputs: {},
Expand Down