Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/all_code_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
--paths "/*"
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ autodeploy2
autodeploy

dev-neptune-queries/*
dev/*
dev-neptune-queries
PersonURIs_SPEAR.txt
PersonURIs_SPEAR_sorted.txt
missing_from_person_json.txt
person_values.txt
person_values_sorted.txt
2 changes: 1 addition & 1 deletion dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<!-- Factoid results -->
<div id="factoidResults" class="d-none">
<div class="card p-3 shadow-lg border-0">
<div id="factoid-items" class="grid-col-5 gap-3"></div>
<div id="factoid-items" class="gap-3"></div>
<div class="pagination-dots" id="factoid-pagination"></div>
</div>
</div>
Expand Down
22 changes: 21 additions & 1 deletion mode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// mode.js


export function boot({ registry, defaultType = 'person' } = {}) {
const state = { type: null, filters: {} };

Expand Down Expand Up @@ -63,14 +64,33 @@ export function boot({ registry, defaultType = 'person' } = {}) {
state.type = type;

togglePanels(type);

function showUserFacetError(msg) {
console.warn("Showing user facet error:", msg);
const container = document.getElementById("source-error-container");
if (!container) return;

container.innerHTML = `
<div class="alert alert-warning mt-2 p-2" style="font-size: 0.9rem;">
${msg}
</div>
`;
}


const runSearch = async () => {
if (!mode.fetch || !mode.render) return;
try {
const rows = await mode.fetch(state);
if (!rows) {
// Early exit for source only facet error
if (!rows) {
return;
}
if (rows?.error) {
showUserFacetError(rows.message);
return; // STOP — do not call mode.render
}

mode.render(rows, state);
} catch (err) {
console.error('Search failed:', err);
Expand Down
1 change: 1 addition & 0 deletions modes/person.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default {
<label><input class="me-1" type="checkbox" name="source" value="https://spear-prosop.org/chronicle-edessa" checked /> Chronicle of Edessa</label>
</div>
</div>
<div id="source-error-container"></div>
</div>
<!-- Names Filter -->
<div class="filter-section">
Expand Down
40 changes: 0 additions & 40 deletions person/person.json
Original file line number Diff line number Diff line change
Expand Up @@ -8074,26 +8074,6 @@
"value": "A patriarch of Antioch about whom only very little is known, Euphrasius came to the episcopal throne in 521 and was in all likelihood a fierce persecutor of the miaphysites. He was killed in an earthquake that struck Antioch in 526, an end which for later miaphysite authors seemed fitting because of his deeds."
}
},
{
"person": {
"type": "uri",
"value": "http://syriaca.org/person/2278"
},
"label_en": {
"xml:lang": "en",
"type": "literal",
"value": "Euphrasios"
},
"label_syr": {
"xml:lang": "syr",
"type": "literal",
"value": "ܐܘܦܪܘܣ"
},
"description": {
"type": "literal",
"value": "A patriarch of Antioch about whom only very little is known, Euphrasius came to the episcopal throne in 521 and was in all likelihood a fierce persecutor of the miaphysites. He was killed in an earthquake that struck Antioch in 526, an end which for later miaphysite authors seemed fitting because of his deeds."
}
},
{
"person": {
"type": "uri",
Expand Down Expand Up @@ -8474,26 +8454,6 @@
"value": "Eutyches was a controversial and polemical monastic teacher active in Constantinople in the early fifth century. He opposed dyophysite (two-nature) Christology, but the precise nature of his own one-nature Christology is uncertain. He was condemned in 448 at a synod, restored in 449 at the Second Council of Ephesus , and condemned again at the Council of Chalcedon where he was championed by the Syriac monk Barsauma . In later theological discussions, Eutyches' one-nature Christology was equally condemned by Chalcedonian theologians and the Coptic and Syriac Orthodox Churches. Eutyches was archimandrite of a monk in Constantinople and opposed the doctrine of the two natures in Christ. He was condemned as a heretic at the council of Chalcedon in 451 for supposedly denying the human nature in Christ."
}
},
{
"person": {
"type": "uri",
"value": "http://syriaca.org/person/482"
},
"label_en": {
"xml:lang": "en",
"type": "literal",
"value": "Eutyches"
},
"label_syr": {
"xml:lang": "syr",
"type": "literal",
"value": "ܐܘܛܘܟܝܢܣܛܐ (used as adjective)"
},
"description": {
"type": "literal",
"value": "Eutyches was a controversial and polemical monastic teacher active in Constantinople in the early fifth century. He opposed dyophysite (two-nature) Christology, but the precise nature of his own one-nature Christology is uncertain. He was condemned in 448 at a synod, restored in 449 at the Second Council of Ephesus , and condemned again at the Council of Chalcedon where he was championed by the Syriac monk Barsauma . In later theological discussions, Eutyches' one-nature Christology was equally condemned by Chalcedonian theologians and the Coptic and Syriac Orthodox Churches. Eutyches was archimandrite of a monk in Constantinople and opposed the doctrine of the two natures in Christ. He was condemned as a heretic at the council of Chalcedon in 451 for supposedly denying the human nature in Christ."
}
},
{
"person": {
"type": "uri",
Expand Down
19 changes: 19 additions & 0 deletions person/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,25 @@ export async function fetchData(state) {
const query = buildMultiFilterQuery(state);
console.log("Build Person MultiFilterQuery with state:", state);
console.log('Fetching persons with multi-type query:', query);

// --- EARLY EXIT CONDITION: Source-only selection crashes Neptune---
const onlySourceSelected =
state.selectedSourceKeywords.size > 0 && state.selectedSourceKeywords.size < 3 &&
(!state.persons || state.persons.length === 0) &&
state.selectedEventKeywords.size === 0 &&
state.selectedRelationshipKeywords.size === 0 &&
state.selectedOccupationKeywords.size === 0 &&
state.selectedGenderKeywords.size === 0 &&
state.selectedPlaceKeywords.size === 0;

if (onlySourceSelected) {
console.warn("Source-only facet query prevented.");
return {
error: true,
message: "Source choice alone is insufficient for query. Please select at least one additional facet.",
rows: []
};
}
query.split('\n').forEach((line,i)=>console.log(String(i+1).padStart(3,' '), line));

const controller = new AbortController();
Expand Down