Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cf6e3a6
feat: update search functionality and documentation for VFB Connect i…
Robbie1977 Mar 26, 2026
6e13d7a
feat: add VFB query link skill and short names for enhanced query fun…
Robbie1977 Mar 26, 2026
046bf35
feat: implement caching for VFB term info and run query with retry lo…
Robbie1977 Mar 26, 2026
57908de
feat: add bioRxiv API fallback functionality for enhanced data retrieval
Robbie1977 Mar 26, 2026
2434f9a
feat: update VFB MCP URL and enhance tool descriptions for clarity an…
Robbie1977 Mar 26, 2026
009b957
feat: implement graph normalization and visualization features for en…
Robbie1977 Mar 26, 2026
d516908
feat: enhance query handling with new response functions and error en…
Robbie1977 Mar 26, 2026
faedffb
feat: increase max tool rounds from 10 to 50 for enhanced processing …
Robbie1977 Mar 26, 2026
99d72a2
feat: normalize connectivity defaults for group_by_class and weight p…
Robbie1977 Mar 26, 2026
70a4829
feat: implement neuron class handling and connectivity endpoint norma…
Robbie1977 Mar 26, 2026
5a04be3
feat: add accessibility statement page with compliance details and fe…
Robbie1977 Mar 26, 2026
469b5d7
fix: sanitize VFB IDs passed to tools to prevent markdown/IRI contami…
Robbie1977 Mar 26, 2026
214c7ad
feat: enhance thinking message display with step tracking and complet…
Robbie1977 Mar 26, 2026
9717820
feat: enhance link handling by normalizing hrefs and preserving markd…
Robbie1977 Mar 26, 2026
db37bd8
feat: implement connectivity endpoint normalization and scoring funct…
Robbie1977 Mar 26, 2026
3f3133e
feat: enhance neuron class validation in connectivity endpoint by ref…
Robbie1977 Mar 26, 2026
c0d4771
feat: improve status messages, error indicators, graph extraction, an…
Robbie1977 Mar 27, 2026
1d25a08
feat: integrate react-force-graph-2d for enhanced graph visualization
Robbie1977 Mar 27, 2026
fcd3444
feat: enhance graph visualization by adding role-based coloring and i…
Robbie1977 Mar 27, 2026
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
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VFB Chat is a Next.js chat interface for exploring Virtual Fly Brain (VFB) data
## What Changed

- Native `web_search` has been removed from the model toolset.
- Search is limited to approved `virtualflybrain.org` and `neurofly.org` pages plus reviewed `flybase.org` pages through server-side, domain-restricted tools.
- Search is limited to approved `virtualflybrain.org`, `neurofly.org`, and `vfb-connect.readthedocs.io` pages plus reviewed `flybase.org` pages through server-side, domain-restricted tools.
- Outbound links are sanitized server-side to approved domains only.
- Raw IP-based security logs are retained for up to 30 days under `/logs/security`.
- Aggregated analytics and structured feedback are retained under `/logs/analytics` and `/logs/feedback`.
Expand Down Expand Up @@ -36,7 +36,7 @@ The app now uses a 3-layer logging model rooted at `LOG_ROOT_DIR`:
The reviewed documentation search path uses two server-side sources:

- a seed index from `config/reviewed-docs-index.json`
- a domain-restricted discovery path for approved `virtualflybrain.org` and `neurofly.org` pages using configured sitemap and robots sources
- a domain-restricted discovery path for approved `virtualflybrain.org`, `neurofly.org`, and `vfb-connect.readthedocs.io` pages using configured sitemap and robots sources

This keeps search scoped to approved domains while avoiding a hand-maintained list of every VFB news or documentation page.

Expand All @@ -52,13 +52,16 @@ Environment variable:

Required for production:

- `OPENAI_API_KEY`
- `OPENAI_BASE_URL` or `APPROVED_ELM_BASE_URL`
- `OPENAI_MODEL` or `APPROVED_ELM_MODEL`
- `ELM_API_KEY` (or `OPENAI_API_KEY` as backward-compatible fallback)
- `ELM_BASE_URL` (or `OPENAI_BASE_URL`) or `APPROVED_ELM_BASE_URL`
- `ELM_MODEL` (or `OPENAI_MODEL`) or `APPROVED_ELM_MODEL`
- `LOG_ROOT_DIR=/logs`

Optional:

- `OPENAI_API_KEY`
- `OPENAI_BASE_URL`
- `OPENAI_MODEL`
- `APPROVED_ELM_BASE_URL`
- `APPROVED_ELM_MODEL`
- `RATE_LIMIT_PER_IP`
Expand All @@ -68,21 +71,21 @@ Optional:
- `GA_MEASUREMENT_ID`
- `GA_API_SECRET`

