Polish dual cleanse workflow and analysis UX#17
Merged
ChrisAdamsdevelopment merged 1 commit intoMay 4, 2026
Merged
Conversation
Reviewer's GuideRefines the cleanse workflow and analysis UI in app.tsx by introducing clearer dual workflow cards, contextual disabled states with explanations, richer analysis metadata (including parser fallback indication), and more legible system logs, without altering backend behavior. Updated class diagram for QueueItem analysis modelclassDiagram
class QueueItem {
string id
File file
string status
string downloadUrl
string downloadName
Report report
string error
Analysis analysis
string[] logs
}
class Report {
number removedCount
string[] removedTags
string timestamp
}
class Analysis {
string format
string title
string artist
string genre
RiskLevel provenanceRisk
string[] detectedMarkers
string parseError
}
class ParsedMetadata {
string format
string title
string artist
string genre
RiskLevel provenanceRisk
string[] detectedMarkers
string parseError
}
QueueItem --> Report : report
QueueItem --> Analysis : analysis
ParsedMetadata --> Analysis : mapped_to
Flow diagram for dual cleanse button enablement and result sourceflowchart TD
A_start[Start_cleanse_workflow] --> B_has_active_item{Active_item_selected}
B_has_active_item -->|no| C_quick_reason_no_file[quickDisabledReason = Select a file first]
B_has_active_item -->|no| D_seo_reason_no_file[seoDisabledReason = Select a file to provide context first]
B_has_active_item -->|no| E_server_reason_queue[serverDisabledReason depends_on_queue]
B_has_active_item -->|yes| F_is_mp3{File_extension_is_mp3}
F_is_mp3 -->|no| G_quick_reason_not_mp3[quickDisabledReason = Quick Cleanse supports MP3 files only]
F_is_mp3 -->|yes| H_quick_reason_empty[quickDisabledReason = empty]
H_quick_reason_empty --> I_is_batching{isBatching}
G_quick_reason_not_mp3 --> I_is_batching
I_is_batching -->|yes| J_quick_disabled[Quick_Cleanse_button_disabled]
I_is_batching -->|no| K_quick_enabled[Quick_Cleanse_button_enabled]
B_has_active_item -->|yes| L_seo_reason_empty[seoDisabledReason = empty]
B_has_active_item -->|yes| M_server_queue_state{Queue_state}
M_server_queue_state -->|isBatching| N_server_reason_running[serverDisabledReason = Server cleanse already running]
M_server_queue_state -->|queue_empty| O_server_reason_no_files[serverDisabledReason = Add at least one file first]
M_server_queue_state -->|all_done| P_server_reason_all_done[serverDisabledReason = All files are already completed]
M_server_queue_state -->|otherwise| Q_server_reason_empty[serverDisabledReason = empty]
Q_server_reason_empty --> R_server_button_enabled[Full_Server_Cleanse_enabled]
N_server_reason_running --> S_server_button_disabled[Full_Server_Cleanse_disabled]
O_server_reason_no_files --> S_server_button_disabled
P_server_reason_all_done --> S_server_button_disabled
subgraph Result_source_label
T_download_ready{Has_downloadName}
T_download_ready -->|starts_with_quick_cleansed_| U_result_quick[resultSource = Browser Quick Cleanse]
T_download_ready -->|otherwise| V_result_server[resultSource = Full Server Cleanse]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The MP3-only messaging for Quick Cleanse is duplicated and slightly inconsistent (onClick error vs
quickDisabledReason); consider centralizing the message in a constant so both the runtime error and disabled hint stay aligned. - The log styling heuristics (
/failed|error/and/complete|generated|starting server cleanse/) rely on broad substring matches; you might want to tighten these (e.g., by anchoring or using more specific phrases) to avoid misclassifying future log messages as success or error based on incidental wording.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The MP3-only messaging for Quick Cleanse is duplicated and slightly inconsistent (onClick error vs `quickDisabledReason`); consider centralizing the message in a constant so both the runtime error and disabled hint stay aligned.
- The log styling heuristics (`/failed|error/` and `/complete|generated|starting server cleanse/`) rely on broad substring matches; you might want to tighten these (e.g., by anchoring or using more specific phrases) to avoid misclassifying future log messages as success or error based on incidental wording.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Motivation
Description
app.tsxto introduce clear dual-action UI cards forQuick Cleanse (Browser)andFull Server Cleansewith short helper text explaining each path.quickDisabledReason,seoDisabledReason,serverDisabledReason) and visual disabled styles for theQuick Cleanse,Generate AI SEO Payload, andFull Server Cleanseactions.Result Sourcelabel to indicateBrowser Quick CleansevsFull Server Cleanse.parseErrorfield toQueueItem.analysis, showing a non-blocking fallback warning when parser fallback occurred, and rendering metadata in scan-friendly cards with stronger high-risk emphasis and a clarifying low-risk note.[timestamp] messagestrings for layout and styling log rows to visually distinguish info/success/error entries without changing log data format.app.tsx(no server, API, Docker, dependency, or auth/Stripe logic changes).Testing
npm installsuccessfully.npm run buildand the production build completed successfully.AuthScreen,/api/me,UsageMeter,PlanBadge, upgrade modal/checkout flow,/api/process,/api/generate-seo, Quick Cleanse, Full Server Cleanse, manual download link, andURL.revokeObjectURLusage.Codex Task
Summary by Sourcery
Polish the cleanse workflow and analysis UX in the frontend without altering backend behavior.
New Features:
Enhancements: