Skip to content

feat(ui): add KG manage workspace, data sources maintenance, and extraction chat#749

Draft
aredenba-rh wants to merge 80 commits into
mainfrom
dev-lead/refresh-data-button
Draft

feat(ui): add KG manage workspace, data sources maintenance, and extraction chat#749
aredenba-rh wants to merge 80 commits into
mainfrom
dev-lead/refresh-data-button

Conversation

@aredenba-rh

Copy link
Copy Markdown
Collaborator

Summary

  • Add the KG manage workspace hub (/knowledge-graphs/[kgId]/manage) with mode-aware navigation, graph management assistant, mutation logs, and inline extraction job controls.
  • Introduce KG-scoped data sources onboarding and maintenance (/knowledge-graphs/[kgId]/data-sources) with bulk commit checks, ingestion prep, and a Refresh data action for manual table reloads (Add Refresh data button to KG data-sources overview #747 / feat(ui): add Refresh data bulk action to KG data-sources overview #748).
  • Wire extraction sticky session runtime and streaming chat turn APIs into the dev-ui, plus supporting ingestion/management backend changes for ingest-only sync, commit refs, and prepared JobPackage metadata.

Test plan

  • cd src/dev-ui && npm test — dev-ui unit tests
  • make test-unit — API unit tests
  • Manual: KG manage workspace — navigate steps, trigger sync, view logs, use graph management assistant
  • Manual: KG data sources — add repos, check for new commits, prepare sources, refresh data, confirm table updates
  • Manual: verify global /data-sources catalog still works for onboarding and per-source actions

Made with Cursor

aredenba-rh and others added 30 commits May 26, 2026 12:58
* chore(skills): add subagent delivery execution protocol

Add a reusable subagent skill that standardizes issue-based branching,
TDD execution, PR structure, and merge/conflict handling into
feature/manage-knowledge-graph.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(management): add knowledge graph workspace mode lifecycle

Implement schema_bootstrap as the default workspace mode and persist
irreversible transition state to extraction_operations across domain,
repository, API responses, and migration coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
…681)

Add a workspace-status API projection with mode, readiness flags,
transition eligibility, and session pointers, including service and
route authorization coverage for manage workspace rendering.

Co-authored-by: Cursor <cursoragent@cursor.com>
…#682)

Enforce workspace readiness checks for minimum entity/relationship type
coverage and prepopulated type instance presence, and project blocking
reasons so validate/transition workflows can render actionable feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose authorized validate and transition commands for knowledge graph
workspaces, persist session pointers, and create an extraction-mode
session identifier when moving from bootstrap to extraction operations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add durable run-level mutation metadata storage and lifecycle persistence
for session/scope identity, timestamps, token-cost totals, and
operation-count summaries linked to each sync run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Emit operation-class counts and token/cost totals from mutation-log
application results into MutationsApplied payloads so downstream sync
lifecycle persistence can finalize run-level metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
#686)

Scaffold extraction application/presentation package structure and add
pytest-archon rules enforcing DDD layer boundaries plus cross-context
isolation so subsequent extraction features stay architecturally clean.

Co-authored-by: Cursor <cursoragent@cursor.com>
Implement per-user/per-knowledge-graph/per-mode extraction session
lifecycle behaviors with clear-chat reset semantics and archived-session
retention backed by repository ports and unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve mode-specific extraction skill templates from global defaults and
apply deterministic knowledge-graph override merges so session prompts are
stable, customizable, and repeatable.

Co-authored-by: Cursor <cursoragent@cursor.com>
)

Persist extraction agent sessions and expose scoped APIs for active/list/clear-chat so reset creates a fresh session while preserving archived history and runtime context audit records.

Co-authored-by: Cursor <cursoragent@cursor.com>
Persist clone-head, last-extraction baseline, and tracked-branch head
commit references for data sources and expose them in management API
responses for downstream ingestion and UI commit-status workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prepare Git-backed ingestion context by loading data-source commit references,
refreshing tracked branch head, and passing baseline commit plus resolved
credentials into the ingestion pipeline before packaging begins.

