Repository navigation
Make docs folders real, let cards be dragged on every board, and load a board in one round trip - #165
Conversation
…uests to the schema
…the project header
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 114 files, which is 14 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (114)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…r its own fix(docs): only order a moved doc against anchors in its own destination
|
@coderabbitai review |
|
# Conflicts: # apps/web/src/lib/query/keys.ts # packages/core/src/work/issue-service.ts
… team has no projects or sprints feat(shell): put a search box in the top bar that opens the command palette
…' into claude/docs-area-redesign-2a2395
|
Too many files changed for review (114 files, 100 file limit). Bypass the limit by tagging |
… a column widen its scope fix(board): order a seeded column by its rank, not by the issue ordering fix(board): only offer drag to someone who may update an issue fix(docs): return only placement from a move, never another author's body test(e2e): cover dragging a doc into a folder and copying a private link
Bound the generated search vector with left(content, 200000) so a long multibyte doc can never exceed the tsvector byte cap and become permanently unsavable. Match the body with ts_filter over the stored vector instead of recomputing to_tsvector per row, and quote the headline fragment delimiter so it keeps its spaces. Refuse a move that names both a folder and a project, refuse a parent the mover cannot read, and refuse a parent already nested MAX_DEPTH deep, which is what let a cycle slip past the ancestor guard and reach an unbounded recursive walk. Bound that walk too. Give every doc a place of its own: deleting a folder now lifts its pages to the top level with fresh orders and update actions rather than leaving them silently homeless, deleting a page renumbers the orphans it promotes, and duplicating twice no longer stacks both copies on one order. Rebalancing is one statement instead of one per row, the access request path reads doc columns rather than the whole vector, and granting write over an existing read raises the level instead of doing nothing.
A drag that names no neighbour was still writing a fresh sortOrder, so moving a card between columns collapsed the column's manual order to a constant. Only reposition when a neighbour is named. Cap the grouped endpoint at 60 columns, ordered by size, so grouping a large workspace by assignee or label cannot answer with thousands of groups. The page reports whether it left any out. Seed the per column caches from the board query itself so the seed lands before the columns enable, refuse a column search that would widen past its scope, read the peek panel from the rows a column loaded rather than the props, and mark the aggregate page stale after a mutation so a remount cannot serve a snapshot from before it. Auto scroll now resolves its scroll containers only when the pointer has really moved, and steps aside entirely under prefers-reduced-motion.
…e team picker Every catch up loader ran its own query against the pool, so a write landing between two of them could be reported by one model and missed by another while the resume watermark moved past it. They now all read inside one read only repeatable read transaction. The markdown renderer dropped the alignment a table asked for, so | :-: | rendered left aligned. Carry it through as an align attribute and let the prose styles honour it. A saved view that never chose whether to show empty groups reported itself dirty the moment it opened, because the layout default was compared against the unset tri state. Normalise before comparing. The project team picker read its selection from a prop that only refreshes after the round trip, so toggling two teams quickly dropped the first. It now holds its own selection and re-seeds when the server answer changes. Cover the saved view board drag path end to end.
Docs organisation was unusable: collections existed but nothing let you put a doc in one, so everything piled into "Project docs" while every folder read "Nothing here yet". Cards could not be dragged on saved views or project boards at all. Boards took upward of ten seconds to appear. This fixes all three, and makes the project header editable.
Docs
Folders are folders. A collection is only ever a container now: folder glyph, icon, count, and nothing opens one as a page. Every doc has exactly one home, enforced in
updateDocrather than trusted from the client, so nesting a page under a parent inherits the parent's folder and carries the whole subtree with it.Docs can be moved. Drag a page onto a folder to file it, between rows to reorder, onto a page to nest it, with a drop line for a reorder and a folder highlight for a move. The rules live in a pure
planDocDropplanner so a drop into a doc's own subtree is refused before any request goes out. Every row also has a menu with rename in place, a move-to submenu, duplicate, copy link, archive and delete.Search moves to ranked Postgres full text over a weighted vector, title above body, with the matching passage returned by
ts_headlineand marked in a results panel grouped into title and body hits. Trigram stays for short and partial terms, sobillinstill finds "Billing reconciliation". The generatedsearch_vectoris excluded from every payload, with a test that fails if it ever leaks.Archive and delete. An Archived section with restore and delete forever, and an undo on the archive toast.
Sharing. Copy link is now always present, at every visibility, which is the headline complaint: you could not hand a colleague a link to a private doc. The dropdown, the segmented control and the separate people dialog collapse into one Share dialog. Someone without access lands on a screen naming the doc and its owner with a Request access button; the owner is notified and grants with one click.
The doc header goes from twelve icon buttons to breadcrumb, save status, Share, one overflow menu and New doc.
Board
Drag works everywhere. Saved views and project boards both hardcoded
draggable={false}, which is why dragging did nothing there. Both allow it now, with cross-team state resolution, and cards move between columns even when the board is sorted by something other than manual.Cards land where they are dropped. The cause was in the cache, not the pointer handling:
reconcilerefused to insert a row into any list carrying a filter, so a filtered board removed the card from its old column, never added it to the new one, and waited for a refetch. The optimistic move now writes into the destination column directly. Empty columns also show by default on boards, so every state is a drop target.Pointer-first collision detection, a placeholder gap at the landing spot, edge auto-scroll, no more lift-and-rotate on the dragged card, and row publishing moved to a ref so a drag no longer re-renders every card.
Speed
A board used to walk one cursor-paginated list, 100 rows at a time, sequentially. One new endpoint returns the first page of every column in a single windowed query, then each column pages independently.
Measured against 500 seeded issues across 7 columns:
The round-trip count is the real win. Those are localhost numbers, so the query timings understate what this saves against a deployed database.
Projects
Lead, start, target, status and teams are editable in place from the project header, each writing through the project update endpoint, each falling back to plain text without
project:manage.Schema
doc_collection.position,doc.sort_order, a generateddoc.search_vectorwith a GIN index, thedoc_access_requesttable, and two notification reasons. Per the repo rules these must be applied to the target database before this ships.packages/db/catchup/doc-tree-order-catchup.sqlbackfills the manual order for docs that predate the change.Checks
bun run verifyis green: 3181 tests across nine packages, zero failures, run against the currentmainmerged into this branch.Greptile Summary
The PR adds real document folders and placement controls, access requests and archival workflows, draggable boards with aggregate initial loading, searchable document content, and editable project metadata.
Confidence Score: 5/5
The PR appears safe to merge because both previously reported blocking paths are fixed and no new eligible blocking failure remains.
No blocking failure remains.
Important Files Changed
Sequence Diagram
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile