Skip to content

feat(op-canon): re-export ogar_class_view::OgarClassView (Northstar C2 sibling)#51

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/op-canon-class-view-reexport
Jun 20, 2026
Merged

feat(op-canon): re-export ogar_class_view::OgarClassView (Northstar C2 sibling)#51
AdaWorldAPI merged 1 commit into
mainfrom
claude/op-canon-class-view-reexport

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

C2 sibling of redmine-rs#6 — re-exports OgarClassView + the projection trait surface from ogar_class_view + lance_graph_contract::class_view through op_canon::class_view.

Symmetric pattern with the existing class_ids re-exports (#49 / #50): the source of truth lives in OGAR, this port re-exports so downstream op-* crates have one import path.

Surface

  • Cargo.toml: adds ogar-class-view + lance-graph-contract git deps.
  • src/class_view.rs (new): re-exports OgarClassView, ClassView, ClassId, FieldMask, RenderRow, ClassProjection, FieldRef, ObjectView, DisplayTemplate.

The five-line muscle-memory loop (Northstar §2.3)

use op_canon::class_view::{OgarClassView, ClassView, FieldMask};
use op_canon::class_ids::PROJECT_WORK_ITEM;

let view = OgarClassView::new();
let mask = FieldMask::EMPTY.with(0).with(1);
let rows = view.render_rows(PROJECT_WORK_ITEM, mask);
// rows feed an askama projection template — HTML / JSON / whatever.

Tests (+3 unit, +1 doctest)

  • re_export_loads_the_canonical_class_view
  • render_rows_skips_off_bits_through_the_re_export
  • snapshot_ids_resolve_through_the_re_exported_view — every concept the OpenProject snapshot promotes resolves to a non-empty field set via the re-exported view.
  • Doctest pinning the public API.

12/12 unit + 2 doctests (was 9 + 1). Workspace check + test green; clippy + fmt clean.

Scope

Purely additive — one new file, one pub mod line, two new git deps.


Generated by Claude Code

…2 sibling)

Symmetric move with redmine-rs#6. The ClassView projection bridge from
ogar_vocab::Class onto lance_graph_contract::ClassView lives in
ogar-class-view (OGAR #77); this port re-exports it so the projection
contract is shared with redmine-canon — same one-source-of-truth pattern
as class_ids (PRs #49/#50).

Downstream op-* crates now reach the run-time projection layer through
one import path (op_canon::class_view) without each crate depending on
lance-graph-contract directly.

Surface:
- crates/op-canon/Cargo.toml: adds ogar-class-view + lance-graph-contract
  git deps (both AdaWorldAPI/* forks).
- crates/op-canon/src/class_view.rs: re-exports ClassId, ClassView,
  ClassProjection, FieldMask, RenderRow + DisplayTemplate, FieldRef,
  ObjectView + OgarClassView. Module doc explains the pattern, references
  the Northstar plan, and pairs with redmine-canon's identically-shaped
  module.

Tests (+3 unit, +1 doctest; 12/12 + 2 doctests total):
- re_export_loads_the_canonical_class_view
- render_rows_skips_off_bits_through_the_re_export
- snapshot_ids_resolve_through_the_re_exported_view
- doctest pinning the public API

Workspace check + test green; clippy + fmt clean.
@AdaWorldAPI AdaWorldAPI merged commit 6c2b9ee into main Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants