Skip to content

feat(hooks,attachment): implement propagation of AttachmentParent#163

Open
mkatychev wants to merge 9 commits into
rootcause-rs:mainfrom
mkatychev:feat/attachment-parent-creation
Open

feat(hooks,attachment): implement propagation of AttachmentParent#163
mkatychev wants to merge 9 commits into
rootcause-rs:mainfrom
mkatychev:feat/attachment-parent-creation

Conversation

@mkatychev
Copy link
Copy Markdown

@mkatychev mkatychev commented Apr 25, 2026

This PR adds handling and creation of AttachmentParent so that AttachmentFormatterHook impls can refer to their parent.

Resolves #160

mkatychev and others added 9 commits April 25, 2026 14:34
…t-creation

# Conflicts:
#	src/report_attachment/ref_.rs
Resolves the cargo fmt --check failure introduced when resolving the
merge conflict in 5d9b372: my conflict resolution wrote the use line
in multi-line form, but the import fits on one line so rustfmt wants
it collapsed.
- CHANGELOG: drop stale `display_preformatted`/`debug_preformatted`
  references and tighten the entry (those methods were removed in rootcause-rs#148).
- `ReportAttachmentRef::format_inner_with_parent`: bring docs up to par
  with `format_inner` / `format_inner_unhooked`, including an example.
- `AttachmentParent.attachment_index`: document the pre-sort, pre-filter
  convention that `DefaultReportFormatter` upholds.
- `tests/attachment_parent.rs`: extend coverage to `Appendix` placement.
- Rename the leftover `style1` binding to `style`.
- Split the CHANGELOG entry: the `Option<AttachmentParent<'_>>`
  parameter on `AttachmentFormatterHook::display`/`debug` predates
  this PR. What's new is (a) `DefaultReportFormatter` now actually
  populates it instead of always passing `None`, and (b) the new
  `ReportAttachmentRef::format_inner_with_parent` method. Reflect
  both, with the behavior change under Changed.
- Fix `form` -> `from` in the new example comment.
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.

AttachmentParent struct never created

2 participants