eb2e445398
Manual mode: Use takenAt timestamp instead of dose date-only comparison to correctly distinguish doses taken before vs after stock correction on the same day. Add polling race condition guard (mutationInFlightRef) so Take/Undo immediately reflects in dashboard stock. Automatic mode: Grid-align effectiveStart to the medication schedule and use hybrid consumed calculation (time-based + early-taken doses) for accurate stock counting.