Open
Conversation
- Fix seeding quantity: Count deduplicated table rows instead of reading incorrect 588 - Fix seeding size: Add deduplication when accumulating torrent sizes - Use torrent ID (details.php?id=XXX) as unique identifier for deduplication - Resolve issue where haidan site returns 100% duplicated data in HTML fragment
- When site is marked as offline, allow deleting today data with all zeros - Fix metadata.lastUserInfo cache not updating after deletion - Remove debug console.log from UserDataTimeline
Reviewer's GuideThis PR refines the offline-site data deletion workflow by introducing checks to allow removal of same-day erroneous entries, synchronizes the metadata cache upon deletions, cleans up a stray debug statement, and extends the haidan site definition to fetch and parse seeding statistics via AJAX. Sequence diagram for deleting erroneous data from offline sitessequenceDiagram
actor User
participant "HistoryDataViewDialog.vue"
participant "userInfo.ts (offscreen)"
participant "metadataStore"
User->>"HistoryDataViewDialog.vue": Click delete on today's erroneous data
"HistoryDataViewDialog.vue"->>"userInfo.ts (offscreen)": sendMessage("removeSiteUserInfo", {siteId, date})
"userInfo.ts (offscreen)"->>"metadataStore": Remove userInfo for given date
"userInfo.ts (offscreen)"->>"metadataStore": Check if deleted date is lastUserInfo
alt Last successful data deleted
"userInfo.ts (offscreen)"->>"metadataStore": Update lastUserInfo to latest success or remove
end
"userInfo.ts (offscreen)"-->>"HistoryDataViewDialog.vue": Deletion complete
"HistoryDataViewDialog.vue"->>User: Refresh history data
Class diagram for updated deletion logic and metadata synchronizationclassDiagram
class HistoryDataViewDialog {
+isSiteOffline: computed
+isDataErroneous(userInfo: IShowUserInfo): boolean
+canDeleteTodayData(item: IShowUserInfo): boolean
+deleteSiteUserInfo(date: string[]): void
}
class userInfo {
+removeSiteUserInfo(siteId: string, date: string[]): void
}
class metadataStore {
+lastUserInfo: Record<TSiteID, IUserInfo>
}
HistoryDataViewDialog --> userInfo : sendMessage("removeSiteUserInfo")
userInfo --> metadataStore : update lastUserInfo on deletion
Class diagram for haidan site definition AJAX seeding info parsingclassDiagram
class siteMetadata {
+process: Step[]
}
class Step {
+requestConfig: object
+fields: string[]
+selectors: object
}
siteMetadata "1" o-- "*" Step : process steps
Step <|-- SeedingStep : AJAX seeding info
class SeedingStep {
+selectors: object
+seeding
+seedingSize
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
问题描述
当站点关闭后,最后一次获取到的数据都是错误的0,而且最后一次的历史记录始终无法删除,导致用户无法使用最后一次站点正常时获取的数据留作纪念。
具体表现为:
metadata.lastUserInfo缓存未更新,仍显示已删除的数据修复方案
1. 允许删除离线站点的错误数据
isOffline)时,允许删除当天获取的错误数据HistoryDataViewDialog.vue的删除权限判断逻辑2. 修复删除后缓存未更新的问题
userInfo.ts中的removeSiteUserInfo处理函数metadata.lastUserInfo缓存metadata.lastUserInfo中的缓存3. 清理调试日志
UserDataTimeline/Index.vue中的console.debug调试日志修改文件
src/entries/options/views/Overview/MyData/HistoryDataViewDialog.vuesrc/entries/offscreen/utils/userInfo.tssrc/entries/options/views/Overview/MyData/UserDataTimeline/Index.vue测试
已测试验证:
metadata.lastUserInfo缓存正确同步更新Summary by Sourcery
Allow users to delete zeroed data entries for offline sites, ensure lastUserInfo cache stays in sync after deletions, and improve the Haidan site metadata parsing pipeline while cleaning up debug logs.
New Features:
Bug Fixes:
Enhancements: