Skip to content

Upgrade client dependencies (including Next 16/React 19).#358

Merged
demiankatz merged 55 commits into
FalveyLibraryTechnology:devfrom
Jason-Benson:depend10
Apr 23, 2026
Merged

Upgrade client dependencies (including Next 16/React 19).#358
demiankatz merged 55 commits into
FalveyLibraryTechnology:devfrom
Jason-Benson:depend10

Conversation

@Jason-Benson

Copy link
Copy Markdown
Contributor

Working on client side dependencies

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The upgraded tree view isn't working:

Image

The tree view is used to render the object type selection control when you create a new object (e.g. at http://localhost:3000/edit/newChild).

Sounds like there's a new unique ID requirement on the <TreeItem> element -- maybe this is as easy as renaming or copying the existing nodeId element to id in the code.

The upgraded date picker also isn't working:

Image

...you can test this by editing the PROCESS-MD datastream on any object. The cause of this error is less clear-cut from the message, but hopefully TypeError: value.isValid is not a function will point toward a particular bit of code that can be revised or updated. If you get stuck, let me know and I'll refresh my memory... or maybe looking at the component changelogs will clarify what's happening.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The lint failure in #359 led me back here to see what the lint status was in this PR... and I see that linting is failing entirely because next lint --fix seems to be removed in this version of Next.js.

Suggested order of operations:

1.) Maybe we should pivot to fixing types in React component definitions so that lint will pass in #359. I realize this is probably a bit of a large project, but it's also something we need to do anyway, and it may make the upgrading and testing easier in the long run. I think it's worth considering as an investment. Maybe we can start by picking one or two random components and improving their typing, to see how it works and how much effort it takes. If that goes well, we can chip away at the rest in a series of PRs. (I suggest doing only a few files per PR, so if we get into review cycles, we can work through multiple things in parallel rather than having a million conversations in a single monster PR).

2.) Maybe we should also look into replacing next lint with eslint configuration ahead of upgrading Next.js, so we'll have the benefit of linting while we work through the upgrade. I suspect if we fix the linting issues in this PR, we can then "backport" those changes to a separate PR that can get merged ahead of the rest of the upgrades.

What do you think?

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See below for a couple more comments based on another partial review (I'm still just reviewing random files in an effort to chip away at the list -- have about 100 more to look at).

I also ran into a problem in hands-on testing; when I try to create a new object, it doesn't work, and I get this error:

Image

...seems to be the same issue I reported above, so that likely needs another look.

I also reviewed the date picker problem I noted above. While there is no longer a fatal error, there is a new problem: you used to be able to pick date AND time; now you can only pick date.

Comment thread client/components/edit/datastream/DatastreamUploadModalContent.test.tsx Outdated
expect(mockDatatypeContent).toHaveBeenCalledWith(response);
const { asFragment } = render(<DatastreamViewModalContent />);
await waitFor(() => expect(datastreamOperationValues.viewDatastream).toHaveBeenCalled());
expect(asFragment()).toMatchSnapshot();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The snapshots for this test don't look right to me -- I think they're capturing the progress bar but not the actual result. Is it possible the snapshot assessment needs to be moved below the waitFor here? (That's just a guess -- maybe there's a different solution... but something doesn't seem right in the snapshot file).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This also still appears to be an issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reordered it and it did change the snapshot to include additional data.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks better, but the "DatastreamViewModalContent renders for download-only content" snapshot is still showing a progress icon instead of the expected result. You did fix "DatastreamViewModalContent renders for viewable content" though, so we're at least halfway there!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reordered it and I think I got better results.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the progress here, @Jason-Benson! I still haven't reviewed every single file, but see below for a few more questions and suggestions.

Comment thread client/components/edit/__snapshots__/StateModal.test.tsx.snap Outdated
Comment thread client/components/edit/children/__snapshots__/Child.test.tsx.snap Outdated
Comment thread client/components/edit/children/__snapshots__/ChildList.test.tsx.snap Outdated
Comment thread client/components/edit/datastream/Datastream.test.tsx
Comment thread client/components/edit/datastream/DatastreamProcessMetadataContent.test.tsx Outdated
Comment thread client/components/paginate/PaginatorPreview.test.tsx

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @Jason-Benson, I've done a bunch more hands-on testing and wasn't able to break anything. I also looked through all of the remaining files and spotted a handful of remaining issues (some of which may be safe to ignore, but I always err on the side of caution).

Please let me know if you want to discuss any of this stuff further -- the end is really in sight now!!

Comment thread client/components/edit/__snapshots__/ObjectOrder.test.tsx.snap Outdated
Comment thread client/components/edit/children/ChildList.test.tsx
await act(async () => {
asFragment = render(getChildComponent(props)).asFragment;
});
expect(asFragment()).toMatchSnapshot();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it be safer to check the snapshot AFTER we've asserted that the data has been fetched, or does it not matter in this case? Just wondering about the reason for the changed order of operations here (and a few other places in this test file).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Today I changed the order to see if it made a difference. It didn't, but I'll leave it in that order since it more closely matches the original code before I touched it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What I'm seeing in this PR still has the order of operations changed, but your comment suggests that you realigned the code to more closely match the original order. Did something not get pushed, or is it possible that you changed one test case in the file but not all of them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see what happened here. I reordered the rest of the tests in Child.test.tsx, but somehow forgot the very one you had flagged. Fixed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looking better, but I think there's just one more that needs tweaking: "renders child counts" on line 81.

Comment thread client/components/edit/datastream/DatastreamProcessMetadataContent.test.tsx Outdated
Comment thread client/components/edit/ObjectStatus.test.tsx Outdated
Comment thread client/components/edit/ObjectSummary.test.tsx Outdated
Comment thread client/components/edit/StateModal.test.tsx Outdated
Comment thread client/components/paginate/PaginatorPreview.test.tsx
Comment thread client/components/shared/DatatypeContent.test.tsx Outdated

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the progress, @Jason-Benson! I've resolved some completed threads, commented on others that still have pending actions, and spotted a couple of problems highlighted below (which I think should be easy to fix -- looks like a merge conflict got committed without being fully resolved).

Comment thread client/components/edit/ObjectStatus.test.tsx Outdated
Comment thread client/components/edit/ObjectStatus.test.tsx Outdated
tree = getMountedObjectStatusComponent(props);
await waitFor(() => expect(global.fetch).toHaveBeenCalledTimes(1));
});
const { asFragment } = getMountedObjectStatusComponent(props);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need an await act here? The snapshot for this seems to have gone from showing an unknown status to showing the loading indicator, which makes me suspect things aren't fully loading/rendering before the snapshot is generated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that did it.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Victory at last -- thanks, @Jason-Benson, this all looks good to me now!

@demiankatz demiankatz changed the title Depend10 Upgrade client dependencies (including Next 16/React 19). Apr 23, 2026
@demiankatz demiankatz merged commit 71b4d22 into FalveyLibraryTechnology:dev Apr 23, 2026
1 check passed
@demiankatz demiankatz mentioned this pull request Apr 23, 2026
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