Skip to content

Migrate timeout state to Angular component#454

Open
WaelAlahamdi wants to merge 1 commit intothoth-tech:10.0.xfrom
WaelAlahamdi:quality/migrate-timeout-final
Open

Migrate timeout state to Angular component#454
WaelAlahamdi wants to merge 1 commit intothoth-tech:10.0.xfrom
WaelAlahamdi:quality/migrate-timeout-final

Conversation

@WaelAlahamdi
Copy link
Copy Markdown

@WaelAlahamdi WaelAlahamdi commented Apr 2, 2026

Description

This pull request migrates the timeout state from the legacy AngularJS/CoffeeScript implementation to an Angular component and removes the old timeout state wiring. This keeps the existing timeout functionality aligned with the current Angular-based structure used in the project. The legacy AngularJS timeout implementation is no longer used, and the migrated Angular timeout component was verified through local testing.

The change includes:

  • adding TimeoutComponent
  • renaming timeout.tpl.html to timeout.component.html
  • registering the timeout state in doubtfire.states.ts
  • registering TimeoutComponent in doubtfire-angular.module.ts
  • removing the legacy AngularJS timeout import from doubtfire-angularjs.module.ts
  • removing the old timeout state registration from src/app/errors/states/states.coffee
  • deleting the old timeout.coffee file

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Test steps:

  1. Run the project locally.
  2. Open the timeout route using:
    http://localhost:4200/#/timeout?dest&params
  3. Confirm the timeout page displays correctly.
  4. Confirm the route redirects the user to the sign-in page after sign out.

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox
  • Tested in latest Microsoft Edge

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from two members of the Frontend Migration team on the Pull Request.
Migrate_timeout Migrate_timeout_after

@WaelAlahamdi WaelAlahamdi changed the title refactor(timeout): migrate timeout to Angular component Migrate timeout state to Angular component Apr 2, 2026
@SteveDala
Copy link
Copy Markdown
Collaborator

I tested this locally with the Doubtfire development container. Both doubtfire-api and doubtfire-deploy were on 10.0.x. Looks good to me as the timeout state loads when expected. I do not have enough experience with Angular to know if the routing changes were complete as required.

Copy link
Copy Markdown

@millyamolo millyamolo left a comment

Choose a reason for hiding this comment

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

I reviewed the timeout migration changes in this PR and the implementation looks consistent with the stated goal of moving timeout handling from legacy AngularJS/CoffeeScript into the Angular code path. The new TimeoutComponent is introduced and wired into the Angular module, and the timeout route is now registered in the Angular state definitions. At the same time, the old timeout state wiring has been removed from the legacy module/state files, and the old CoffeeScript timeout implementation has been deleted, which keeps the migration clean and avoids duplicate ownership.
I also checked the template move (timeout.tpl.html to timeout.component.html) and it appears to be a straightforward rename without unexpected content changes. Structurally, the diff is focused and coherent. New Angular component/state added, old AngularJS timeout references removed, and no unrelated refactors mixed into the same change.
From local testing, the app builds and runs on the PR branch. When navigating to http://localhost:4200/#/timeout?dest&params, I observed redirect-to-login behavior when unauthenticated, which seems aligned with route/auth-guard expectations. From my side its working correctly

Copy link
Copy Markdown

@Thirus224849242 Thirus224849242 left a comment

Choose a reason for hiding this comment

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

Tested locally by checking out the branch and navigating to http://localhost:4200/#/timeout?dest&params. The timeout page loads correctly and redirects to the sign-in page when unauthenticated. No console errors observed. The migration from the legacy AngularJS/CoffeeScript implementation to the Angular component looks clean. Approving.

@officialid130-13e13
Copy link
Copy Markdown

I ran the branch locally with npm run start and tested the timeout flow.

  • The new TimeoutComponent loads correctly at /#/timeout?dest&params.
  • Redirect to the sign‑in page after sign‑out works as expected.
  • CSS and layout look good across browsers.
  • Console shows 419 errors from API calls (/api/unit_roles, /api/projects), but these appear to be backend/session issues and not related to the PR changes.

The migration is clean, scoped to the intended files, and removes the legacy CoffeeScript implementation as described.

Copy link
Copy Markdown

@officialid130-13e13 officialid130-13e13 left a comment

Choose a reason for hiding this comment

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

Tested on Chrome and Safari. Works as expected. Approving the changes.

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.

5 participants