Co-authored-by: Cursor <cursoragent@cursor.com>
# Conflicts:
#	src/api/ingestion/application/services/ingestion_service.py
#	src/api/ingestion/infrastructure/event_handler.py
#	src/api/ingestion/ports/services.py
#	src/api/tests/unit/ingestion/infrastructure/test_ingestion_event_handler.py
Skip heavy extraction when tracked branch head equals the last extraction
baseline by emitting a completed lifecycle event and recording an explicit
no-change audit log entry on the sync run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose a data-source diff summary API that compares the last extraction
baseline to tracked branch head and returns aggregate counts plus a
large-list-safe changed-file preview for maintenance decisions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Show commit-based diff counts immediately on each data source card and
render the changed-file list as collapsed-by-default with explicit
expand/collapse controls for large-diff safe browsing.

Co-authored-by: Cursor <cursoragent@cursor.com>
…695)

Add explicit data-source actions to refresh tracked/clone commit references and adopt tracked head as the current extraction baseline. This lets the UI surface per-source changed-file counts with user-controlled commit context updates for maintenance decisioning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Strengthen subagent delivery guidance with a parallel execution model, required context packs, and a blocker-question escalation flow so multiple agents can pause and ask focused questions without serializing delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
…678) (#697)

Add structured mode-specific agent configuration (system prompt, hierarchy, guardrails, and skill pack defaults) and wire session initialization to resolve and persist the configuration per knowledge graph scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
) (#698)

Seed schema bootstrap sessions with a capabilities-intake prompt that offers first-pass or guided co-design paths, and persist the selected path/capability summary in session runtime context so the conversation remains continuous across requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
…679) (#699)

Build a filesystem runtime context for extraction workloads by materializing ingestion package resources, reconstructing repository files, and exposing a deterministic skills directory path; wire it through extraction event handling and local/deployed container configuration.

Co-authored-by: Cursor <cursoragent@cursor.com>
#700)

Enhance schema browser rows to display prepopulated type indicators and live per-type instance counts with lazy query-backed loading, while extending shared type contracts and tests to cover the new inspector metadata behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
…671) (#701)

Add manage-authorized run-control operations (start, pause, halt, reset_running, reset_failed, reset_completed, reset_all) over data source sync runs, expose them via dedicated management routes, and verify behavior with unit tests for both service transitions and HTTP contract responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose sync-run token/cost metadata in management API responses and add an extraction telemetry dashboard in the data-sources workspace with active worker counts, status buckets, recent job events, and 24h cost trend indicators backed by auto-refreshing sync data.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add knowledge-graph scoped maintenance schedule APIs with timezone-aware cron evaluation and persisted run outcomes, then expose the controls and history in the data-sources operations UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
…704)

Extend the mutations console with a conversation-assisted draft flow and live entity/relationship inspector that highlights edited fields during the active session and resets highlights after apply/refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace legacy row actions with Manage, Query, and Delete, remove inline edit controls from the list surface, and align structural tests to the new action contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
)

Implement a dedicated manage workspace route that loads workspace status projection, shows readiness and session pointers, and provides Validate and transition-to-extraction controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the manage workspace page with an always-visible extraction conversation panel, clear-chat reset action, and a tabbed lower operations area for extraction jobs, manual mutations, and run/log navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
aredenba-rh and others added 27 commits May 26, 2026 14:26
Introduce k-extract-style full-page routes for connecting repositories
from the knowledge graph manage workspace: wizard at /data-sources/new
with post-create sequential sync, and an operations page when sources
already exist. Closes #736.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the local get_management_settings import that caused UnboundLocalError
and left sync runs stuck in ingesting after lifecycle updated.

Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh commits updates tracked head only; advance extraction baseline on
successful sync. Parallelize wizard ingest prep and add phase1-style overview table.

Co-authored-by: Cursor <cursoragent@cursor.com>
Track last prepared commit and file count during ingest-only runs so the
overview can show branch freshness, file totals, and bulk prepare/check flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rework the manage overview into a phased workspace hub and add unpulled-commit
tracking on data sources so ingestion status matches a git-pull mental model.

Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(ui): align graph management step with k-extract phase2 layout

Rework the design chat, schema/session panels, and mode switcher with locked
extraction modes until the workspace transitions to extraction operations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ui): rename graph management chat title to Graph Management Assistant

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(extraction): specify sticky session chat turns and runtime

Document Graph Management chat as NDJSON streaming turns inside sticky
Claude Agent SDK containers with JobPackage gating and UI mode skills.

Closes #738

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
…#744)

Introduce sticky-session-aware chat orchestration with JobPackage gating,
UI-mode skill overlays, and a tracer-bullet deterministic agent. Closes #739.
Closes #740.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stream NDJSON chat turns with thinking/wait activity lines and reload session
history after each turn. Closes #741.

Co-authored-by: Cursor <cursoragent@cursor.com>
…746)

Ship kartograph-agent-runtime container image with NDJSON turn API, mount
skills and JobPackage workspaces, inject chat-scoped workload tokens, and
delegate graph-management chat turns to the remote runtime when container
backend is enabled. Closes #742.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align sticky Claude Agent SDK containers with k-extract Vertex auth and warm
the graph-management assistant on UI entry with streamed readiness progress.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent JIT provisioning conflicts when Keycloak re-imports the realm and
Postgres still holds rows keyed by the previous SSO subject.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mount gcloud credentials at /gcloud/config and run sticky containers as the
host UID so Claude Agent SDK can reach Vertex AI, while keeping the API root
for Docker-out-of-Docker in dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the redundant branch tip column from the KG data sources table.

Co-authored-by: Cursor <cursoragent@cursor.com>
Load prepared archives even in schema-design mode, refresh the workspace
on chat reuse, point Claude SDK at /workspace, and remove sibling sticky
and worker containers during make down.

Co-authored-by: Cursor <cursoragent@cursor.com>
Incremental prepares were overwriting last_prepared_file_count with the
number of changed files, so the data sources table showed the wrong
"Files on branch" value after subsequent prepares.

Co-authored-by: Cursor <cursoragent@cursor.com>
Background refreshes no longer toggle the page-level loading gate, so
prepare polling updates status in place with a subtle updating indicator.

Co-authored-by: Cursor <cursoragent@cursor.com>
Graph Management and other manage steps no longer stretch edge-to-edge
on wide screens, matching the data sources workspace layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose job_package_available on data source listings, rematerialize when
the ZIP is gone, and skip ingest-only no-changes short-circuit without it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip workspace rematerialization when the container is healthy and JobPackage
IDs match, report 503 until the agent workspace is ready, and only save user
messages after the assistant turn completes or fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ct layout

Split the combined schema nav/detail card into a sticky left navigator and
right detail column to match k-extract's Design Artifacts pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
Surface tool use, reasoning, task progress, and compose previews as NDJSON
thinking events so the Graph Management Assistant panel updates while Vertex
work is in flight.

Co-authored-by: Cursor <cursoragent@cursor.com>
…kspaces

Ensure ingest-only prepares full-branch JobPackages and only materialize packages that contain repository content so Graph Management sessions can reliably read repo files. Add workspace source indexing plus prompt/thinking updates so the agent reports accurate available files and tools.

Co-authored-by: Cursor <cursoragent@cursor.com>
Process SyncStarted outbox events with bounded concurrency and fetch GitHub blobs in parallel to reduce ingestion-context preparation time for multi-source batches.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ement

Expose separate schema-entities and schema-relationships rail items with readiness-driven status and detail panels so designers can track type coverage before transitioning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lets users reload sources, sync runs, and diff summaries via the
existing silent loadDataSources path without triggering commit-refs
refresh or ingestion prep.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d3d2d335-17d0-4412-a11a-6e4d27b321e8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/refresh-data-button
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch dev-lead/refresh-data-button

Comment @coderabbitai help to get the list of available commands and usage tips.

+ "\n"
)

return StreamingResponse(event_stream(), media_type="application/x-ndjson")
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.

2 participants