新增:首页 Feed 接入真实数据——四态/尾部三态/聚合曝光埋点,社区 demo 消亡第一页(T3-14)
CI / flutter-gates (push) Successful in 2m41s
CI / flutter-gates (push) Successful in 2m41s
- home_page Feed segment 改接 CommunityController:骨架屏首载、空态 CTA、 错误横幅重试、下拉刷新(失败保留旧列表 + SnackBar)、触底游标翻页 (失败态只走显式重试,不随滚动风暴自动重打) - PostCard 三形态(单图通栏 4:3 / 多图折叠封面 +N 角标 / 纯文字 6 行)+ PostMediaGrid(列数规则 + ink 80% scrim 精算)+ LikeButton(error 族修订 Colors.red,T3-14 纯展示禁用态,ToggleSync 接线留 T3-15/16)+ FeedSkeleton (呼吸动效尊重减弱动态设置);降级作者统一「宠友」占位 - SignedNetworkImage:预签名 URL 缓存 key 剥离 X-Amz-* 签名参数, RemoteImage 全仓换用(同图不同签名命中同一缓存条目) - feed 域埋点:feed_viewed 聚合曝光(浏览段开/结算于切 Tab、切分段、 退后台、销毁;≥50% 可见 ≥500ms 段内按帖去重,postId 不上报)+ feed_load_failed(refresh/load_more 双路,会话失效不报) - integration_test/feed_live_test.dart:compose 六容器 Linux 桌面真链路 实测入口(PATBOND_FEED_LIVE=1 门控,默认跳过) - 测试 379 → 421(+42):四态/尾部三态/翻页不丢不重/降级作者/曝光结算 时机/缓存 key/事件属性全覆盖;analyze 0,format 无 diff Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -14,6 +14,7 @@ import 'package:patbond_flutter/features/auth/session_manager.dart';
|
||||
import 'package:patbond_flutter/features/auth/splash_page.dart';
|
||||
import 'package:patbond_flutter/features/community/community_controller.dart';
|
||||
import 'package:patbond_flutter/features/community/community_repository.dart';
|
||||
import 'package:patbond_flutter/features/community/feed_analytics.dart';
|
||||
import 'package:patbond_flutter/features/main/main_shell_page.dart';
|
||||
import 'package:patbond_flutter/features/pets/health_record_analytics.dart';
|
||||
import 'package:patbond_flutter/features/pets/pet_analytics.dart';
|
||||
@@ -48,6 +49,7 @@ class _AppState extends State<App> {
|
||||
late final CommunityController communityController;
|
||||
late final PetAnalytics petAnalytics;
|
||||
late final HealthRecordAnalytics healthRecordAnalytics;
|
||||
late final FeedAnalytics feedAnalytics;
|
||||
late final SessionTracker _sessionTracker;
|
||||
late final AnalyticsService _analytics;
|
||||
late final PageViewTracker _pageViewTracker;
|
||||
@@ -93,12 +95,13 @@ class _AppState extends State<App> {
|
||||
petsController = PetsController(
|
||||
repository: widget.petsRepository ?? _buildPetsRepository(),
|
||||
);
|
||||
// T3-12 只装配数据层;Feed segment 的 UI 接线在 T3-14 挂入主壳。
|
||||
// T3-14:Feed segment 接线主壳(数据层 T3-12 就位)。
|
||||
communityController = CommunityController(
|
||||
repository: widget.communityRepository ?? _buildCommunityRepository(),
|
||||
);
|
||||
petAnalytics = PetAnalytics(_analytics.trackEvent);
|
||||
healthRecordAnalytics = HealthRecordAnalytics(_analytics.trackEvent);
|
||||
feedAnalytics = FeedAnalytics(_analytics.trackEvent);
|
||||
|
||||
// 认证状态切换补点(根路由 AnimatedSwitcher 无路由事件)
|
||||
sessionManager.addListener(_reportAuthStateChange);
|
||||
@@ -231,8 +234,10 @@ class _AppState extends State<App> {
|
||||
key: const ValueKey('shell'),
|
||||
appState: appState,
|
||||
petsController: petsController,
|
||||
communityController: communityController,
|
||||
petAnalytics: petAnalytics,
|
||||
healthRecordAnalytics: healthRecordAnalytics,
|
||||
feedAnalytics: feedAnalytics,
|
||||
pageViewTracker: _pageViewTracker,
|
||||
onLogout: authRepository.logout,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user