Skip to content

feat: implement interactive tech tree and subtopic popup - #43

Open
Sh4dowking wants to merge 18 commits into
mainfrom
feat/tech-tree
Open

Sh4dowking wants to merge 18 commits into
mainfrom
feat/tech-tree

Conversation

@Sh4dowking

@Sh4dowking Sh4dowking commented Nov 18, 2026 •

Copy link
Copy Markdown

Description
Implements the interactive Tech Tree view (/techtree) and subtopic detail workflow:

  • Topological DAG layout engine (src/ts/util/techtree-layout.ts) with transitive reduction, parent-ordered row placement and unit tests
  • Vue Flow canvas (src/pages/TechTreePage.vue) with pan/zoom, full-viewport sizing, status legend, re-center button, empty-state Create Subject and Create Subtopic dialogs plus header subject creation button
  • Progress-aware node cards (src/components/techtree/TechTreeNode.vue) kept unlocked and clickable across not-started, in-progress and completed states
  • Composable tech tree data layer (src/composables/techtree.ts) with separate backendless sample fixtures (src/composables/techtree-sample.ts), using /subjects/techtree/get/:id, request.patch and request.deleteRequest
  • Reusable Vuetify dialog/sheet popup (src/components/custom-ui-elements/PopupElement.vue) and subtopic detail popup (src/components/techtree/SubtopicDetailPopup.vue) supporting live /subtopics/get/{id} loading, creating/opening/deleting chats across Professor, Student and Detective modes (with sequential <Mode> #N default titles) plus uploading/downloading/deleting assets
  • Placeholder /chat/:id? view (src/pages/ChatPage.vue) wired cleanly for newly created and existing chats

Part of #9

Breaking changes
None (adds /techtree and /chat/:id? routes; awaits auth.check() in src/router/index.ts before redirecting unauthenticated users; uses the renamed /subjects/techtree/get/:id backend route)

Refactored components

  • src/components/custom-ui-elements/PopupElement.vue (rebuilt with Vuetify <v-dialog> and <v-sheet>)
  • src/components/SideBar.vue (switched Home, Chats, Subjects and Tech Tree links from href to Vue Router to)
  • src/router/index.ts (added async session check and routes for /techtree and /chat/:id?)
  • src/stores/statestore.ts (added subjects, subjectsError, fetchSubjects and createSubject)

New dependencies

  • @vue-flow/core (interactive node-graph canvas, pan/zoom controls and custom node rendering)
  • Updated @janishutz/oidc-login-sdk-browser from ^1.7.0 to ^1.7.1 (uppercase PATCH fix)

AI usage declaration
AI was used to

  • create this PR descriptions on GitHub
  • write some of the content of the PR
  • all of the content of the PR
  • to audit the content of the PR
  • polish writing
  • ...

@Sh4dowking
Sh4dowking requested a review from janishutz November 18, 2026 20:47
@Sh4dowking

Copy link
Copy Markdown
Author
image image image

@janishutz janishutz left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please also declare use of AI in the PR description as per the PR template (see here). This is not to blame you for using it, but to make the declaration of usage of AI easier

Comment thread src/components/SideBar.vue Resolved
Comment thread src/components/SideBar.vue Resolved
Comment thread src/pages/ChatPage.vue Resolved
Comment thread src/stores/techtree.ts Resolved
Comment thread src/stores/techtree.ts Resolved
Comment thread src/stores/techtree.ts Resolved
Comment thread src/composables/techtree.ts Resolved
Comment thread src/stores/techtree.ts Resolved
@Sh4dowking

Copy link
Copy Markdown
Author

Please also declare use of AI in the PR description as per the PR template (see here). This is not to blame you for using it, but to make the declaration of usage of AI easier

Yes of course, I'll do that. I was unaware of the template since I created the pr through the cli

@Sh4dowking

Copy link
Copy Markdown
Author

I'll also have a look at your suggested changes shortly 👍

@janishutz

Copy link
Copy Markdown
Member

I wasn't even aware that there was a GitHub CLI. Cool

@janishutz

Copy link
Copy Markdown
Member

I pushed the update to the sdk to npm, it will take a few minutes to propagate

@janishutz

Copy link
Copy Markdown
Member

Design-wise looks really good

@janishutz

Copy link
Copy Markdown
Member

backend container is building and should be ready within about 3 min

@janishutz janishutz added the enhancement New feature or request label Nov 19, 2026
@janishutz janishutz added this to the Hi-Fi Prototype milestone Nov 19, 2026
@janishutz

Copy link
Copy Markdown
Member

Please request a review again when you are done updating or message me in some way

@Sh4dowking

Copy link
Copy Markdown
Author

I'm currently working on resolving the issues, almost done!

@Sh4dowking
Sh4dowking requested a review from janishutz November 19, 2026 14:39
<v-divider class="d-none d-md-block" vertical />
<v-divider class="d-md-none my-4" />

<div

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For the assets, as I have previously mentioned, I thought we had decided to go with an asset manager, so maybe extract this bit from there. I guess the delete here should primarily be to de-associate an asset from the subtopic.

</v-list-item>
</v-list>

<div

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a Vuetify component for this and it's pretty neat (and I have a wrapper around it), but again, I think it'd be better to have a global location to upload assets, as an asset may belong to multiple subtopics and to simply open said manager to pick the asset to associate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

General note on this file: It's generally a good practice to keep files below about 200 lines, but since this doesn't need to be very maintainable, it is fine

Comment thread package.json
"dependencies": {
"@fontsource/roboto": "^5.2.10",
"@janishutz/oidc-login-sdk-browser": "^1.7.0",
"@janishutz/oidc-login-sdk-browser": "^1.7.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"@janishutz/oidc-login-sdk-browser": "^1.7.1",
"@janishutz/oidc-login-sdk-browser": "^1.7.2",

I have since fixed the other issue you mentioned (with the missing export for sendFormData).

}
};
void init();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
void init();
init();

I didn't even know that was valid TS what you had before, this would also work as far as I can tell

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As a general note, you could extract the popups into separate components, making the code more easily legible, but it's fine if you leave it at this. It could be that some would end up being reusable outside of this.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants