@autobusal/operator-routes 1.10.3 → 1.10.4

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.
@@ -76,8 +76,27 @@ const Group = ({ id, type, group, name, t, onReload }: Props): JSX.Element => {
76
76
  success(t('prices_manage.messages.saved_group', { city: city.name, ns: 'common' }));
77
77
 
78
78
  // the values just written are the new baseline, so the group goes
79
- // clean without a refetch
79
+ // clean immediately rather than waiting for the round trip below
80
80
  reset(data);
81
+
82
+ /*
83
+ * Claude - 2026-08-30: AND THE CACHE HAS TO FOLLOW, or the next
84
+ * refetch is a no-op.
85
+ *
86
+ * Resetting the form alone left react-query holding the fares from
87
+ * page load. A later copy writes on the server and refetches - and
88
+ * if what comes back happens to equal that stale cache, structural
89
+ * sharing hands back the SAME object reference, the memo does not
90
+ * recompute, the effect above never fires, and the screen keeps
91
+ * showing the pre-copy fares while the database holds the copied
92
+ * ones. Pressing Update then writes the stale figures back over the
93
+ * copy.
94
+ *
95
+ * Measured, not theorised: copied Tirana's first fare over a
96
+ * destination saved at 99 and watched the row stay at 99 with the
97
+ * group marked clean, while the table said 50.
98
+ */
99
+ onReload();
81
100
  }
82
101
  });
83
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/operator-routes",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"