Skip to content

Apps, Sync and Publish in the extension #546

Description

@jamesbhobbs

The Deepnote CLI can now sync projects and publish apps (static and TS apps, and Streamlit apps), but the extension has no notion of apps and no Sync or Publish buttons. This issue adds that UI. It calls the bundled CLI with -o json and uses the .env token set up in #545.

Tasks

Apps as a concept

  • Recognise app folders from any of these:
    • publish targets recorded in .deepnote-sync.json
    • a small deepnote-app marker created by deepnote app init
    • Streamlit entrypoints (.py files that import streamlit)
  • List apps under their project in the Deepnote explorer (deepnoteExplorer), with a new app tree item type.
  • Add "Deepnote: New App…", which asks for a template (static, TS or Streamlit) and a folder, then runs deepnote app init.
  • Show the published URL on the app item and in a status bar item when an app file is open.

Sync

  • Add "Deepnote: Sync with Deepnote Cloud" to the Deepnote explorer title bar and to the project's right-click menu. It also goes on the notebook toolbar, shown only when the notebook is inside a synced folder.
  • The flow:
    1. Run a dry run and show the planned pulls, pushes and conflicts.
    2. Ask skip or override for each conflict.
    3. Apply the sync and summarise the results.
  • Use --project to sync just the current project when available.
  • Keep this clearly separate from the existing "Open in Deepnote" button, which uploads a copy rather than syncing.

Push notebook to cloud

  • Add a notebook toolbar button that runs deepnote run --cloud --push.
  • Before running, show the planned changes (added, changed and deleted blocks) and ask the user to confirm, then pass --yes. Confirmation matters because it deletes cloud blocks that aren't in the local file.

Publish app (static and TS)

  • Add "Deepnote: Publish App…" to app items, folder right-click menus in the file explorer, and the command palette.
  • The flow:
    1. Pick the project, taken from the synced folder where possible and otherwise from deepnote projects list.
    2. Choose API access on or off.
    3. Optionally set a build command for the folder, such as npm run build, then publish dist/.
  • Remember these choices per folder, so republishing is one click.
  • When it finishes, show the URL with Open and Copy buttons.
  • If publish reports that Deepnote has newer changes, offer "Sync first", "Force" or "Cancel".

Publish Streamlit app

  • Add an editor title bar button on Streamlit .py files.
  • The flow:
    1. Make sure the file is in the project, running sync --all-files to push it if needed.
    2. Warn that creating the app restarts the project machine.
    3. Run streamlit publish.
    4. Show progress while it waits, then the URL.

Done when

Blocked by #545, deepnote/deepnote#543 and, for Streamlit, deepnote/deepnote#466.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions