a2ui-project / a2ui-project/a2ui

[FEATURE]: Inject clocks into Dart/Flutter GenUI timestamps and timeouts

Ouverte
#2,239 1 commentaire 0 réactions 1 personne assignée Réclamée par @Varun-S10 Voir sur GitHub
P2 type: feature/enhancement
Langage dominant
TypeScript
Étoiles
16.4k
Forks
1.3k
Merge moyen
2 j 13 h
PR mergées (30 j)
134

Description

- [x] I have searched the existing issues to make sure this feature has not already been requested.

## Is your feature request related to a problem? Please describe.

Deterministic tests cannot control all time sources in the Dart/Flutter GenUI path. Action timestamps, pending-update expiry, and widget/function timeouts can observe wall time or real timers even when the surrounding test uses Flutter's fake clock. Identical protocol input can therefore produce timing-dependent output, and timeout tests require real waits.

## Describe the Proposed Solution

Introduce public injectable clock/timer abstractions at the ownership points that create action timestamps or schedule GenUI-owned timeouts. Production defaults should retain current behavior; tests should be able to supply a monotonic fake clock and advance it without sleeping. Cover action timestamps, SurfaceController pending-update expiry, and GenUI-owned widget/client-function timeouts.

Acceptance evidence should prove identical messages and actions produce identical timestamps and timeout outcomes under an injected clock.

## Describe Alternatives Considered

Flutter WidgetTester.pump does not control every Dart/core time source. Normalizing timestamps afterward hides ordering bugs and cannot control timer behavior. Private-field patching is brittle.

## Additional Context

This concerns runtime-generated time, not A2UI protocol timestamps, and should remain independent of any one testing framework.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Look for ownership points that create action timestamps or schedule GenUI-owned timeouts, such as SurfaceController pending-update expiry and widget/client-function timeouts. Start by examining the runtime-generated time sources in the Dart/Flutter GenUI path to understand where clock injection is needed. Verify that production defaults retain current behavior and that tests can supply a fake clock. Acceptance evidence should show identical messages and actions produce identical timestamps and timeout outcomes under an injected clock.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
dart, flutter, typescript
Domaine
backend-api-design, testing-qa
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.