Skip to content

Replace navigateLean with getWithChildren for the timeline view - #1138

Open
aasandei-vsp wants to merge 3 commits into
PER-10679-replace-navigate-lean-publishfrom
PER-10677-replace-navigate-lean-timeline
Open

Replace navigateLean with getWithChildren for the timeline view#1138
aasandei-vsp wants to merge 3 commits into
PER-10679-replace-navigate-lean-publishfrom
PER-10677-replace-navigate-lean-timeline

Conversation

@aasandei-vsp

@aasandei-vsp aasandei-vsp commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Do not merge before #1135 , this PR depends on the mappings from that specific PR
Depends on accessRole being on stela records and folders

Manual test cases — timeline view moved from navigateLean to getWithChildren

Note

The timeline folder tiles no longer show an N items count. That is expected — Stela's
folder payload has no record-count field. The tile renders without the count line rather
than showing zero.


Timeline navigation ⭐

Scenario — loading the timeline

  1. Navigate to Public files, then switch to the timeline view.
    • EXPECTED: Items plot on the timeline and the breadcrumb bar shows the folder path.

Scenario — clicking a folder in the timeline

  1. Click a folder tile on the timeline.
    • EXPECTED: The view navigates into that folder and its contents plot.
  2. Check the breadcrumb bar.
    • EXPECTED: A new crumb is appended for the folder you entered.

Scenario — clicking a breadcrumb

  1. Navigate two folders deep, then click the first folder crumb in the bar.
    • EXPECTED: The timeline actually navigates back to that folder and its contents
      change. It does not just zoom or refit in place.

Scenario — deep link

  1. Copy a timeline URL of the form /app/private/view/timeline/{archiveNbr}/{folderLinkId}
    and open it in a fresh tab.
    • EXPECTED: The folder loads and plots. Previously this path could not resolve at all.

Permissions ⭐

(run as both the owner and the Viewer account — the point is that the two differ)

Stela reports the caller's role as owner / viewer, which this PR translates into
access.role.owner / access.role.viewer. Untranslated, every gate denied.

Scenario — owner keeps their actions

  1. Go to the private list view
  2. Click on a row(record or folder)
    • EXPECTED: Rename, Copy and Delete are all enabled.

Scenario — viewer is still restricted

  1. Open a folder shared to you as a Viewer.
  2. Click a row (record or folder)
    • EXPECTED: Write actions (Rename, Delete) are disabled.

Breadcrumbs outside the timeline

Scenario — unlisted share breadcrumbs

  1. Open an unlisted share link to a nested folder.
    • EXPECTED: The breadcrumb bar renders the full path.
  2. Click a middle crumb.
    • EXPECTED: It navigates to that ancestor folder.
  3. Look at the address bar after the click.
    • EXPECTED: A real path with an archive number and link id — no null or
      undefined segment such as /private/null/194781.

Shared record via share preview

Scenario — open a shared record

  1. Open a share link that points at a single record (not a folder).
    • EXPECTED: The record opens

Error handling

Scenario — deep link to a folder that does not exist

  1. Edit a timeline deep-link URL to use a bogus folderLinkId and load it.
    • EXPECTED: An error message is shown and you are redirected to /private. Previously
      this threw a TypeError inside the error handler, because the deep-link target has no
      type to call .includes('root') on.

@aasandei-vsp aasandei-vsp self-assigned this Aug 17, 2026
@aasandei-vsp
aasandei-vsp marked this pull request as draft August 17, 2026 12:31
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.22222% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.16%. Comparing base (476f085) to head (3bae6b8).

Files with missing lines Patch % Lines
...c/app/core/resolves/lean-folder-resolve.service.ts 66.66% 4 Missing and 1 partial ⚠️
...omponents/timeline-view/timeline-view.component.ts 75.00% 2 Missing ⚠️
src/app/shared/utilities/folder-error-message.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##           PER-10679-replace-navigate-lean-publish    #1138      +/-   ##
===========================================================================
- Coverage                                    52.83%   52.16%   -0.67%     
===========================================================================
  Files                                          355      360       +5     
  Lines                                        12154    12542     +388     
  Branches                                      2206     2274      +68     
===========================================================================
+ Hits                                          6422     6543     +121     
- Misses                                        5504     5764     +260     
- Partials                                       228      235       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aasandei-vsp
aasandei-vsp force-pushed the PER-10677-replace-navigate-lean-timeline branch from 229dc80 to ac8d6e8 Compare August 21, 2026 10:49
@aasandei-vsp
aasandei-vsp force-pushed the PER-10679-replace-navigate-lean-publish branch 2 times, most recently from 01eddfb to f22d6d7 Compare August 21, 2026 11:30
@aasandei-vsp
aasandei-vsp force-pushed the PER-10677-replace-navigate-lean-timeline branch from ac8d6e8 to 8aeaf3b Compare August 21, 2026 11:41
@aasandei-vsp
aasandei-vsp marked this pull request as ready for review August 21, 2026 11:43
@aasandei-vsp
aasandei-vsp force-pushed the PER-10677-replace-navigate-lean-timeline branch from 8aeaf3b to 28badda Compare August 21, 2026 11:52
@aasandei-vsp
aasandei-vsp force-pushed the PER-10679-replace-navigate-lean-publish branch from f22d6d7 to 476f085 Compare August 21, 2026 11:59
@aasandei-vsp
aasandei-vsp force-pushed the PER-10677-replace-navigate-lean-timeline branch from 28badda to 99b406c Compare August 21, 2026 12:01
In order for the migration of the timeline to be complete, we needed
to map some extra fields to stela: folderLinkIds, archiveNumbers,
accessRole.
And for deep links, we needed to be able to get folders
using the properties mentioned above, so we needed an extra call to
the old API, because if the user is deep in a folder and uses the
browser refresh, the only way to identity the folder you were in,
would be using the archiveNbr and the folder_linkId, which is not
possible using the stela endpoints.

Issue: PER-10677
Lean folder response uses now getWithChildren instead of navigateLean
and returns consistently a promise, no observable.

Stela rejects with a raw http error, which is different from the old
backend, so a specific error message handler was needed.

Issue: PER-10677
The timeline folder navigation, going into a folder used the navigateLean
endpoint, so we replaced it with getWithChildren. The fact that we are making
a BE call from a component that otherwise does not have this kind of logic is
counterintuitive, but the needed refactoring to extract this logic is out of
scope for the current work and it would need testing many other places.

Issue: PER-10677
@aasandei-vsp
aasandei-vsp force-pushed the PER-10677-replace-navigate-lean-timeline branch from 99b406c to 3bae6b8 Compare August 21, 2026 13:24
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.

1 participant