feat: standalone Goal Tree page with 3D tree and list views#81
feat: standalone Goal Tree page with 3D tree and list views#81
Conversation
…nalysis Reviewed all 3 existing POSThuman repos (CLI, Ionic, Meteor) from 2018. Drafted complete web feature list and recommends integrating as a Digital Twin daily check-in tab rather than standalone app due to strong M42/M49 synergy.
Add hierarchical goal system with parentId/tags fields, lazy migration, cycle detection, orphan-on-delete reparenting, and a new /goals page with 3D Three.js tree visualization and collapsible list view.
There was a problem hiding this comment.
Pull request overview
Adds hierarchical goals (parent/child + tags) and a standalone Goals page that can render both a 3D tree visualization and an indented list, backed by a new server endpoint that returns a computed goal tree.
Changes:
- Server: extend goal schema with
parentId+tags, add lazy migration, add cycle detection + orphan-on-delete reparenting, and introduceGET /goals/tree. - Client: add
/goals/:tabpage with Tree/List views and a sharedGoalDetailPanelfor editing goals, tags, milestones, and actions. - Docs: add a research note about POSThuman integration (currently unrelated to the goals feature PR).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| server/services/identity.js | Adds lazy migration for new goal fields, parent validation + cycle detection, reparent-on-delete, and getGoalsTree() for hierarchical output. |
| server/routes/identity.js | Exposes GET /api/digital-twin/identity/goals/tree. |
| server/lib/identityValidation.js | Extends Zod schemas to accept parentId and tags. |
| client/src/services/api.js | Adds getGoalsTree() API wrapper. |
| client/src/pages/Goals.jsx | New standalone Goals page with URL-driven Tree/List tabs and refresh. |
| client/src/components/goals/goalTreeLayout.js | Computes a tiered radial 3D layout + parent/tag edges. |
| client/src/components/goals/GoalsTreeView.jsx | Renders 3D graph via Three/Fiber with filtering, search, legend, and detail panel selection. |
| client/src/components/goals/GoalsListView.jsx | Renders hierarchical list UI with expand/collapse, search, and inline sub-goal creation. |
| client/src/components/goals/GoalDetailPanel.jsx | Shared detail/edit panel including parent selection, tags, milestones, complete/delete actions. |
| client/src/components/Layout.jsx | Adds a top-level “Goals” nav item and treats /goals as full-width. |
| client/src/App.jsx | Adds routes for /goals and /goals/:tab. |
| docs/research/posthuman-web-feature-review.md | Adds POSThuman feature review doc (not directly tied to goal-tree feature). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
… dashed tag edges, deterministic layout, add goal tree tests - Fix GoalsListView passing boolean instead of expandedIds Set to child rows - Clear GoalEdges geometry when edges become empty to prevent stale rendering - Split parent/tag edges into separate line segments with dashed material for tags - Replace Math.random() with seeded PRNG based on goal id for deterministic layout - Add tests for parentId, tags, cycle detection, reparenting on delete, getGoalsTree
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…tances for dashed edges - Deduplicate tags in tagIndex building and normalize tags on update - Sort ring buckets numerically so parent nodes position before children - Call computeLineDistances() on tag LineSegments for proper dashed rendering
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…timestamps, validate tab param, fix title, remove unused prop - Normalize tags (trim/dedupe) in createGoal to match updateGoal behavior - Update updatedAt on reparented children during deleteGoal - Add min(1) to parentId schema to reject empty strings - Validate tab route param against known tab ids, default to tree - Change page title from "Goal Tree" to "Goals" - Remove unused allGoals prop from GoalRow component
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…client tag limits, tab redirect, avoid urgency mutation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
server/services/identity.js:774
updateGoalrecalculates and persistsgoal.urgencyeven when the goal status is changed to non-active (e.g.,completed/abandoned). This can leave completed goals showing urgency in the UI and diverges fromsetBirthDate/getGoalsTree, which only compute urgency forstatus === 'active'. Consider settingurgencytonullwhen status is notactive, and only recomputing urgency when the goal is active (and/or whenhorizonchanges).
// Recalculate urgency if horizon changed
const longevity = await loadJSON(LONGEVITY_FILE, DEFAULT_LONGEVITY);
if (longevity.timeHorizons) {
goal.urgency = computeGoalUrgency(goal, longevity.timeHorizons);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
parentIdandtagsfields to goal schema, with lazy migration for existing goalsGET /goals/treeendpoint that builds hierarchical tree structure with tag index/goalsstandalone page with two URL-driven tabs:GoalDetailPanelfor editing goals (title, description, category, horizon, parent, tags), managing milestones, complete/delete actionsTest plan
/goals/tree— see 3D tree (empty or with migrated root goals)/goals/list— see indented list, edit inline, add sub-goals