Skip to content

[PER-10680] Migrate from navigateLean to getWithChildren for refresh current folder - #1169

Open
aasandei-vsp wants to merge 9 commits into
PER-10678-replace-navigate-lean-filesystemfrom
PER-10680-migrate-navigate-lean-refresh-current-folder
Open

aasandei-vsp wants to merge 9 commits into
PER-10678-replace-navigate-lean-filesystemfrom
PER-10680-migrate-navigate-lean-refresh-current-folder

Conversation

@aasandei-vsp

@aasandei-vsp aasandei-vsp commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Manual test cases — current folder refresh moved from navigateLean to getWithChildren, sort preview in the browser

Setup: Sign in as the owner of an archive with a folder that mixes records and
sub-folders. You also need a second account with a folder
shared to it as Viewer.

Sort preview ⭐

(run in both the multi-column list header and the single-column Sorted by … menu
on a narrow window — same code path, two entry points)

Scenario — name

  1. Open the mixed folder in list view and click the Name header.
    • EXPECTED: Rows reorder A–Z with folders and records interleaved by name.
  2. Click Name again.
    • EXPECTED: Rows reorder Z–A.

Scenario — date

  1. Click the Date header.
    • EXPECTED: Oldest first.
  2. Click Date again.
    • EXPECTED: Newest first.

Scenario — type

  1. Click the Type header.
    • EXPECTED: Folders group first, then records grouped by type; within a group the
      rows are A–Z by name.

Scenario — save and reload

  1. With a preview active, click Save next to the header.
    • EXPECTED: The Save control disappears.
  2. Reload the page.
    • EXPECTED: The list comes back in the sort you saved.
  3. Compare the reloaded order with the previewed one.
    • EXPECTED: They should be identical.

Scenario — viewer can preview but not save

  1. Sign in as the Viewer account, open the shared folder and click Name.
    • EXPECTED: The list reorders. No Save control is offered.

Refresh after a change ⭐

(this is critical change of this PR — every path that calls the refresh)

Scenario — new folder

  1. In a folder you own, click the "Create folder" button and give it a name.
    • EXPECTED: Toast Folder <name> has been created. The new row appears in its
      sorted position.

Scenario — upload

  1. Upload an image into the folder and wait for the upload progress to finish.
    • EXPECTED: The new row appears without a reload.
  2. Watch the new row for a few seconds.
    • EXPECTED: Its thumbnail fills in on its own, as before.
  3. Upload three files at once.
    • EXPECTED: All three appear.

Scenario — delete

  1. Select two rows, one folder and one record, and delete them.
    • EXPECTED: Both rows disappear and the selection is cleared.

Scenario — move and copy --------CHECK ON DEV

  1. Select a folder/record and select move. From the folder picker, choose a sibling folder to move it to.
    • EXPECTED: Toast ending in moved successfully; the row leaves the list after
      the short delay.
  2. Do the same with Copy on a folder.
    • EXPECTED: Toast ending in copied successfully.

A change while a preview is active ⭐

  1. Click Name twice so the list is Z–A, and do not save.
  2. Create a folder named Aachen.
    • EXPECTED: The list stays Z–A and Aachen appears at the bottom. The header
      still shows the descending indicator and Save is still offered.
  3. Upload a file named Zzz.jpg.
    • EXPECTED: It appears at the top; the order is still Z–A.
  4. Click Save, then reload.
    • EXPECTED: The reloaded list is Z–A.

Error handling

Scenario — create fails or the refresh after it fails

  1. Open the New folder prompt, set devtools network to Offline, then confirm with
    the name Offline test.
    • EXPECTED: An error toast appears and the prompt closes.
  2. Set the network back to Online and reload.
    • EXPECTED: The app is usable and a new New folder works normally, whether or
      not Offline test was created before the connection dropped.

Regression — untouched paths

Cheap sanity checks; these code paths were traced as unchanged by this PR.

  1. Navigate into a folder and back.
    • EXPECTED: Works correctly.
  2. Open an unlisted share link to a folder.
    • EXPECTED: The unlisted shared folder loads correctly.

@aasandei-vsp
aasandei-vsp marked this pull request as draft September 10, 2026 11:46
@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.48649% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.85%. Comparing base (9c94752) to head (57f1dd3).

Files with missing lines Patch % Lines
src/app/shared/utilities/sort-child-items.ts 80.00% 2 Missing and 3 partials ⚠️
src/app/shared/services/data/data.service.ts 93.33% 3 Missing ⚠️
...core/components/right-menu/right-menu.component.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                               @@
##           PER-10678-replace-navigate-lean-filesystem    #1169      +/-   ##
==============================================================================
+ Coverage                                       53.41%   53.85%   +0.43%     
==============================================================================
  Files                                             363      364       +1     
  Lines                                           12747    12765      +18     
  Branches                                         2319     2327       +8     
==============================================================================
+ Hits                                             6809     6874      +65     
+ Misses                                           5701     5650      -51     
- Partials                                          237      241       +4     

☔ 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 self-assigned this Sep 10, 2026
@aasandei-vsp
aasandei-vsp marked this pull request as ready for review September 10, 2026 12:33
@aasandei-vsp
aasandei-vsp force-pushed the PER-10678-replace-navigate-lean-filesystem branch from 7b92066 to 76092ef Compare September 17, 2026 15:06
@aasandei-vsp
aasandei-vsp force-pushed the PER-10680-migrate-navigate-lean-refresh-current-folder branch from 553df48 to 5e1322c Compare September 17, 2026 15:25
In the new converter from stela records/folders, when
the items were coming as children of a folder, they
would be separated into folders and records for mapping,
so the sort order the backend sent was lost. We do not do
any kind of sorting on the FE, so this actually fixes the
scrambled sort issue we were having before.

Issue: PER-10678
The folder resolver's catch block would expect a FolderResponse type
of error, which we are trying to move away from. So instead of converting
the stela error to a FolderResponse, we will just make the expected error
type more generic.

Issue: PER-10678
The fileSystem service, that is used by the folder resolver  has
quite a wide reach, so this will instantly replace a lot of the
navigateLean calls from route level.

Issue: PER-10678
Folder resolve is already using getWithChildren and it serves the
same data the lean folder resolve did, so keeping it became redundant.

Issue: PER-10678
Stela sends the real sharers hierarchy of folders, so when we build
the breadcrumbs, the root will be set as Private instead of Shares.
In order to bypass that, we'll check if the route we are is shared
and show the correct route.

Issue: PER-10678
In the publish dialog, the title was decided by a property from the
folder or record, so if that property would ever be undefined, the
dialog would crash. Moved the property check in the component instead
of the view and also check if the item includes a type, which is a
stela property.

Issue: PER-10678
@aasandei-vsp
aasandei-vsp force-pushed the PER-10678-replace-navigate-lean-filesystem branch from 76092ef to 9c94752 Compare September 18, 2026 09:31
The data service is the core of refetch for all actions that
happen on records and folders.(copy, delete, upload, create)

While changing the endpoint, the way sorting happens also changes,
so we had to create a small sort helper that will preserve the
sorting for newly created folder, so there is no scrambling effect
anymore when we delete a record/folder.(PER-10682)

PER-10680
If a folder creation would fail, the catch block would expect the error
message in the old format, but stela is sending a more raw HTTP error
message style, so we will make the error type more generic and extract
the error message from it.

Issue: PER-10680
All the usages of the navigateLean in the codebase have been sequencially
removed, so there is no more need to keep this method.

Issue: PER-10680
@aasandei-vsp
aasandei-vsp force-pushed the PER-10680-migrate-navigate-lean-refresh-current-folder branch from 5e1322c to 57f1dd3 Compare September 18, 2026 09:37
@aasandei-vsp
aasandei-vsp force-pushed the PER-10678-replace-navigate-lean-filesystem branch from 9c94752 to e5436f2 Compare September 21, 2026 08:11
@cecilia-donnelly
cecilia-donnelly removed their request for review September 22, 2026 18:37
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