Skip to content

Fix plain-files pull for Slack recent files#121

Merged
mohammedahmed18 merged 1 commit into
mainfrom
codex/slack-pull-recent-files
Jul 23, 2026
Merged

Fix plain-files pull for Slack recent files#121
mohammedahmed18 merged 1 commit into
mainfrom
codex/slack-pull-recent-files

Conversation

@mohammedahmed18

@mohammedahmed18 mohammedahmed18 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Include Slack recent.md pages in connector enumeration so plain-files pulls can materialize channel content.
  • Let directory-target pulls work for plain-files projections, recursively discover connector directories, and hydrate all missing/stub child pages under an explicit directory pull.
  • Skip refetching already-hydrated projected child pages during directory pulls, while still hydrating missing files and remaining stubs.
  • Preserve plain-files remote moves during directory pulls by reusing the mount-root move plan/rename behavior, including recursive connector directories.
  • Avoid rewriting existing stubs and avoid Notion-only missing-media repair for Slack pulls; update stub access polling so daemon rewrites do not look like user reads.
  • Give daemon pull requests a pull-specific 2-hour default timeout so large Slack hydration pulls can finish without racing a direct fallback.

Test Plan

  • cargo fmt --check
  • cargo test -q -p loc-cli commands::tests::daemon_request_timeout_for_uses_pull_specific_default
  • cargo test -q -p loc-cli --test pull
  • cargo test -q -p localityd pull::tests
  • cargo test -q -p locality-slack
  • cargo build -q -p loc-cli -p localityd -p locality-slack
  • cargo test --workspace --all-targets (rerun passed after one order-sensitive desktop test passed individually)
  • git diff --check

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
locality Ready Ready Preview, Comment Jul 23, 2026 8:17pm

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codex review

  • major crates/localityd/src/pull.rs:992
    Plain directory pulls now hydrate every page child under non-database directories. That fixes Slack recent.md, but it also changes Google Docs folder pulls: after a root pull, loc pull <mount>/marketing will fetch and hydrate every stubbed Google Doc in that Drive folder, violating the existing online-only behavior for workspace folders and causing unexpected Docs API reads. Minimal fix: gate this auto-hydration to Slack or a connector capability, and add a Google Docs folder-pull test asserting nested docs remain stubs and docs.get_count() == 0.

  • major crates/localityd/src/pull.rs:1611
    write_stub_if_needed now skips all existing page paths, including stale stub files. Previously, existing stubs were refreshed while non-stub local edits were preserved. With this change, a pull that sees updated remote title/version or connector-provided stub frontmatter updates the entity store but leaves the Markdown stub’s frontmatter stale; for row/property stubs this can expose old remote properties and later edits can be based on obsolete metadata. Minimal fix: only skip when the existing path is non-stub, or when the existing stub content exactly equals stub_markdown(entry). Add a test where an existing stub has old frontmatter and a pull rewrites it to the new stub without touching hydrated/non-stub files.

@mohammedahmed18
mohammedahmed18 force-pushed the codex/slack-pull-recent-files branch from e72ef65 to 44f519c Compare July 23, 2026 20:17
@mohammedahmed18
mohammedahmed18 merged commit 0e906db into main Jul 23, 2026
10 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