Skip to content

Development - #1509

Merged
NishaSharma14 merged 31 commits into
mainfrom
development
Jul 31, 2026
Merged

Development#1509
NishaSharma14 merged 31 commits into
mainfrom
development

Conversation

@NishaSharma14

Copy link
Copy Markdown
Contributor

No description provided.

NishaSharma14 and others added 30 commits July 10, 2026 11:59
Detect HiFSA folders by a .blob file or the folder name, and processed
folders by the names proc or processed. Skip them in processFolder and
exclude them from dataset creation so companion export folders are not
promoted to separate samples.
Resolve the HiFSA report PDF for each study, stream it inline for preview,
and render a collapsible HiFSA section above chemical composition when a
report is available for the selected sample.
* feat(sample): add basis-explicit mixture composition schema

Introduce mixture_compositions and mixture_components tables with PHP
enums for basis and determination method, plus Sample relationships and
sum validation helpers.

Refs #566

* feat(sample): add mixture composition API and sync action

Add SyncMixtureComposition action, form requests, API resources, study
routes, and controller endpoints with authorization and eager loading.

Refs #566

* feat(ui): add mixture composition deposition and display

Replace ambiguous percentage field with basis selector, per-component
shares, optional qNMR metadata, help modal, and public sample display.

Refs #566

* test(sample): add mixture composition validation and feature tests

Cover basis-aware sum validation, molecule store/update flows, metadata
guards, authorization, and sort order preservation.

Refs #566

* fix(deps): resolve high-severity npm audit advisories

Bump postcss and add overrides for brace-expansion and minimatch so
npm audit --audit-level=high passes without a breaking eslint upgrade.

* fix(build): resolve PostCSS import order and Tailwind config warnings

Move vue3-tour import before custom rules, replace deprecated purge
with content, and drop redundant line-clamp plugin.
* feat(nmr): denormalize NMRium spectra metadata on datasets

Extract searchable spectra fields from NMRium info into indexed dataset columns, with a reprocessable Artisan command and live sync via NMRiumObserver.

* feat(api): add public metadata search and facet endpoints

Expose structured NMR metadata search over denormalized dataset columns, including dynamic facet values that narrow as filters are applied.

* feat(search): add advanced metadata search UI and results page

Replace free-text metadata fields with facet-driven filters on the hero advanced tab, sync form state in the URL, and load grouped study and dataset results from the metadata API.

* docs(api): document metadata search endpoints and OpenAPI spec

Add developer guide coverage for metadata search and facets, regenerate the OpenAPI document, and assert the new routes are present in the published spec.

* test(commands): fix ExtractDatasetSpectraInfoCommand expectations

Align skip-reprocess coverage with NMRiumObserver sync order and compare
decimal spectra frequencies numerically after PostgreSQL persistence.
…#1467)

Store per-user preferences as JSON on users, expose a profile form and
an inline selector to pick a default 1D/2D spectrum tab, validate the
value through a form request against the new DefaultSpectrumTab enum,
and apply the preferred tab when NMRium loads in the editor, viewer and
snapshot components (with postMessage now scoped to the NMRium origin
instead of *).
…and probes

Snap drifting spectrometer frequencies (599-602) to nominal fields so the
statistics distributions and nucleus/frequency sunburst group cleanly, and
align the proton_frequency search filter to the same bin range.

Add experiment category (1H, 13C, DEPT, COSY, HSQC, HMBC, NOESY, ROESY,
TOCSY, Other) and simplified probe type (family/temperature/gradient)
distributions derived from raw pulse-sequence, experiment, and probe columns.
…ailable

When the sample folder only identifies the generic JCAMP exchange format,
fall back to the NMRium manufacturer/vendor/title metadata before settling
on the JCAMP label, so vendor-identifiable spectra are counted correctly.
Remaining generic files are displayed as "Generic (JCAMP)".
Show compounds with spectra, samples with spectra, experimental spectra, and
predicted spectra (0) at the top of the statistics page, with a note that
nmrXiv archives only experimental data. The compounds figure reuses the public
catalog count of molecules that have at least one public spectrum.

