docs(exploration): add AFFiNE BlockSuite integration feasibility analysis - #3
Conversation
…ysis - add exploration 0102 covering AFFiNE BlockSuite integration feasibility - document architecture fit, risks, and implementation considerations - preserve findings in docs/explorations for team review
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA comprehensive feasibility exploration document has been added that evaluates integrating AFFiNE/BlockSuite with xNet. The analysis covers architectural compatibility, identifies key conflicts (CRDT mismatch, storage paradigms, authorization gaps), compares feature overlaps, and recommends selective UX borrowing over full integration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR adds a thorough 1,066-line exploration document evaluating whether AFFiNE/BlockSuite can power xNet's docs, canvas, and database features. The document correctly identifies fundamental incompatibilities (CRDT data models, event-sourced vs. IndexedDB storage, workspace-level vs. node-level authorization) and recommends selective UX borrowing over full integration, backed by architecture diagrams, a phased roadmap, and a component-extraction checklist. Key items:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Start([Evaluate AFFiNE/BlockSuite Integration])
Start --> Q1{Need full editor\nreplacement?}
Q1 -- Yes --> StratA[Strategy A: Full Adoption]
StratA --> A_result[❌ Not Viable\nBreaks event sourcing,\nschema system, auth model]
Q1 -- No --> Q2{Need actual\nBlockSuite code?}
Q2 -- Yes --> StratB[Strategy B: UI Components Only]
StratB --> B_result[✅ Recommended\nCherry-pick widgets,\nwire to xNet hooks]
B_result --> Adapter[Thin adapter layer:\nCommand / Event / State mappers]
Adapter --> xNetCore[xNet Core Unchanged:\nevent sourcing · schema · UCAN auth]
Q2 -- No --> StratC[Strategy C: Reference Implementation]
StratC --> C_result[✅ Best Long-Term\nStudy UX patterns,\nrebuild natively]
C_result --> NativeUI[Native components:\nTailwind + Base UI\nZero BlockSuite dependencies]
NativeUI --> xNetCore
xNetCore --> Deploy([Ship AFFiNE-inspired UX\nwith xNet architecture intact])
Last reviewed commit: 3753f67 |
…BILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…BILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
|
||
| ### Immediate Actions (This Week) |
There was a problem hiding this comment.
Duplicate "Legal issues" row — original incorrect entry not removed
The Product Risks table now has two consecutive rows for the same risk. It looks like the corrected row (line 817) was appended when addressing a previous review comment, but the original row (line 816) — which still carries the incorrect (permissive) label and an inconsistent 🟢 Low severity — was never removed. This leaves the table contradicting itself: the same risk is rated both 🟢 Low and 🟡 Medium.
The first row should be deleted so only the corrected entry remains:
| ### Immediate Actions (This Week) | |
| | **Legal issues** - License or trademark concerns | 🟡 Medium | BlockSuite is MPL 2.0 (weak copyleft, file-level); do not copy source files — copy only visual patterns and interactions | |
…ysis (#3) * docs(exploration): add AFFiNE BlockSuite integration feasibility analysis - add exploration 0102 covering AFFiNE BlockSuite integration feasibility - document architecture fit, risks, and implementation considerations - preserve findings in docs/explorations for team review * Update docs/explorations/0102_[_]_AFFINE_BLOCKSUITE_INTEGRATION_FEASIBILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update docs/explorations/0102_[_]_AFFINE_BLOCKSUITE_INTEGRATION_FEASIBILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ysis (#3) * docs(exploration): add AFFiNE BlockSuite integration feasibility analysis - add exploration 0102 covering AFFiNE BlockSuite integration feasibility - document architecture fit, risks, and implementation considerations - preserve findings in docs/explorations for team review * Update docs/explorations/0102_[_]_AFFINE_BLOCKSUITE_INTEGRATION_FEASIBILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update docs/explorations/0102_[_]_AFFINE_BLOCKSUITE_INTEGRATION_FEASIBILITY.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
## Summary - **Exploration 0343** — dimension-by-dimension scorecard of xNet's auth stack vs Ink & Switch's [Keyhive](https://www.inkandswitch.com/keyhive/notebook/); companion to 0325 (harvest lessons), fully implemented and checked off (`[x]`) — its checklist was analysis-routing, not code. - **Corrects a stale premise in both 0343 and 0335 blocker #2:** the client's *action* wildcard is already fixed (explicit `HUB_CAPABILITIES`, no more `hub/*`); the remaining residue is the *resource* wildcard (`with: '*'`) + the `authorize.ts:146` capability short-circuit, which still makes room ACLs advisory. Conclusion unchanged: no same-hub confidentiality from authz until that's closed. - **Amends 0325** per re-verification: C4's CGKA prerequisite narrowed (ledger device records + epochs exist; the gap is per-device keypairs + signing/encryption lineage split), and C2 can build on the existing `rotateContentKey` grant-revocation coupling. - **Records decisions:** 0335 sequencing (perimeter blockers #2/#3 stay ahead of 0325-C1/C2); `pull` relay-only rung rejected for now (hub-internal until 0258 zero-knowledge hubs exist). Docs-only — no code changes; `skip-changelog`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…(0410) (#658) Implements exploration `0410_[_]_OPEN_PR_TRIAGE_AND_THE_STRANDED_BRANCH_PROBLEM.md`, written in the previous turn. ## What this closes out Eight PRs were open, the oldest from March. Checking each one's **actual diff against `main`** (rather than its description) found that four described work already in `main`, re-derived and landed weeks later by another route. | PR | Age | Action taken | | --- | --- | --- | | #400 | 24d | **Closed** — fix landed on main in a better form; branch predates 0391 and would have deleted `NodeLineRunner` | | #9 | 145d | **Closed** — draft; `apps/electron/src/renderer/workspace/` no longer exists | | #595 | 11d | **Closed** — byte-identical to main (`fbc2965a2`) | | #463 | 20d | **Closed** — main has a longer, `[x]` version of 0298 | | #13 | 141d | **Closed** — both fixes on main verbatim | | #505 | 17d | **Merged** — exploration 0318 + scale bench | | #389 | 25d | **Merged** — exploration 0270 | | #449 | 20d | **Rebuilt here** — see below | `#400` was the load-bearing one: `git diff origin/main pr400 -- packages/devkit/src/command-runner.ts` showed ~150 lines of *deletion* covering the whole 0391 streaming agent seam. Only its `CONFLICTING` state had prevented that. `#505`'s `build-and-smoke-test` went green on a rebase, confirming it was branch staleness rather than the diff. ## The #449 rebuild (0290 bugs #2 and #3) The original patched `apps/web/src/workbench/SyncStatus.tsx`, which 0406 deleted; the component now lives in `packages/workbench`, so the rebuild lands on **desktop and web at once**. - `WorkbenchHost` gains a `hub` capability (`configuredUrl` / `connect`) so the shell can offer a way out of the disconnected state without importing either app's `hub-url` module. `connect` returns a reason string on rejection — never a silent no-op. - `SyncStatus` exports `openSyncStatusPanel()`; the desktop popover and mobile sheet both listen. The panel shows an inline hub-URL form while there is no hub. - `ShareDialog`'s `!ready` branch explains why a hub is needed and offers **Connect a hub…**; private-hub links now confirm before copying. - Adds `normalizeHubUrl` to the electron renderer's `hub-url` mirror (+4 unit tests), so a malformed URL is rejected loudly rather than persisted. Verified by driving the real app against a local hub — the CTA closes the dialog and opens the panel; an invalid URL shows an error and persists nothing; `https://hub.xnet.fyi/` normalises to `wss://hub.xnet.fyi`; a `localhost` link's first Copy click asks "Copy local-only link?" and writes nothing, the second copies. No console errors. 0290 is now `[-]` at 11/20. ## Stopping the recurrence Time-to-merge for the last 20 merged PRs was **0 hours median, 1 hour max** — there is no review queue, so a PR that outlives its session is abandoned, not pending. - `.github/workflows/stale.yml` — warns at 14d, closes at 21d, `keep-open` exempts. Named consumer (the maintainer, weekly) and a decidable pass condition, per AGENTS.md. - Fixed the `/explore` next-number command, which read only the working tree and so handed out numbers already claimed on branches. Seven explorations were found stranded that way. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary\n- add exploration 0102 for AFFiNE BlockSuite integration feasibility\n- capture architecture fit, risks, and implementation considerations\n- place document under docs/explorations for review and follow-up planning\n\n## Testing\n- not applicable (documentation-only change)
Summary by CodeRabbit