mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 23:36:20 +00:00
docs: tags are names, one type per page, tag nodes in the graph
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5026fde92b
commit
8d4404e414
2 files changed
+28
-25
No files matched your search
+14
-12
@@ -117,16 +117,17 @@ Tokens: `paper surface ink muted faint line accent accent-soft ref done code-bg
|
|||||||
comments, selectors and unknown properties are ignored (unknown `--vars` are reported).
|
comments, selectors and unknown properties are ignored (unknown `--vars` are reported).
|
||||||
|
|
||||||
## Types and tags
|
## Types and tags
|
||||||
- **Type** (what a note is): plain names, no page (persona, lugar, empresa, software, sueño,
|
Both are plain names with no page, shown as one row of pills under the title.
|
||||||
concepto, idea, ...). "Type" under the header opens a picker with the types in use (with count)
|
- **Type** (what a note is): at most one per page (persona, lugar, empresa, software, sueño,
|
||||||
and seeded suggestions, or type a new name. Stored in `Page.types`.
|
concepto, idea, ...). The filled pill (or the ghost "Add type") opens a single-select picker
|
||||||
- **Tag** (a topic): a real page of kind `tag`. "Tag" opens a picker over the existing tag pages
|
with the types in use (with count), seeded suggestions, a new name, or "Remove type". Stored
|
||||||
or creates one by typing a new name (a note used as a tag becomes a tag page; hubs, journals
|
in `Page.types`; a type also counts as a tag of the same name.
|
||||||
and templates cannot be tags). Tag chips open the tag page, which lists its tagged notes.
|
- **Tags** (topics): many per page, always sorted alphabetically. "+ tag" opens a picker where
|
||||||
An inline `#tema` or `[[tema]]` in the text also links to the page. Renaming or deleting a tag
|
several can be added in a row; hovering a chip shows its ×. A chip opens the tag view: pages
|
||||||
page updates its members. Tag pages cannot be tagged themselves.
|
with that tag or type, "Rename" (also renames types, merging duplicates) and "Remove from all
|
||||||
- In the graph a tagged note points at its tag pages with a separate edge kind (TAGGED), apart
|
pages". An inline `#tema` in the text still links to a page of that name.
|
||||||
from page links and inline references.
|
- In the graph every tag is a virtual node drawn as a hollow accent ring and linked to its
|
||||||
|
pages with a separate edge kind (TAGGED); tapping one opens its tag view.
|
||||||
|
|
||||||
## Hubs, namespaces and cleanup
|
## Hubs, namespaces and cleanup
|
||||||
- **Hub** (folder icon): a page kind, not a note: no outline, a title, a short description
|
- **Hub** (folder icon): a page kind, not a note: no outline, a title, a short description
|
||||||
@@ -172,13 +173,14 @@ One view (sidebar "Graph", Ctrl+Shift+G) with a mode selector:
|
|||||||
activation, edge thickness = Hebbian synapse weight, a pulse travels outward by hops.
|
activation, edge thickness = Hebbian synapse weight, a pulse travels outward by hops.
|
||||||
- **Clusters**: soft hulls grouped by "Hubs" (home hub, default when the graph has hubs; hull
|
- **Clusters**: soft hulls grouped by "Hubs" (home hub, default when the graph has hubs; hull
|
||||||
labelled with the hub title once it is wide enough on screen; layout-only springs pull
|
labelled with the hub title once it is wide enough on screen; layout-only springs pull
|
||||||
members to their hub), by "Tags" (each page goes to its most widely used tag page, ties
|
members to their hub), by "Tags" (each page goes to its most widely used tag, ties
|
||||||
alphabetical; hull labelled with the tag name; springs pull pages to the best connected page
|
alphabetical; hull labelled with the tag name; springs pull pages to the best connected page
|
||||||
of the tag; journals and untagged pages stay out) or by "Communities" (Louvain: groups found
|
of the tag; journals and untagged pages stay out) or by "Communities" (Louvain: groups found
|
||||||
automatically from link density, no names). Colours follow group size.
|
automatically from link density, no names). Colours follow group size.
|
||||||
- **Tree**: hubs (root hubs, then members recursively, cycle-safe, each hub expanded once,
|
- **Tree**: hubs (root hubs, then members recursively, cycle-safe, each hub expanded once,
|
||||||
folder glyph; membership = CONTAINS edges), namespaces (`a/b/c` titles, straight off the
|
folder glyph; membership = CONTAINS edges), namespaces (`a/b/c` titles, straight off the
|
||||||
centre), the notes in no hub (orphans included) and Tags (with their pages). Nothing is
|
centre), the notes in no hub (orphans included) and Tags (each tag node with its pages;
|
||||||
|
clicking a tag opens its tag view). Nothing is
|
||||||
capped. Laid out by the same `ForceLayout` as the network (edges = parent/child, seeded
|
capped. Laid out by the same `ForceLayout` as the network (edges = parent/child, seeded
|
||||||
from a radial layout). The centre carries the store name; every arm and sub-branch has its
|
from a radial layout). The centre carries the store name; every arm and sub-branch has its
|
||||||
own colour (arms evenly spread over the hue circle, children split their parent's sector).
|
own colour (arms evenly spread over the hue circle, children split their parent's sector).
|
||||||
|
|||||||
+14
-13
@@ -28,19 +28,20 @@ crates may add their own tables to the same database (prefix them: `search_*`, `
|
|||||||
- **Assets**: metadata rows; bytes in the blob store.
|
- **Assets**: metadata rows; bytes in the blob store.
|
||||||
|
|
||||||
## Tags and types (`synapse-core::{tags, types}`)
|
## Tags and types (`synapse-core::{tags, types}`)
|
||||||
- **Tags are pages** of kind `tag` (topics such as "tecnología"). A page carries
|
- **Tags are plain names**, never pages. A page carries `Page.tags: Vec<String>` (`pages.tags`,
|
||||||
`Page.tags: Vec<String>` (tag page titles; `pages.tags`, schema v5, synced with the page, LWW
|
synced with the page, LWW per page), stored sorted case-insensitively by `title_key`. The
|
||||||
per page); the derived `page_tags(page_id, tag_key)` index is rewritten on every page write.
|
derived `page_tags(page_id, tag_key)` index covers the page's tags plus its type and is
|
||||||
Setting a tag creates the tag page or converts a note to one; hubs, journals and templates
|
rewritten on every page write. Journals and templates cannot be tagged.
|
||||||
cannot be tags, and tag pages cannot be tagged. Renaming/deleting a tag page rewrites/removes
|
API: `set_page_tags`, `add_page_tag`, `remove_page_tag`, `pages_with_tag`, `tag_catalog`,
|
||||||
it in its members; opening the graph creates tag pages for tag names that lack one.
|
`rename_tag` (tags and types, merging duplicates) and `remove_tag` (explicit tags only).
|
||||||
API: `set_page_tags`, `add_page_tag`, `remove_page_tag`, `pages_with_tag`, `tag_catalog`.
|
- **A page has at most one type** (`Page.types`, 0 or 1 entries; `Page::page_type()`), a name
|
||||||
The graph has a `TAGGED` edge from each tagged page to its tag pages.
|
saying what the page is. It implies a tag of the same name. API: `set_page_type(page,
|
||||||
- **Types** are plain names saying what a page is: `Page.types` (`pages.types`, no page, no
|
Option<&str>)`, `type_catalog` (types in use by count, then the seeded `SUGGESTED_TYPES`).
|
||||||
index). API: `set_page_types`, `add_page_type`, `remove_page_type`, `type_catalog` (types in
|
- Schema v6 turned former tag pages (kind `tag`) into plain notes and trimmed multiple types to
|
||||||
use by count, then the seeded `SUGGESTED_TYPES`).
|
the first; `PageKind` has no `Tag` any more and "tag" parses as a note.
|
||||||
- Both are exported as `synapse-tags::` / `synapse-types::`, and tag pages as
|
- In the graph (`synapse-ffi`) every tag in use is a virtual node (`GraphNode.is_tag`, id
|
||||||
`synapse-kind:: tag` (see `history.md`).
|
`tag:<title_key>`, no page), with a `TAGGED` edge from each tagged page (type included).
|
||||||
|
- Exports use `synapse-tags::` and `synapse-type::` (see `history.md`).
|
||||||
|
|
||||||
## Hubs and namespaces (`synapse-core::structure`)
|
## Hubs and namespaces (`synapse-core::structure`)
|
||||||
Two orthogonal ways to organise pages.
|
Two orthogonal ways to organise pages.
|
||||||
|
|||||||
Reference in new issue
Block a user