Cap chart legends at a fixed height on all breakpoints so long lists scroll
instead of expanding the page on mobile.
Replace the Login link with Dashboard on public pages when a user is
authenticated, covering both desktop and mobile navigation.
Group charts into samples, experiments, and instrumentation sections with
sticky navigation, a hero summary, and an API access callout at the end.
Add reusable stats schemas and document all distribution keys on the
metadata stats endpoint, including nested sunburst breakdowns.
Partial fsObject:id,name eager loading blocked loadMissing from hydrating
relative_url, which inflated getNMRiumInfo counts during dataset verification.
Move HiFSA PDF and CSV resolution into HifsaPdfResolver, store parsed Cosmic
Truth scores on studies, and add score panels and plots to the upload workflow.
Use belongsTo on studies.fs_id instead of hasOne on study_id so the
study root is unambiguous when child folders share the same study_id,
matching the Dataset relationship pattern and stabilizing NMRium path matching.
Guard the Files tab when fsObject is missing, and add an asStudyRoot
factory helper so study file tests set the canonical studies.fs_id link.
* fix(download): require valid uuid and ignore user-supplied bucket

Return 404 when the download uuid is missing, malformed or unknown
instead of erroring, and always resolve the S3 bucket from filesystem
config rather than trusting a request parameter.

* feat(tracking): record public project, study and dataset views and downloads

Add views/downloads counters to projects and studies, an
InteractionTracker service that deduplicates per session, rolls dataset
and study interactions up to the owning project, and only counts public
entities (never reviewer previews). Views are recorded on the public
pages and downloads via a rate-limited POST /track/download/{identifier}
beacon; both counters are exposed through the project and study
resources.

* feat(downloads): show usage stats and gate downloads behind terms modal

Display view and download counts on public project and sample pages,
and require accepting the data-user terms (DownloadTermsModal backed by
resources/markdown/download-terms.md) before any download starts. On
acceptance the download-tracking beacon is fired and the download
proceeds.
Extract MIChI v1 fields with NMRium mapping from spectrum info and
processing filters, and merge them into the public dataset spectrum
info table ahead of remaining raw NMRium keys.

Closes #993
…extraction job. (#1484)

* fix: update bagit generation job

* build: Spectra Parser Build and Push

* fix: update release tag name

* fix: remove NMRKIT_API_URL from docker-compose.prod.yml

* fix: file zip issue in metadata parser

* test: improve test coverage for ProcessMetadataExtractionBagitGenerationJob
- add funding reference to embargo and publication deposition pages
…1492)

* fix(security): add rel="noopener noreferrer" to all target="_blank" links

Replaces rel="noreferrer"/rel="noopener" and adds a missing rel attribute
on every target="_blank" link across Vue components, Inertia Link components,
Blade templates, JS-generated markup, PHP seeders and docs to mitigate reverse
tabnabbing.

Closes #1491

* fix(nmr): build a valid NMRium iframe URL when nmrium_url has no query string

SpectraViewer and SpectraSnapshot appended "&id=" + Math.random() directly
to the configured nmrium_url. When NMRIUM_URL has no existing query string
(e.g. the bare config default), this produced an invalid URL such as
https://nmrium.nmrxiv.org&id=0.123, so the iframe never navigated away from
about:blank and the NMRium postMessage handshake failed silently, leaving the
spectra viewer blank.

Mirrors the separator logic already used in SpectraEditor.vue: use "?" when
the base URL has no query string yet, otherwise "&".

* fix(review): address Copilot PR #1492 review feedback

- app.blade.php: quote the inline style (was invalid style=color:blue) and
  use a Tailwind class instead.
- Validation.vue: convert the href-less <a target="_blank"> wrapper
  elements (project, samples, errors, warnings list items) to <div>, since
  they never navigate anywhere and target/rel had no effect.
- LicenseSeeder.php: fix the CC BY-SA 4.0 and CC BY-SA 3.0 entries whose body
  "Note" link mistakenly pointed to the by-nc-sa/4.0 license text instead of
  the license matching their own url field.
* build: back up release DB to Ceph before deployment

Add a mandatory pre-deployment step that dumps the outgoing release's
database, zips it, and uploads it to Ceph under a release-numbered
path (nmrxiv/production/database/release-backup/), aborting the
deployment if any step fails.

* fix: copilot review changes
@NishaSharma14
NishaSharma14 merged commit 414b656 into main Jul 31, 2026
7 checks passed
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.18%. Comparing base (7f16499) to head (f16a09a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1509      +/-   ##
============================================
- Coverage     80.19%   80.18%   -0.01%     
  Complexity     4385     4385              
============================================
  Files           289      289              
  Lines         16189    16189              
============================================
- Hits          12982    12981       -1     
- Misses         3207     3208       +1     
Flag Coverage Δ
unittests 80.18% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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