Stelle bestehende Quellzuordnungen wieder her und halte Connectoren beim eigenen Konto.
Deploy Development / deploy (push) Successful in 28s
Test Suite / pytest-backend (push) Failing after 2m11s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 10s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-19 16:58:50 +02:00
1 parent d6b70d8f92
commit c3a07cee64
8 files changed
+250 -9

No files matched your search

+5 -2
View File
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
import { useContext, useEffect, useRef, useState } from "react";
import { SessionContext } from "../session.js";
import { documentToText, downloadMailPart, fetchExternal, fetchFile, fetchMailPart, markDirty, textToDocument, api } from "../api.js";
import { SourceAssignment, noteEditor, representationOf } from "../sources/registry.jsx";
import { ErrorNote } from "./widgets.jsx";
@@ -75,6 +76,8 @@ function Correspondence({ element, direction, onOpenRelated }) {
export function ReadingPane({ binding, context, backLabel, onClose, onReload, canDetach, canDestroy, onOpenRelated }) {
const element = binding?.element;
const { session } = useContext(SessionContext) || {};
const ownsElement = Boolean(session?.account?.id && element?.owner_subject_id === session.account.id);
const [error, setError] = useState("");
const [phase, setPhase] = useState("idle");
const [media, setMedia] = useState("");
@@ -606,7 +609,7 @@ export function ReadingPane({ binding, context, backLabel, onClose, onReload, ca
) : null}
{!isMail && unassigned ? (
<div className="reader-pane__state">
<SourceAssignment element={element} onAssigned={onReload} />
<SourceAssignment element={element} onAssigned={onReload} owner={ownsElement} />
</div>
) : null}
{!isMail && !locked && !unassigned && phase === "loading" ? <p className="reader-pane__state">Vorschau wird geladen …</p> : null}
+2 -2
View File
@@ -153,7 +153,7 @@ export const editors = {
markdown_file: { id: "markdown_file", available: false },
};
export function SourceAssignment({ element, onAssigned }) {
export function SourceAssignment({ element, onAssigned, owner = false }) {
const external = element?.external;
const resolution = external?.resolution;
const source = external?.source;
@@ -161,7 +161,7 @@ export function SourceAssignment({ element, onAssigned }) {
const [choice, setChoice] = useState("");
const [error, setError] = useState("");
const [pending, setPending] = useState(false);
const open = source && (resolution === "ambiguous" || resolution === "unresolved");
const open = owner && source && (resolution === "ambiguous" || resolution === "unresolved");
useEffect(() => {
if (!open || !external?.external_id) return undefined;