Skip to content

dashboard v2#3

Merged
folkadonis merged 1 commit into
mainfrom
feature/ui-v2
Mar 20, 2026
Merged

dashboard v2#3
folkadonis merged 1 commit into
mainfrom
feature/ui-v2

Conversation

@folkadonis

Copy link
Copy Markdown
Owner

No description provided.

@folkadonis folkadonis merged commit 586d8eb into main Mar 20, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 960061f6ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread flowk/cli.py

# Create a dummy graph to host the dashboard if none is provided
# It will still serve the /ui/sessions etc. from the global memory store
dummy_graph = Graph(checkpoint_db="flowk_memory.db")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Let flowk ui open the user's checkpoint database

flowk ui now always boots a dummy Graph(checkpoint_db="flowk_memory.db"), so any runs saved under another SQLite filename or a Redis URL are invisible to the dashboard. In practice this makes the new CLI observability flow work only for the hard-coded file instead of the database the user actually ran their graph against.

Useful? React with 👍 / 👎.

Comment thread flowk/server.py
Comment on lines +37 to +38
if os.path.exists(ui_dist):
app.mount("/assets", StaticFiles(directory=os.path.join(ui_dist, "assets")), name="assets")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship a built frontend bundle before serving the v2 dashboard

create_app() only mounts the UI when flowk/ui/v2/dist exists, but this change only adds the Vite sources and .gitignore explicitly excludes dist. In a source checkout or sdist install, flowk ui will still start Uvicorn but there is no / page or static asset bundle to serve, so users get an API-only server instead of the advertised dashboard.

Useful? React with 👍 / 👎.

Comment thread flowk/ui/v2/src/main.js
Comment on lines +68 to +69
// Picking the latest run for this session
const runId = runs[runs.length - 1];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop treating the last run id as the newest run

selectSession() assumes runs[runs.length - 1] is the latest execution, but /ui/session/{id}/runs is backed by StorageRegistry.list_runs(), which returns Redis set members and SQLite rows without any ordering guarantee. For sessions with multiple runs, the dashboard can silently open an older trace and state diff while presenting it as the most recent run.

Useful? React with 👍 / 👎.

Comment thread flowk/graph.py
for val, tgt in mapping.items():
edges.append({"source": src, "target": tgt, "type": "route", "label": str(val)})

StorageRegistry.save_graph("default", {"nodes": nodes, "edges": edges})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist graph topology under a non-global key

Each compile() now overwrites the graph snapshot under the constant id default, and /ui/graph always reads that same record back. If one checkpoint database contains multiple graphs or successive versions of a graph, the dashboard will render whichever topology compiled last rather than the topology that produced the selected historical run.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant