refactor: UI界面,数据层重构、分包迁移与反馈 v2 对齐#232
Open
159357254680 wants to merge 18 commits into
Open
Conversation
add the feature of feedback
…iene Move API access into domain stores with load strategies, migrate pages off direct request calls, sync plaza comment counts after replies, and remove myrepo.bundle from version control. Co-authored-by: Cursor <cursoragent@cursor.com>
Unify @tarojs packages on 4.0.6, upgrade babel-preset-taro from 3.x, match @typescript-eslint plugin/parser versions, and add babel peers required by the Taro 4 preset. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace duplicate workflows with parallel lint and weapp build jobs, add yarn immutable install, concurrency cancellation, manual dispatch, and dist artifacts. Co-authored-by: Cursor <cursoragent@cursor.com>
…mains Move low-frequency pages under src/subpackages/*, shrink the main package to tab and core flows, centralize routes in constants/routes.ts, remove deprecated shareGrades and useGradeStore, and fix feedback history VirtualList for subpackage builds. Co-authored-by: Cursor <cursoragent@cursor.com>
…om answerId Unwrap token-refresh retry responses like normal 200s, stop forcing switchTab on app launch when already authenticated, and load questionInfo from notification answerId via getAnswerDetail. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve rules-of-hooks violations, apply prettier/eslint --fix across the codebase, and document subpackage layout and CI in README. Co-authored-by: Cursor <cursoragent@cursor.com>
Add sassOptions.silenceDeprecations for @import deprecation noise, and stop BottomInput height flicker when long-pressing to reply by removing autoHeight and focusing before inserting the mention. Co-authored-by: Cursor <cursoragent@cursor.com>
Fix missing hook dependencies in main, ReplySection, FeedCard, Modal, and evaluationHistory; use stable store selectors and getState() for course actions; rename chart to LineChart with useCallback for chart redraw. Co-authored-by: Cursor <cursoragent@cursor.com>
Allow guest browsing without blocking requests on missing tokens; normalize component folders (VirtualList, StarRating, ShowStar, SearchLabel); fix evaluateInfo comment pagination and timestamps; tune BottomInput @mention behavior; drop broken sass-loader webpack patch and unused OpenAPI artifacts. Co-authored-by: Cursor <cursoragent@cursor.com>
- mark tokenConfig (feedback/Feishu) 401s as resource scope so authHandler skips global logout - non-401/403 4xx now throw ClientError instead of AuthError - retry uploads via uploadFile after token refresh - whitelist Taro.request fields to avoid leaking custom config into native API - read tokens via getStorageSync to silence getStorage:fail noise - reset custom tab-bar highlight via getCurrentPages after re-login - gate guard fails closed when status check errors Co-authored-by: Cursor <cursoragent@cursor.com>
- add copyToClipboard util; reuse in guide Contact/Source and feedback main - use stable keys in myclass, feedback detail images, and guide Source - move profile Header navigation into a one-shot useEffect guard - read SearchInput value from e.detail.value with fallback - remove dead useMyClasses.refresh Co-authored-by: Cursor <cursoragent@cursor.com>
…updates - unify comment/answer UI shapes via DiscussionComment supertype (any → typed) - move loading/toast UI out of comment store actions into call sites - sink optimistic reply/answer logic into evaluate & question store actions, adding failure rollback (fixes question answer not rolled back on error) - memoize CommentCard and pass stable feed callbacks to cut re-renders - replace dead scrollTop state with an explicit forceRender trigger - drop empty onSearchToggle handlers; make the prop optional Co-authored-by: Cursor <cursoragent@cursor.com>
Converges reply data into evaluate store, moves classInfo/research/history orchestration into store actions, and extracts like UX into useLikeAction to eliminate duplicate state, list flicker, and page-side setState. Co-authored-by: Cursor <cursoragent@cursor.com>
…in flows. Split monolithic useXxxStore files into domain folders, bucket detail sessions by entity id, and move bus navigation, feed loading, and publisher enrichment into actions so pages orchestrate through a single entry point. Co-authored-by: Cursor <cursoragent@cursor.com>
- 建立 evaluations、evaluationHistory 等实体仓,首页/班级/课评详情由 pages 与 subpackages model 驱动 - 删除 actions/ 及旧 store 加载链路,评论/通知/发布逻辑迁入对应 model - 修复评课评论区楼中楼分页与展示(弱化回复条数、暂关 @ 展示) - 修复反馈历史布局/时间格式化及详情进度条仅高亮当前阶段 - 调整 VirtualList 触底加载与课评历史网络优先策略 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 对木犀课栈小程序前端做了系统性重构,核心不是单点修 bug,而是把「请求 → 状态 → 页面」三层理顺,同时做分包瘦身和反馈 v2 对齐,为发版做准备。
一、请求层
改了什么:
src/common/api/整体迁移为src/common/request/request/api/*思路:
关键修复:
uploadFile重试,不走普通 request二、数据层
改了什么:
actions/层,最终删除,编排下沉到各页model/evaluations实体仓,课评数据有单一来源publisher统一管发布者资料缓存思路:
model管「页面编排」(加载顺序、分页、乐观更新、跨 store 同步)关键修复:
三、分包
改了什么:
profile、feedback、courseROUTES常量统一管理跳转路径思路:
四、组件与页面体验
改了什么:
CommentCard、ReplySection、ReviewDiscussion等)SearchInput布局修复LineChart、StarRating、VirtualList等)GateScreen支持匿名浏览思路:
五、反馈模块
改了什么:
思路:
baseUrl和tokenConfig,不混主站鉴权limit_size=0)在 request + model 层一次性修正六、工程化
改了什么:
myrepo.bundle、graphify-out、调试console.log思路:
审查重点
src/common/api/引用是否已切到src/common/request/yarn.lock变更后依赖安装是否正常