Skip to content

Open favorite pages and blocks in shared detail - #84

Merged
RCmerci merged 5 commits into
mainfrom
codex/favorites-page-detail-20261016
Oct 16, 2026
Merged

RCmerci merged 5 commits into
mainfrom
codex/favorites-page-detail-20261016

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Favorite pages and outline blocks now open the shared detail view and return to Favorites. Page roots display their title/properties and children through the existing staged detail loader, with the same loading grace, pagination, depth/cycle guards and asset owners. Page append uses page revisions and exact parent/page confirmation; Copy reuses the existing bounded subtree traversal.

Favorites use compact single-line native list rows with shared mldoc/reference title resolution, document icons for pages and small solid bullets for blocks. The Favorites root omits Capture; page and outline detail retain Capture and Copy. Page roots omit outline-only mutation actions.

Validation:

  • Rebased onto PR82 main (c49728e). 115 Application, 140 runtime, 45 route/detail and all adaptive tests pass; source boundary is clean. The test-only rebase conflicts preserve both Status A and Favorites coverage. No task changes to protected spec, Dune, locks or Swift.
  • Dedicated synthetic iPhone 13 Simulator: page/outline entry and Back, empty page, 128-item continuation, ten-level detail, slow loading/Back, switching with a late response, correct page/outline text append and subtree clipboard all passed. The final bullet-only native list case also passed.
  • Native evidence predates the build-path-only rebase and the later two property fixes. Those property fixes are covered by public renderer/runtime regressions (RED → GREEN), including naming/deduplication, new sync references, hidden values and cache reuse; no final-source native rebuild is claimed. It uses controlled in-memory protocol data and experimental host-restamped objects (cross_abi_validated=false), so it does not claim persisted graph, native picker/assets or full iOS ABI acceptance. No phone/private graph or real graph/sync-service writes.

The new decision document validates. spec-dev-tool check --all still reports three unchanged historical document errors.

Independent review: the separate journal-code-review reviewer inspected final head 77d8be500dc03b8bec36ad1a54cbdff2d903a06d and found no evidence-backed new issue, including the Status/Favorites test integration. This final review was static; local test results and native acceptance limits are listed above.

Final full CI passed on 77d8be5: https://github.com/logseq/logseq_journal/actions/runs/38876472440 (all targets/native embed and full regression suite).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T08:02:58.275253Z 63015d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63015d4cff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

when Graph.Uuid.to_string page.uuid = block_id && not page.recycled ->
remember_page_revision t page.uuid revision;
Hashtbl.replace t.graph_pages block_id page;
detail_children t ~generation ~page ~root:(page_root_member page revision) ~limit ~after

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve page ownership so Undo can reattach children

When a favorite page is opened, detail_children projects its direct blocks via block_on_page, which turns block.parent = page.uuid into Journal_model.parent_id = None. Those blocks still expose Delete, but Journal_detail.stage_delete consequently records no parent and undo_delete only reattaches entries having Some parent, so pressing Undo on any direct page child leaves it absent from the detail even though the deletion was cancelled; it returns only after reloading. Preserve the synthetic page root as the deletion owner, or make page-root staging and Undo derive ownership from the detail branch.

Useful? React with 👍 / 👎.

Comment on lines +1033 to +1036
{ uuid = page.uuid; page = page.uuid; parent = page.uuid; order = "page"
; title = page.title; created_at_ms = page.created_at_ms
; updated_at_ms = page.updated_at_ms; refs = []; tags = page.tags
; properties = page.properties }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Associate page property-value children with their fields

For a page containing an entity-backed property represented by a logseq.property/created-from-property child, the direct child is projected with parent_id=None while this adapter also exposes the page property itself. The detail renderer recognizes and names an owned property value only when its parent is Some root, so this flow renders the value once in the page's property fields and again as a separate generic “Property” row. Preserve the synthetic page-parent relationship or make the property ownership checks page-root-aware.

Useful? React with 👍 / 👎.

Comment on lines +2922 to +2924
let root = if Graph.Uuid.equal interest.root.block.uuid page.uuid
then page_root_member page revision else interest.root in
let interest = { interest with page; root } in

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the full page-root prefix during metadata refresh

When a page detail has more than 128 direct children and a continuation has been loaded, remember_detail_members leaves t.detail_children[root] containing only the most recently returned slice. A later page title or property change reaches this branch and emits Children_reconciled from that last slice; if it was the final slice, its continuation is None, so Journal_detail.reconcile_children replaces the complete child list with only that slice and the earlier children disappear until the detail is reloaded. Retain an authoritative first-page prefix or avoid issuing a full children reconciliation from a continuation-only cache entry.

Useful? React with 👍 / 👎.

Comment on lines +2951 to +2952
| (V2_missing_page { uuid; _ }
| V2_present_page {page={uuid;recycled=true;_};_}), Changed_detail_page _ ->

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fence page detail loads after the page is recycled

If the selected page is recycled after its page lookup completes but before the initial V2_get_children response arrives, this branch emits Block_removed while the route is still Detail_loading without a staged detail, so Journal_routes.stage_delete ignores the removal. The outstanding Detail_children operation still carries the old page/root and later publishes Detail_loaded, causing the recycled page to open successfully. Retire the pending child read or send an owner-specific missing-detail completion that transitions the loading route before a late response can publish.

Useful? React with 👍 / 👎.

Comment thread app/journal_routes.ml
Comment on lines +403 to 405
| V2_favorite_page { uuid; _ } | V2_favorite_block { uuid; _ } ->
let block_id = Logseq_db_types.Graph_types.Uuid.to_string uuid in
( open_detail t ~block_id ~request_generation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve page identity in detail status and error feedback

Combining page and block favorites in this case discards the target kind before creating the detail route. Consequently, a slow, missing, or failed page still renders the existing “Loading block,” “Block unavailable,” and “Unable to open block” states in application.ml, and page-copy progress likewise says “block and descendants.” Retain the target kind in the route or use entity-neutral wording so page failures and recovery feedback describe the item the user actually opened.

Useful? React with 👍 / 👎.

@RCmerci
RCmerci force-pushed the codex/favorites-page-detail-20261016 branch from d0e2dbc to 77d8be5 Compare October 16, 2026 08:51
@RCmerci
RCmerci merged commit 1e38f64 into main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant