Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d93277a
Add files via upload
JeffySam Jan 30, 2026
5d7dfba
Add files via upload
JeffySam Jan 30, 2026
3270080
Delete PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam Jan 30, 2026
08f02da
Delete PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam Jan 30, 2026
e73f5ad
docs: move projects index migration plan under OnTrack migration
JeffySam Jan 30, 2026
1e3e346
docs: move projects index migration investigation under OnTrack migra…
JeffySam Jan 30, 2026
edc868e
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam Jan 30, 2026
96f0944
style: constrain markdown table width
JeffySam Jan 30, 2026
a8eded6
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam Jan 31, 2026
90d850b
Add files via upload
JeffySam Jan 31, 2026
2e1b461
docs: remove mistakenly added units migration docs
JeffySam Jan 31, 2026
064620b
docs: remove mistakenly added units migration docs
JeffySam Jan 31, 2026
007554e
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam Jan 31, 2026
82befbe
Update PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam Jan 31, 2026
a023a6b
Update2 PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam Jan 31, 2026
6f7a79b
Update3 PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam Jan 31, 2026
b8d30c5
Update3 PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam Jan 31, 2026
233b72a
Merge branch 'thoth-tech:main' into main
JeffySam Feb 1, 2026
68c12d5
Fix prettier formatting
JeffySam Feb 1, 2026
226bb89
Resolve merge
JeffySam Feb 1, 2026
41d2c94
Fix prettier formatting
JeffySam Feb 1, 2026
e66b39a
Merge branch 'thoth-tech:main' into main
JeffySam Feb 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: Projects Index Migration Investigation
description: Investigation of the projects/index parent state migration from AngularJS to Angular
---

# Projects Index Migration Investigation

Date: January 27, 2026
Author: Jeffy Sam
Area: Projects module – index (parent) state

## Purpose

This document investigates the current state of the `projects/index` parent state
migration from AngularJS to Angular. The goal is to confirm what has already been
migrated, identify what remains incomplete, and assess whether the state is safe
to finalise without breaking dependent child states.

## Current State of the Migration

The Angular implementation of the `projects/index` parent state already exists
and is functionally complete. The following Angular files are present and active:

- `index.component.ts`
- `index.component.html`
- `index.component.scss`
- `index.state.ts`
- `index.module.ts`

The Angular parent state handles route parameter extraction, project loading,
unit resolution, user role resolution, global view state configuration, and
explicit lifecycle cleanup. No runtime or console errors are observed when the
Angular implementation is active.

The legacy AngularJS implementation still exists in the repository and includes
the following files:

- `index.coffee`
- `index.tpl.html` (if present)

As long as these legacy files remain, both AngularJS and Angular implementations
may coexist.

## Responsibilities of the Parent State

The `projects/index` parent state provides shared context for all project-related
child states. Its responsibilities include loading the project using the route
`projectId`, resolving the associated unit, resolving the current user’s role,
setting the global application view context to `PROJECT`, and exposing `project`,
`unit`, and `unitRole` to child states.

These responsibilities are fully implemented in the Angular version and mirror
the legacy behaviour.

## AngularJS vs Angular Behaviour

The Angular implementation preserves all functional behaviour while introducing
explicit lifecycle management, explicit subscription cleanup, strong typing via
TypeScript, observable-based route parameter handling, and reduced reliance on
implicit scope inheritance. No functional differences have been identified.

## Dependent Child States

The following child states depend on the `projects/index` parent state for shared
context:

- `projects/dashboard`
- `projects/tutorials`
- `projects/portfolio`
- `projects/groups`
- `projects/outcomes`

Any issues in the parent state will directly affect these routes.

## Verification Required Before Cleanup

Before legacy files can be safely removed, the following must be verified:

- Project loading works for valid and invalid project IDs
- Unit and user role resolve correctly
- Global view state is set to `PROJECT`
- Navigation to all child states works correctly
- Page refresh and deep linking behave correctly
- No routing or console errors occur
- No memory leaks from subscriptions

## Files in Scope

Angular files currently in use:

- `index.component.ts`
- `index.component.html`
- `index.component.scss`
- `index.state.ts`
- `index.module.ts`

Legacy files pending removal:

- `index.coffee`
- `index.tpl.html`

## Conclusion

The Angular implementation of the `projects/index` parent state is functionally
complete. The migration is currently pending verification and cleanup. Once
verified, the legacy AngularJS files can be removed and the parent state can be
considered fully migrated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Projects Index Migration Plan
description: Plan to finalise the projects/index parent state migration to Angular
---

# Projects Index Migration Plan

Date: January 27, 2026
Author: Jeffy Sam
Area: Projects module – index (parent) state

## Objective

Finalise the migration of the `projects/index` parent state by validating the
existing Angular implementation and safely removing legacy AngularJS files. This
plan applies only to the parent state. Child state migrations are out of scope.

## Current Status

Completed work includes creation of the Angular component, Angular UI-Router
state definition, module configuration, migration of legacy controller logic,
and implementation of explicit lifecycle and subscription management.

Outstanding work includes formal verification, removal of legacy AngularJS
files, confirmation of child state stability, and documentation updates.

## Migration Steps

### Step 1: Verification

Validate the Angular parent state by confirming that project loading works for
valid and invalid IDs, unit and user role resolution behave correctly, the
global view context is set to `PROJECT`, navigation to all child states works,
deep linking and page refresh behave correctly, and no console or routing errors
occur.

### Step 2: Legacy Cleanup

After successful verification, remove the following legacy files:

- `src/app/projects/states/index/index.coffee`
- `src/app/projects/states/index/index.tpl.html`

Confirm that the application builds successfully, no missing references remain,
and no routing conflicts occur.

### Step 3: Final Validation

Re-test all child routes, confirm there are no duplicate route registrations,
verify that subscriptions are cleaned up correctly, and confirm that behaviour
matches the legacy implementation.



## Child State Verification Checklist

- [x] **dashboard** — Project: Yes, Unit: Yes, Role: Yes
- [x] **tutorials** — Project: Yes, Unit: Yes, Role: Yes
- [x] **portfolio** — Project: Yes, Unit: Yes, Role: Yes
- [x] **groups** — Project: Yes, Unit: Yes, Role: Yes
- [x] **outcomes** — Project: Yes, Unit: Yes, Role: Yes


## Testing Checklist

Routing:
- Valid project loads
- Invalid project redirects safely
- Deep linking works
- Page refresh works

Context:
- `project` available to child states
- `unit` available to child states
- `unitRole` available to child states
- Global view context set correctly

Stability:
- No console errors
- No routing conflicts
- No memory leaks
- Cached behaviour preserved

## Success Criteria

The migration is complete when the Angular parent state is the only active
implementation, legacy AngularJS files are removed, all child states load
correctly, and no routing or console errors are present.

## Outcome

Completing this plan finalises the `projects/index` migration and provides a
stable foundation for future project child state migrations.
5 changes: 4 additions & 1 deletion src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ img.ontrack {

/* Better table styling */
.sl-markdown-content table {
max-width: max-content; /* added per review */
/* width: fit-content; */
width: auto;
border-radius: 0.5rem;
Expand All @@ -240,6 +241,8 @@ img.ontrack {
th {
border-right: 1px solid var(--sl-color-gray-5);
}
}


td:first-child,
th:first-child {
Expand Down Expand Up @@ -453,4 +456,4 @@ img.ontrack {

/*
----- End Tab Styling -----
*/
*/
Loading