When `APPROVED_ELM_BASE_URL` and/or `APPROVED_ELM_MODEL` are provided, production enforces that they exactly match the active `OPENAI_*` values. If they are omitted, the app uses the active gateway/model as the approved baseline so existing single-config deployments continue to work.
When `APPROVED_ELM_BASE_URL` and/or `APPROVED_ELM_MODEL` are provided, production enforces that they exactly match the active configured gateway/model (resolved from `ELM_*` first, then `OPENAI_*`). If they are omitted, the app uses the active gateway/model as the approved baseline so existing single-config deployments continue to work.

Default allow-lists:

- Search allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`
- Outbound allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `doi.org`, `pubmed.ncbi.nlm.nih.gov`, `biorxiv.org`, `medrxiv.org`
- Search allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `vfb-connect.readthedocs.io`
- Outbound allow-list: `virtualflybrain.org`, `*.virtualflybrain.org`, `flybase.org`, `neurofly.org`, `*.neurofly.org`, `vfb-connect.readthedocs.io`, `doi.org`, `pubmed.ncbi.nlm.nih.gov`, `biorxiv.org`, `medrxiv.org`

## Local Development

Create `.env.local` with explicit values:

```bash
OPENAI_API_KEY=your-key-here
OPENAI_BASE_URL=https://your-elm-gateway.example/v1
OPENAI_MODEL=your-approved-model
ELM_API_KEY=elm-xxxxxxxx-xxxxxxxxxxxxxxxx
ELM_BASE_URL=https://elm.edina.ac.uk/api/v1
ELM_MODEL=meta-llama/Llama-3.3-70B-Instruct
LOG_ROOT_DIR=./logs
```

Expand Down
102 changes: 102 additions & 0 deletions app/accessibility/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
export const metadata = {
title: 'VFB Chat Accessibility Statement',
description: 'Accessibility statement for VFB Chat'
}

export default function AccessibilityPage() {
return (
<main style={{
minHeight: '100vh',
backgroundColor: '#000',
color: '#e0e0e0',
padding: '32px 20px 48px',
boxSizing: 'border-box'
}}>
<div style={{ maxWidth: '860px', margin: '0 auto' }}>
<h1 style={{ color: '#fff', marginTop: 0 }}>Accessibility Statement</h1>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
This accessibility statement applies to VFB Chat (<a href="https://chat.virtualflybrain.org" style={{ color: '#66d9ff' }}>chat.virtualflybrain.org</a>).
This service is run by the Virtual Fly Brain project at the University of Edinburgh.
</p>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>Compliance Status</h2>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
We aim to make this website accessible in accordance with the Public Sector Bodies
(Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 and
the Web Content Accessibility Guidelines (WCAG) 2.2 at Level AA.
</p>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
This website is partially compliant with the WCAG 2.2 Level AA standard.
</p>
</section>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>What We Do to Ensure Accessibility</h2>
<ul style={{ lineHeight: 1.7 }}>
<li>Full keyboard navigation throughout the chat interface</li>
<li>Skip-to-content link for keyboard and screen reader users</li>
<li>Proper ARIA landmarks and live regions for dynamic content</li>
<li>Sufficient colour contrast ratios (minimum 4.5:1 for text)</li>
<li>Visible focus indicators for interactive elements</li>
<li>Semantic HTML structure with appropriate heading hierarchy</li>
<li>Alternative text for images</li>
<li>Accessible form inputs with associated labels</li>
<li>No time-limited content</li>
<li>No flashing content</li>
</ul>
</section>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>Known Limitations</h2>
<ul style={{ lineHeight: 1.7 }}>
<li>Network graph visualisations (SVG) convey information visually that may not be fully available to screen reader users, though graph titles and labels are provided as text.</li>
<li>AI-generated content may occasionally produce complex formatting that is not optimally structured for assistive technology.</li>
</ul>
</section>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>Feedback and Contact</h2>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
If you encounter any accessibility barriers when using this website, please contact us:
</p>
<ul style={{ lineHeight: 1.7 }}>
<li>Email: <a href="mailto:data@virtualflybrain.org" style={{ color: '#66d9ff' }}>data@virtualflybrain.org</a></li>
</ul>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
We aim to respond to accessibility feedback within 5 working days.
</p>
</section>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>Enforcement Procedure</h2>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
The Equality and Human Rights Commission (EHRC) is responsible for enforcing the
Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility
Regulations 2018. If you are not happy with how we respond to your complaint, contact
the{' '}
<a
href="https://www.equalityadvisoryservice.com/"
target="_blank"
rel="noopener noreferrer"
style={{ color: '#66d9ff', textDecoration: 'underline' }}
>
Equality Advisory and Support Service (EASS)
</a>.
</p>
</section>

<section style={{ marginTop: '28px' }}>
<h2 style={{ color: '#fff' }}>Preparation of This Statement</h2>
<p style={{ color: '#b8b8b8', lineHeight: 1.6 }}>
This statement was prepared on 26 March 2026. It was last reviewed on 26 March 2026.
</p>
</section>

<p style={{ marginTop: '28px' }}>
<a href="/" style={{ color: '#66d9ff', textDecoration: 'underline' }}>Back to VFB Chat</a>
</p>
</div>
</main>
)
}
Loading
Loading