Skip to content

docs(arch): add architectural decisions from backlog - #908

Open
oeninghe-dataport wants to merge 14 commits into
nextfrom
adr/copy-backlog
Open

docs(arch): add architectural decisions from backlog#908
oeninghe-dataport wants to merge 14 commits into
nextfrom
adr/copy-backlog

Conversation

@oeninghe-dataport

Copy link
Copy Markdown
Collaborator

Within our internal weekly, we had a growing backlog of not-yet-published architectural decisions. These are now introduced to the repository.

@oeninghe-dataport oeninghe-dataport added this to the POLAR@3 milestone Jul 30, 2026
@oeninghe-dataport oeninghe-dataport self-assigned this Jul 30, 2026
@oeninghe-dataport
oeninghe-dataport requested a review from a team July 30, 2026 09:35
@oeninghe-dataport oeninghe-dataport added the documentation Improvements or additions to documentation label Jul 30, 2026
Within our internal weekly, we had a growing backlog of
not-yet-published architectural decisions. These are now introduced to
the repository.

Co-Authored-By: Claude Opus 5
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-908/

Built to branch gh-pages at 2026-08-04 09:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@oeninghe-dataport

Copy link
Copy Markdown
Collaborator Author

@dopenguin dopenguin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread docs/architecture/decisions/ADR-0012.md Outdated
Comment thread docs/architecture/decisions/ADR-0013.md Outdated
Comment thread docs/architecture/decisions/ADR-0013.md Outdated
Comment thread docs/architecture/decisions/ADR-0012.md Outdated
Comment thread docs/architecture/decisions/ADR-0013.md Outdated

## Context

ADR 0015 decided that plugins only use the public-facing store of the core.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Linking directly to ADS 0015 seems fitting.


## Context

ADR 0016 decided that POLAR uses KERN.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Linking directly to ADS 0016 seems fitting.

Comment thread docs/architecture/decisions/ADR-0020.md Outdated
## Consequences

- (+) Stores are consistent across plugins.
- (+) Side effects are collected in an action instead of being spread over the store.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it really a side effect if something is done in a scope of an action in contrast to the watch-approach?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

From Wikipedia EN:

[A]n operation [...] is said to have a side effect if it has any observable effect other than [...] reading the value of its arguments and returning a value to the invoker of the operation.

This is - for JS/TS - a very broad definition, of course: The assignment itself (as in

function setX(newX: number) {
    x.value = newX
}

) is a side effect, too.

That said, IMO, at least the expressions that affect state that are not the assignment itself can be called "side effect".

Comment on lines +12 to +25
- A: State is only changed through actions, every state value is readonly from the outside.
- (+) All effects of a change are collected in the action.
- (-) Additional actions are required every time, which causes unnecessary complexity.
- (-) `readonly` has to be implemented every time, both technically and in the documentation.
- (-) Changing state through an action is less intuitive.
- B: The above only applies if changing the state has an effect that is encoded within the store. Otherwise the state value is mutable.
- (-) The mutability of a value has to be changed whenever new side effects arise.
- C: State is mutable in principle, as far as changing it is meaningful at all. Derived values are preferably determined via `computed`, alternatively via `watch`.
- (+) State is always mutable and therefore the easiest to use.
- (+) Watchers are already used for inter-plugin communication anyway.
- (-) Effects are harder to grasp, as they are not collected centrally in an action.
- D: We do not make any rules; everyone writes according to personal preference.
- (+) Personal freedom is preserved.
- (-) The design of the plugins becomes rather inconsistent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This does not really represent the thing that was decided by this ADR: Use actions and restrain from using watchers if possible.

oeninghe-dataport and others added 13 commits August 4, 2026 11:01
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants