Skip to content

feat(web): add Projects section to Settings sidebar navigation#644

Merged
penso merged 2 commits intomoltis-org:mainfrom
Cstewart-HC:feat/projects-settings-nav-v2
Apr 11, 2026
Merged

feat(web): add Projects section to Settings sidebar navigation#644
penso merged 2 commits intomoltis-org:mainfrom
Cstewart-HC:feat/projects-settings-nav-v2

Conversation

@Cstewart-HC
Copy link
Copy Markdown
Contributor

@Cstewart-HC Cstewart-HC commented Apr 10, 2026

What

Adds a "Projects" entry to the Settings sidebar, making the existing Projects page accessible from /settings/projects in addition to /projects.

Changes

  • templates.rs: Add settings_projects field to SpaRoutes struct and "/settings/projects" route
  • page-settings.js: Import initProjects/teardownProjects from page-projects.js, add projects entry to sections[] (General group, after Nodes), register in pageSectionHandlers
  • page-projects.js: Extract initProjects/teardownProjects as named exports (matches page-skills.js pattern), add clearing.value = false reset in init, keep existing registerPage call for /projects route
  • components.css: Add icon mask rule for data-section="projects" using folder icon
  • settings-nav.spec.js: Add projects to settingsSections test matrix
  • projects.spec.js: Add test verifying /settings/projects renders the Repositories heading with no JS errors

Files Changed (6)

File Lines
crates/web/src/templates.rs +2
crates/web/src/assets/js/page-settings.js +8
crates/web/src/assets/js/page-projects.js +15/-14
crates/web/src/assets/css/components.css +4
crates/web/ui/e2e/specs/settings-nav.spec.js +1
crates/web/ui/e2e/specs/projects.spec.js +8

Net: +38/-14

Testing

  • cargo check -p moltis-web
  • biome check (all 4 JS/CSS files) ✅
  • E2E: settings-nav.spec.js projects entry added to test matrix
  • E2E: projects.spec.js new /settings/projects accessibility test

- Add settings_projects route to SpaRoutes in templates.rs
- Import initProjects/teardownProjects and register in sections[] and pageSectionHandlers
- Extract initProjects/teardownProjects as named exports from page-projects.js
- Add clearing.value = false reset in initProjects
- Add folder icon mask CSS for projects nav item
- Add E2E tests for sidebar navigation to projects and heading assertion
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 10, 2026

Greptile Summary

This PR adds a "Projects" entry to the Settings sidebar, making the projects page accessible from /settings/projects. The previous concern about teardownProjects unmounting from the wrong container (S.$(\"pageContent\") instead of the settings-injected container) has been fully addressed by adopting the _projectsContainer capture pattern used by other page modules, and the missing clearing.value = false reset has been added to initProjects.

Confidence Score: 5/5

Safe to merge — all previous concerns are addressed and no new issues found.

The teardownProjects container-capture fix is correct and consistent with the established pattern in page-nodes.js, page-crons.js, and page-mcp.js. All signals are properly reset in initProjects. The referenced CSS mask SVG exists on disk. E2E coverage was added for both the new settings route and the existing nav matrix. No remaining P0 or P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
crates/web/src/assets/js/page-projects.js Correctly refactored: exports initProjects/teardownProjects, captures container in _projectsContainer (matches page-nodes.js/page-mcp.js pattern), adds clearing.value = false reset, reuses same functions for registerPage.
crates/web/src/assets/js/page-settings.js Imports and wires initProjects/teardownProjects correctly; "projects" section added to General group (after Nodes) with page: true flag and registered in pageSectionHandlers.
crates/web/src/assets/css/components.css Adds [data-section="projects"]::before mask rule; referenced SVG (mask-9efc91f08692af1a.svg) exists on disk and icon-folder is defined in style.css.
crates/web/ui/e2e/specs/projects.spec.js New test navigates to /settings/projects, asserts the "Repositories" heading is visible, and checks for zero JS errors — good coverage of the new route.
crates/web/ui/e2e/specs/settings-nav.spec.js Adds { id: "projects", heading: "Repositories" } to the settings section test matrix; order in the matrix is irrelevant since each case runs independently.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User navigates] --> B{Route}
    B -->|/projects| C[registerPage handler\ncalls initProjects]
    B -->|/settings/projects| D[Settings sidebar\npageSectionHandlers.projects.init]
    C --> E[initProjects container\n_projectsContainer = container\nreset signals\nrender ProjectsPage]
    D --> E
    E --> F[ProjectsPage rendered\nin correct container]
    F --> G{Navigate away}
    G --> H[teardownProjects\nrender null to _projectsContainer\n_projectsContainer = null]
Loading

Reviews (2): Last reviewed commit: "fix(web): store container ref in teardow..." | Re-trigger Greptile

…ings_projects route

- initProjects now caches container in _projectsContainer module variable
  so teardownProjects unmounts from the correct node (matches page-nodes,
  page-crons, page-mcp convention). Prevents signal/event leaks.
- Remove settings_projects field from SpaRoutes struct and SPA_ROUTES
  static — never referenced on the JS side.
@Cstewart-HC
Copy link
Copy Markdown
Contributor Author

@greptileai I have reviewed the suggested changes and made new commits.

@penso
Copy link
Copy Markdown
Collaborator

penso commented Apr 11, 2026

@Cstewart-HC I actually had hidden this on purpose because I wasn't sure anyone would use it and I didn't want to debug too much stuff at once. Moltis is way more mature now, so I guess we could unhide this.

Are you actually using it, did you use it for any git project?

@Cstewart-HC
Copy link
Copy Markdown
Contributor Author

Cstewart-HC commented Apr 11, 2026

Yes I use projects to help maintain repo aware context. I structure my Moltis instance around workspaces that are mostly repos:

workspace/moltis
workspace/project2

Then I bind chat session - projects - discord channel together.

Session | Workspace | Project | Discord Channel 
xxxx |Moltis |  moltis | #moltis 

So when I jump into discord, I can choose the relevant repo channel and start chatting with my repo context aware agent.

@penso penso merged commit d32b211 into moltis-org:main Apr 11, 2026
1 check passed
@penso
Copy link
Copy Markdown
Collaborator

penso commented Apr 11, 2026

@Cstewart-HC ok great, you're using it fully even I had not enabled the menu LOL

I think we should have a better documentation and maybe even onboarding detection of git projects then, making sure people use it.

@Cstewart-HC
Copy link
Copy Markdown
Contributor Author

Cstewart-HC commented Apr 11, 2026 via email

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