@the-portland-company/shell 0.101.0 → 0.101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.101.1
2
+
3
+ The user card's re-read after a profile change asks for a fresh profile (follow-up to 0.101.0, live check 2026-11-14).
4
+
5
+ - **Cause.** The chrome API (Contacts) keeps each profile row for 15 s. Politogy ID writes a new photo or name straight to VRM Core, so the re-read that 0.101.0 fires right after the save could still get the old photo when the page had read `me` in the last 15 s. Seen live: the card kept the old photo until the event fired again later.
6
+ - **Fix.** On `politogy:profile-changed` the provider reads `me?fresh=1`, and the chrome API drops its cached copy of the caller's own profile before answering (politogy-contacts, `GET /api/me?fresh=1`). An API without the flag answers a normal read.
7
+ - Tests: `__tests__/profileChanged.test.tsx` checks the re-read path.
8
+
1
9
  ## 0.101.0
2
10
 
3
11
  A new photo or name saved on My Profile shows in the left-bar user card at once (bug seen live 2026-11-14, Ben: "updating profile picture from My Profile does not immediately display in the personal information footer").
@@ -810,9 +810,10 @@ function NavChromeProvider({
810
810
  react.useEffect(() => {
811
811
  let cancelled = false;
812
812
  let latest = 0;
813
- const load = () => {
813
+ const load = (fresh = false) => {
814
814
  const call = ++latest;
815
- dedupedFetch("me", void 0).then((data) => {
815
+ const read = fresh ? fetchJsonRef.current("me?fresh=1", void 0) : dedupedFetch("me", void 0);
816
+ read.then((data) => {
816
817
  if (!cancelled && call === latest) setMe(data);
817
818
  }).catch(() => {
818
819
  }).finally(() => {
@@ -822,7 +823,7 @@ function NavChromeProvider({
822
823
  load();
823
824
  const onProfileChanged = () => {
824
825
  invalidateChromeCache("me");
825
- load();
826
+ load(true);
826
827
  };
827
828
  window.addEventListener(PROFILE_CHANGED_EVENT, onProfileChanged);
828
829
  return () => {