Compare commits

..

2 Commits

Author SHA1 Message Date
xeruf c2f775e891 docs(tasks): expand documentation a bit 2024-10-03 13:39:52 +02:00
xeruf 617b1ea6d1 fix(tasks): do not show children of non-matching states 2024-10-03 13:29:41 +02:00
2 changed files with 47 additions and 28 deletions

View File

@ -162,27 +162,21 @@ Considering to use Calendar: https://github.com/nostr-protocol/nips/blob/master/
## Plans
- Handle event sending rejections (e.g. permissions)
- Local Database Cache, Negentropy Reconciliation
-> Offline Use!
- Scheduling
- Remove status filter when moving up?
- Task markdown support? - colored
- Time tracking: Ability to postpone task and add planned timestamps (calendar entry)
- Calendar Events - make future time-tracking editable -> parametrised replaceable events
- Speedup: Offline caching & Expiry (no need to fetch potential years of history)
+ Fetch most recent tasks first
+ Relay: compress tracked time for old tasks, filter closed tasks
+ Relay: filter out task status updates within few seconds, also on client side
### Fixes
- Handle event sending rejections (e.g. permissions)
- Recursive filter handling
### Command
### Commands
- Open Command characters: `_^\=$%~'"`, `{}[]`
- Remove colon from task creation syntax
- reassign undo to `&` and use `@` for people
### Conceptual
@ -212,7 +206,7 @@ Suggestions welcome!
- n8n node
- Caldav Feed: Scheduled (planning) / Tracked (events, timetracking) with args for how far back/forward
## Exemplary Workflows
## Exemplary Workflows - User Stories
- Freelancer
- Family Chore Management
@ -223,6 +217,29 @@ Suggestions welcome!
+ Schedule for multiple people
- Tracking Daily Routines / Habits
### Freelancer
For a Freelancer, mostr can help structure work times
across different projects
because it can connect to multiple clients,
using their mental state effectively (Mind Management not Time Management).
It also enables transparency for clients
by sharing the tracked time -
but alternatively the freelancer
can track times on their own auxiliary relay
without problems.
### Family
With a mobile client implemented,
mostr can track shopping lists and other chores for a family,
and provide them context-dependently -
allowing you to batch shopping and activities without mental effort.
### Project Team
sharing, assigning, stand-ups, communication
### Contexts
A context is a custom set of filters such as status, tags, assignee

View File

@ -52,7 +52,7 @@ pub(crate) struct TasksRelay {
tasks: TaskMap,
/// History of active tasks by PubKey
history: HashMap<PublicKey, BTreeMap<Timestamp, Event>>,
/// Index of found users with metadata
/// Index of known users with metadata
users: HashMap<PublicKey, Metadata>,
/// Own pinned tasks
bookmarks: Vec<EventId>,
@ -62,15 +62,15 @@ pub(crate) struct TasksRelay {
/// The task properties sorted by
sorting: VecDeque<String>,
/// A filtered view of the current tasks
/// Would like this to be Task references but that doesn't work
/// unless I start meddling with Rc everywhere.
/// A filtered view of the current tasks.
/// Would like this to be Task references
/// but that doesn't work unless I start meddling with Rc everywhere.
view: Vec<EventId>,
depth: usize,
/// Currently active tags
tags: BTreeSet<Tag>,
/// Tags filtered out
/// Tags filtered out from view
tags_excluded: BTreeSet<Tag>,
/// Current active state
state: StateFilter,
@ -381,19 +381,21 @@ impl TasksRelay {
depth: usize,
) -> Vec<&'a Task> {
iter.flat_map(move |task| {
let new_depth = depth - 1;
if new_depth > 0 {
let mut children = self.resolve_tasks_rec(self.tasks.children_of(&task), sparse, new_depth);
if !children.is_empty() {
if !sparse {
children.push(task);
}
return children;
if !self.state.matches(task) {
return vec![]
}
let new_depth = depth - 1;
if new_depth > 0 {
let mut children = self.resolve_tasks_rec(self.tasks.children_of(&task), sparse, new_depth);
if !children.is_empty() {
if !sparse {
children.push(task);
}
return children;
}
return if self.filter(task) { vec![task] } else { vec![] };
})
.collect_vec()
}
return if self.filter(task) { vec![task] } else { vec![] };
}).collect_vec()
}
/// Executes the given function with each task referenced by this event without marker.
@ -991,10 +993,10 @@ impl TasksRelay {
t.props.insert(event.clone());
});
if !found {
if event.kind.as_u16() == 1 {
if event.kind == Kind::TextNote {
self.add_task(event);
} else {
return Some(event)
return Some(event);
}
}
None