BACK-633 - Show and edit modified files in the web task modal - #913
Merged
Conversation
Cap the paths list at max-h-64 with overscroll-contain so a task listing hundreds of files scrolls inside its own section instead of pushing the sections below it out of reach, count the paths in the heading following the existing Comments (n) precedent, and align the remove control to the first line of a wrapped path. Add SSR coverage for the many-long-paths and cross-branch read-only cases.
Owner
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
The
modifiedFilesfield was added in #607 (BACK-412) and is wired through the whole stack: the markdown parser/serializer,backlog task edit --modified-filesin the CLI, the plain output, the TUI task viewer, the MCP tools, and web search. The one surface that never caught up is the web task details modal: the card neither displayed the files nor offered a way to edit them.The asymmetry is easy to reproduce today: in the web UI you can search tasks by file name —
search-command-query.tsparsesmodifiedfiles:tokens,SideNavigation.tsxdetects them as a command query, andlib/api.tsforwards them asmodifiedFileparams — but opening a task found that way showed no trace of the files that matched it.This PR adds a Modified files section to
TaskDetailsModal.tsx, modeled 1:1 on the existing References section right above it:<code>,break-allfor long paths);handleInlineMetaUpdate, i.e. the same optimistic-update path References use.No server changes were needed:
PUT /api/tasks/:idalready acceptsmodifiedFiles(src/server/index.ts), so the backend was ready and waiting. The new state is wired into the modal's form-state snapshot, the dirty-preserving refresh logic, task-switch reset, and external-update sync, same as the other list fields.One file changed:
src/web/components/TaskDetailsModal.tsx(+76).Validation
bun test --timeout=10000on this branch: 2244 pass, 6 skip, 1 fail (2251 tests across 230 files).Git Operations > fetch > hard-kills a timed-out Git process group even when a child holds its pipes— a pre-existing timing flake unrelated to this change: with this diff stashed, the same test fails on unmodifiedmainas well, and it passes 5/5 consecutive isolated runs with the diff applied (failures land at ~504–508 ms against its 500 ms kill window).bunx tsc --noEmit: clean.Notes
BacklogServer statistics endpoint > reconciles a selected backlog root before reading its statisticsalso failed once under load; it passes in isolation both with and without this diff, so it looks like the same class of environment-sensitive flake.backlog task create) or adjust scope if you'd prefer this discussed in an issue first.Maintainer follow-up (BACK-633)
Thanks @ivan812205 — the diagnosis and the diff were both right, so this was picked up and finished in place rather than reworked. Your commit is the base of the branch; the commits on top are maintainer edits.
Adding the backlog task: BACK-633 - Show and edit modified files in the web task modal, created with the CLI and committed to this branch.
Review of the original change
Verified rather than assumed:
PUT /api/tasks/:iddoes apply the field (src/server/index.ts), and core normalizes it (resolveModifiedFilesinsrc/core/backlog.ts), so no server change was needed — correct as described.referenceshandling.handleSavedeliberately omitsmodifiedFiles, exactly as it omitsreferences, so a Save in edit mode cannot clobber an inline edit. Correct as written.main, so no rebase was needed.Added: the section has to survive a large task
A finished task can list well over a hundred paths, and paths can be long enough to wrap several times. Unbounded, the section pushed Documentation, Acceptance Criteria, Plan, Notes and Comments out of reach.
max-h-64,overflow-y-auto,overscroll-contain), following the bounded-list pattern already used byCleanupModalandDuplicateIdRepairModal.overscroll-containkeeps the inner wheel from scrolling the modal behind it.Modified files (130)— matching the existingComments (n)precedent, so a capped list still announces its size without adding helper text.items-startwith a small offset on the remove button, so on a path that wraps to three lines the control sits with the first line instead of floating in the middle of the row.break-allwrapping rather than truncating, so no path is hidden.hasCreateModeEntriesnow countsmodifiedFilesalongsidereferences.Measured in a throwaway project on a task seeded with 130 long paths (Chrome, 1280px):
All 130 paths stay in the DOM and the last is reachable by scrolling (list content 10392px inside a 256px box). No horizontal overflow at 1280px or at 375px, where paths wrap to six lines and the section still measures 372px. The cap is inert for ordinary tasks: a 3-path task measures an 88px list with no scrollbar.
Added: tests
src/test/web-task-details-modal-modified-files.test.tsxfollowsweb-task-details-modal-documentation.test.tsx— five cases covering the populated list, the empty state, the heading count, a 120-path long-path case asserting every path renders inside a bounded scrolling list with later sections still present, and cross-branch read-only hiding both controls. The many-paths case was confirmed to fail when the height cap is removed.Validation
bunx tsc --noEmit: clean.bun run check .: clean.bun run test: 2250 pass, 6 skip, 0 fail (231 files). The git-timeout flake you hit did not reproduce.bun run build: succeeds.backlog task view --jsonreported 131; removing it from the modal returned both to 130.One pre-existing behavior noted but deliberately not changed here: pressing Enter in the add input did not submit under synthesized key events. The References add form behaves identically, so it is shipped parity rather than a regression in this PR, and the Add button works in both.