Files
ARCADIA-Studio/crates/oa-desktop/src/semantic_review.rs
T
Codex e2ecfea69b
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s
Checkpoint source 7 workflows and in-progress diagram authoring redesign
Preserve current core, source, REST, desktop, recovery, documentation and validation work, including AGENTS.md and the development summary. This is a work-in-progress checkpoint: the new compact palette has outstanding compilation errors and native acceptance; earlier passing gates retain their documented scope.
2026-09-10 10:06:55 -07:00

126 lines
3.2 KiB
Rust

//! Atomic semantic review session with independent, stably addressed row drafts.
use crate::{
app::{Choice, Message},
forms::Draft,
};
use iced::widget::text_editor;
use oa_core::{transitions::*, *};
use serde_json::Value;
use std::collections::{BTreeMap, BTreeSet};
mod artifacts;
#[cfg(test)]
mod artifacts_recovery_falsifier_tests;
#[cfg(test)]
mod artifacts_tests;
mod artifacts_view;
mod attachments;
mod attachments_view;
mod batch;
#[cfg(test)]
mod batch_tests;
mod compose;
mod constructors;
mod history;
mod keyed;
mod keyed_rows;
mod message_kind;
mod ordered;
mod recovery;
mod row;
mod scalar;
#[cfg(test)]
mod source7_tests;
mod view;
pub(crate) use view::summary;
#[cfg(test)]
mod constructor_tests;
#[cfg(test)]
mod keyed_rows_tests;
#[cfg(test)]
mod keyed_tests;
#[cfg(test)]
mod message_kind_tests;
#[cfg(test)]
mod ordered_tests;
#[cfg(test)]
mod tests;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Tab {
Facts,
References,
Members,
Attachments,
Artifacts,
History,
Impacts,
}
impl std::fmt::Display for Tab {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(match self {
Self::Facts => "Properties",
Self::References => "Reference mapping",
Self::Members => "Contents and order",
Self::Attachments => "Owned elements and relationships",
Self::Artifacts => "Evidence links",
Self::History => "Review history",
Self::Impacts => "Additional changes",
})
}
}
#[derive(Debug, Clone)]
pub enum RowEvent {
#[cfg(test)]
Trace(Choice),
#[cfg(test)]
Direction(TransitionDirection),
Select(FacetSelector),
Decide(FacetSelector, Option<SemanticDecision>),
Input(String, String),
Text(String, text_editor::Action),
Shape(String, Value),
Variant(String, Value),
Array(String, Option<usize>, i32),
Append(String, Value),
ValuePath(String, crate::data_values::FieldPathKey),
ValueBrowse(String, Option<crate::data_values::FieldPathKey>, usize),
ReferenceBrowse(String, String, usize),
OperationOmission(bool),
OperationRationale(String),
Tab(Tab),
ShowUnchanged(bool),
ReferenceOa(Choice),
ReferenceSa(Choice),
ReferenceSearch(String),
AddReference,
RestoreReviewedReferences,
RemoveReference(Id),
AcceptImpact(usize, bool),
Preview,
Reset(FacetSelector, bool),
Presence(FacetSelector, bool),
MemberFamily(keyed::Family),
MemberOa(Option<Choice>),
MemberSa(Option<Choice>),
Literal(String),
LiteralSide(Layer, bool),
EditPair(FacetSelector),
StageMember,
Attachment(attachments::Event),
Artifact(artifacts::Event),
DropStaged(FacetSelector),
AnnotationAddress(Layer, Option<crate::data_values::FieldPathKey>),
AnnotationBrowse(Layer, Option<crate::data_values::FieldPathKey>, usize),
#[cfg(test)]
RowExpression(FacetSelector, String),
RowText(FacetSelector, text_editor::Action),
RowLocal(FacetSelector, Choice),
OrderMove(OrderedCollection, usize, i32),
OrderReconcile(OrderedCollection),
}
pub use batch::{Event, RowAddress, State};
pub use row::ReviewRow;