feat(journey): recover project and session journey workflow - #827
Draft
Harry19081 wants to merge 41 commits into
Draft
feat(journey): recover project and session journey workflow#827Harry19081 wants to merge 41 commits into
Harry19081 wants to merge 41 commits into
Conversation
(cherry picked from commit 8121d4c)
(cherry picked from commit 240867c)
Add Workspace→Project→WorkItem→Session/Todo tree and project journey view with mainline pin, file category blink, and soft prune. Ship as org2-patch parallel to production ORG2. (cherry picked from commit 647d981)
(cherry picked from commit 3387310)
(cherry picked from commit 74fdc15)
(cherry picked from commit 047ca47)
(cherry picked from commit 7580fc904750090c463179e08dd3d16cd653d4b5)
(cherry picked from commit 0f3cb16)
(cherry picked from commit ad985b1)
(cherry picked from commit 8a3ec2b)
(cherry picked from commit eca1065)
(cherry picked from commit e55b2eb)
Replace the P1 fail-closed stub with the real data path:
- read persisted canonical sessions/edit artifacts/commit links
- scope filter: project/{id} matches workspace_path; session/{id}
selects the session plus its parent lineage chain
- project_canonical_journey projector + independent audit (fail closed
on uncovered canonical units)
- fork edges only emitted when parent is inside the selected scope
(cherry picked from commit 755ae6d)
…t store
project/{id} now reads linked_repos_json from projects.db and selects
every canonical session whose workspace_path is inside one of the linked
workspaces (exact or direct child). Unknown project ids and projects
without linked workspaces stay fail-closed: no guessed paths, no
synthesized data.
(cherry picked from commit db1b6b3)
Journey-only extraction from mixed historical commits. (cherry picked from commit eb31a18ed606d9b7e071944ab6a7d4262f3a3596) (cherry picked from commit dbe58cb6cf6313a73f2c4bb23b814a8aa2c77ce)
(cherry picked from commit 4262031)
(cherry picked from commit bbf3af2)
(cherry picked from commit 465ba79)
(cherry picked from commit 4ae9c1b)
(cherry picked from commit 274c916)
(cherry picked from commit 1cbb5ed)
(cherry picked from commit 83a0cc8)
(cherry picked from commit 5330b0c)
(cherry picked from commit ed29374)
(cherry picked from commit 37ac161)
(cherry picked from commit 492d9c1)
(cherry picked from commit 186e080)
(cherry picked from commit c2bf1a9)
(cherry picked from commit 572d378)
(cherry picked from commit fc7756a)
The canonical Journey graph fails closed on sessions whose durable journey.project_id is absent, but no producer ever populated it: both session mirrors dropped the project/work-item link on the floor, so journey_graph_query rejected every scope. Work-item link writes also skipped the mirror hook, leaving the canonical store stale until an unrelated session write. - populate journey.project_id / journey.work_item_id from the authoritative agent_sessions row in both mirror producers - fire the session mirror hook from update_work_item_link and link_bootstrap_work_item, matching the sibling link writers - add producer-boundary regression tests for linked and unlinked sessions on both mirror paths - drop the orphaned orgtrack/journey.rs left shadowed by the journey_canonical #[path] module
…recovery # Conflicts: # src/engines/ChatPanel/ChatHistory/index.tsx # src/engines/ChatPanel/ChatView.tsx # src/engines/ChatPanel/ChatViewHistorySurface.tsx # src/engines/ChatPanel/ChatViewTypes.ts # src/modules/ProjectManager/Panels/ProjectManagerSidebar/content/WorkspaceOrgTreeContent.tsx # src/modules/WorkStation/Chat/Communication/MessageViewer.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #770 contains a substantial contributor-built Journey feature, but repeated rebases and force-pushes left duplicated commit history and conflicts with current
develop. Replaying the branch wholesale would also restore obsolete app-shell/history paths and unrelated provider, key-vault, search, release, and ProgressMindMap changes.The missing product capability is one cross-layer workflow: a canonical Project → Session Journey, explicit task/fork/checkpoint/review lifecycle state, branch-scoped provider history, and exact navigation back to the durable transcript evidence.
Solution
Recovered the focused Journey workflow onto current
developusing cherry-picks with source provenance, then adapted conflicts to the current architecture:orgtrack_graphcrate into the desktop application; no third-party dependency was added.Contributor commits whose changes were already represented were skipped instead of replayed as duplicate patches. Obsolete Journey Station routes and mixed-scope provider/key-vault/search/release changes were intentionally excluded.
Integrating current
develop(through47d3bbb6a) required adapting the feature to interfaces that moved underneath it:ChatViewwas rebuilt on develop'sChatViewLiveRegion/ChatViewComposerSectionsplit. The Journey controls'latestUserMessageIdis now aselectAtomoverchatEventsForSessionAtomFamilyrather than reading the removedchatEventsarray, so it keeps develop's narrowed-subscription behavior.scrollToIndexhandle to develop's DOM-firstscrollToChatTarget, passing the durable message id alongside the display flat index.lucide-react(deleted on develop) onto the@src/iconsbarrel, followingdocs/hugeicons-migration/icon-mapping.md.WORKSTATION_TAB_ICONSgainedFolderTree/GitForkso the Journey tabs resolve a glyph, as required by develop'sworkstationTabIconsguard test.journey_commands::open_connectionnow returnsdatabase::db::PooledConnection, matching develop's pooledget_connection()and the sibling command modules.Potential risks
ChatView,ChatHistory,MessageViewer) where develop had just landed its own subscription-narrowing and find-in-chat rework. The merged behavior is covered by the full frontend suite, but the Journey controls' placement inside the newtranscriptslot and the exact-target scroll path are the two spots most worth a reviewer's eye.loadSessionRostercalled but not imported inWorkstationSidebarConnector— the branch head did not typecheck. That is now fixed, but it means the pre-merge state of this PR was not building, so earlier verification claims on this branch should be read as covering the feature rather than the branch head.Verification
pnpm typecheck— passed.src/**/*.tsandsrc/**/*.tsxwith--max-warnings 0— passed.cargo test -p agent_core journey --lib— 51 passed.cargo test -p agent_core persistence::messages --lib— 15 passed.cargo test -p orgtrack_graph journey— 7 passed.cargo test -p orgtrack_core— 547 passed / 8 ignored local-data benchmarks.cargo test -p org2 journey— 6 passed; targeted runtime artifact projection — 1 passed; targeted file-session-history fixtures — 4 passed.cargo check -p org2— passed.cargo clippy --workspace --all-targets -- -D warnings— passed under Rust 1.97.0, matching the failed CI job's toolchain and exact command.rustfmt --checkover every Rust file changed by this branch with child traversal disabled — passed.git diff --checkand added-line scans for secrets, personal paths, debug logging, build artifacts, and caches — passed.cargo fmt --all -- --checkwas also attempted. It still reports formatting drift in three files unchanged by this PR:render_inline_canvas.rs,ui_metadata_tests.rs, andturn_window.rs. Those baseline files were not reformatted into this feature PR.Not run: rendered WDIO/Tauri E2E, visual screenshots/recordings, real-process performance measurements, and Windows/Linux platform checks.
Develop integration re-verification (2026-08-28, merged tree at
4ed6e02a4)Re-run in a dedicated worktree after merging
origin/develop(4dd3f30ae, then47d3bbb6a) and resolving six conflicted files plus seven semantic breaks the auto-merge left behind:tsc --noEmit— passed.--max-warnings 0 --report-unused-disable-directivesover every file touched while resolving — passed.The service is no longer running; that is host memory pressure on this machine, not a code failure, and the chunked runs cover the identical file set.cargo check --workspace --all-targets— passed.cargo clippy --workspace --all-targets -- -D warnings— passed.cargo test -p agent_core journey --lib— 51 passed.cargo test -p orgtrack_graph journey— 7 passed.cargo test -p orgtrack_core— 578 passed / 8 ignored.cargo test -p git_api— 123 passed / 1 ignored;cargo test -p git— 135 passed. (Both crates changed on develop inside this merge.)cargo test -p org2 journey— 10 passed.cargo clippyall passed.Note for anyone reproducing the Rust checks locally: the first
cargo clippyrun reported 39 phantom resolution errors claiming the Journey types were absent fromorgtrack_core/orgtrack_graph. Those were stale artifacts in the shared~/.cargo/shared-targetdirectory leaking across worktrees;cargo clean -p orgtrack_core -p orgtrack_graphcleared it and clippy then passed.Still not run: rendered WDIO/Tauri E2E, visual screenshots/recordings, real-process performance measurement, and Windows/Linux platform checks. This PR stays in Draft for that reason.
Contributor credit
This feature was primarily contributed by @chsimonpan. Their original commit authorship and cherry-pick provenance are preserved throughout this PR; the recovery work resolves the rebased history and adapts the feature to current
develop.Audits
docs/architecture-audit-2026-08-17/SessionJourneyRecovery.md— pass for draft review across all ten layers.docs/frontend-ui-audit-2026-08-17/ProjectTreeAndSessionJourney.md— 0 fix / 10 keep-with-reason / 0 abstract. The configured audit skill was unavailable, so the equivalent review is recorded manually.docs/org2-performance-guard-2026-08-17/SessionJourneyRecovery.md— lifecycle invariants pass; release verdict remains blocked on real-process measurement.