Remove "Revert" button functionality #81
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gtfs.zone/coloring-book#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove the per-patch cherry-pick "Revert" buttons from the Changes tab (the confusing functionality called out in #81), delete the now-dead
revertPatchmethod fromPatchManager, and redesign the "Feed loaded" baseline row to look and behave like a regular change card — styled consistently, with an "origin" badge, and clickable to jump to version 0 (replacing the old "Revert all" button).The changes are entirely confined to
src/modules/history-controller.tsandsrc/modules/patch-manager.ts.Relevant context
src/modules/history-controller.ts—render()method (lines 128–228) builds the Changes panel DOM. Per-patch Revert buttons are appended in theif (applied)block at lines 177–191. The baseline row is rendered at lines 208–227.src/modules/patch-manager.ts—revertPatch(version)at line 326 is only called from the now-removed button; it will become dead code.jumpToVersion(target)at line 395 is what the baseline click should call withtarget = 0.flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-base-200 transition-colorsplus aborder-l-2 border-primary bg-base-200highlight whenisCurrent. The "Feed loaded" baseline is version 0, so it should highlight whencurrentVersion === 0.Phase 1 — Remove per-patch Revert buttons and dead code
Goal: Strip the cherry-pick UI and its backing method. Clean and self-contained.
history-controller.ts, delete theif (applied) { ... revertBtn ... }block (lines 177–191) that creates and appends the per-patch Revert buttonpatch-manager.ts, delete therevertPatchmethod (line 326 through its closing brace, ~55 lines)textClass/line-throughstrikethrough logic on the patch label — specificallyconst textClass = applied ? '' : 'opacity-50 line-through'and its use in theli.innerHTMLtemplate. Patches that aren't currently applied should remain visually distinguishable (keepopacity-50) but without the line-throughPhase 2 — Redesign baseline row as a change card
Goal: Make "Feed loaded" look like a peer of the patch cards rather than a footer widget.
<ul>/<li>block (lines 208–227) with a new<li>appended to the existingul(or a separateulbelow, consistent with current structure)<li>identically to patch cards:flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-base-200 transition-colorsbg-base-200 border-l-2 border-primary) whencurrentVersion === 0<span class="badge badge-ghost badge-sm">origin</span>and a<span class="text-xs">Feed loaded</span>inside a flex column, matching the inner layout of patch cardsthis.patchManager.jumpToVersion(0)revert-all-btnbutton entirely — the whole row is now the click targetOriginal Issue
Lets remove the buttons in the Changes tab where you can "cherry-pick" a patch to revert. This is confusing and not very useful.