Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
4b68dbf
Initial population of rules engine
stephenegriffin Oct 23, 2025
56b2b31
remove js from html
stephenegriffin Oct 23, 2025
cc57399
undo minor change
stephenegriffin Oct 23, 2025
4b3b87f
some cleanup
stephenegriffin Oct 23, 2025
67a3127
simplify createDiagnosticViolationItem
stephenegriffin Oct 23, 2025
e0b5c48
some simplifications
stephenegriffin Oct 23, 2025
008fa36
simplify
stephenegriffin Oct 23, 2025
ac8c891
simplify
stephenegriffin Oct 23, 2025
3e84b8b
simplify
stephenegriffin Oct 27, 2025
f53c217
simplify
stephenegriffin Oct 27, 2025
63f37a8
simplify
stephenegriffin Oct 27, 2025
0f41e62
simplify
stephenegriffin Oct 27, 2025
e0be433
simplify
stephenegriffin Oct 27, 2025
7033133
fix comment
stephenegriffin Oct 27, 2025
d26fbbc
simplify
stephenegriffin Oct 27, 2025
214f3a1
simplify
stephenegriffin Oct 27, 2025
0ecbc20
simplify
stephenegriffin Oct 27, 2025
612868b
simplify
stephenegriffin Oct 27, 2025
cc2d974
simplify
stephenegriffin Oct 27, 2025
4118ffa
simplify
stephenegriffin Oct 27, 2025
453d48f
simplify colors
stephenegriffin Oct 27, 2025
84f0cd7
Fix X icon
stephenegriffin Oct 27, 2025
146303c
remove button
stephenegriffin Oct 28, 2025
7de8bec
remove click event
stephenegriffin Oct 28, 2025
d5e21e8
break up monolith
stephenegriffin Oct 28, 2025
1da4ccb
refactoring popups
stephenegriffin Oct 28, 2025
ae1028d
rename template
stephenegriffin Oct 28, 2025
45062ee
convert fluentpop-over to the one from received tab
stephenegriffin Oct 28, 2025
e9d4576
simplify
stephenegriffin Oct 28, 2025
a5ed62e
simplify
stephenegriffin Oct 28, 2025
e052b61
simplify
stephenegriffin Oct 28, 2025
0a273b3
simplify
stephenegriffin Oct 28, 2025
b99d1e1
simplify
stephenegriffin Oct 28, 2025
66c31aa
simplify
stephenegriffin Oct 28, 2025
8ddd296
remove dead styling
stephenegriffin Oct 29, 2025
ad725a4
whitespace
stephenegriffin Oct 29, 2025
7dd2b44
simplify
stephenegriffin Oct 29, 2025
4f1b397
simplify
stephenegriffin Oct 29, 2025
f04db03
simplify
stephenegriffin Oct 29, 2025
daa324d
simplify
stephenegriffin Oct 29, 2025
3ee26ec
simplify
stephenegriffin Oct 29, 2025
1aa49b2
simplify
stephenegriffin Oct 29, 2025
22b3f7e
simplify
stephenegriffin Oct 29, 2025
16da46d
simplify
stephenegriffin Oct 29, 2025
e7a7559
simplify
stephenegriffin Oct 30, 2025
23744bb
begin work simplifying and rebuilding violations UI
stephenegriffin Oct 31, 2025
f9b53cc
cut comments
stephenegriffin Oct 31, 2025
7da2172
simplify
stephenegriffin Oct 31, 2025
82d854d
simplify
stephenegriffin Oct 31, 2025
f6f63e1
Consolidate severity styling into unified CSS system
stephenegriffin Oct 31, 2025
138865e
Create unified violation display factory function
stephenegriffin Oct 31, 2025
85dad4f
Merge violation templates into unified component
stephenegriffin Oct 31, 2025
3c3f5df
Consolidate accordion header to use shared violation display structure
stephenegriffin Oct 31, 2025
123dd64
convert fluent icon
stephenegriffin Oct 31, 2025
fc2aa33
clean up colors
stephenegriffin Oct 31, 2025
a9ca811
clean up colors
stephenegriffin Oct 31, 2025
a2f7722
fix color
stephenegriffin Oct 31, 2025
4fc8e96
minor color cleanups
stephenegriffin Oct 31, 2025
a51a160
remove debug overlays
stephenegriffin Oct 31, 2025
1781f75
fix antispam view
stephenegriffin Oct 31, 2025
dfd2f44
Move rules analysis into header parsing
stephenegriffin Nov 1, 2025
58a7da0
simplify header constructor
stephenegriffin Nov 1, 2025
8738731
add rules to mobile
stephenegriffin Nov 2, 2025
bb8b8f0
some spacing
stephenegriffin Nov 2, 2025
888c95a
fix up some spacing
stephenegriffin Nov 2, 2025
de4b5d7
wrapping
stephenegriffin Nov 2, 2025
643536e
add wrap
stephenegriffin Nov 2, 2025
45b1d5e
fix more spacing
stephenegriffin Nov 2, 2025
194a18f
more space
stephenegriffin Nov 2, 2025
3f4d502
move violations on other tab down
stephenegriffin Nov 2, 2025
7c571d0
convert to templates
stephenegriffin Nov 2, 2025
316d13e
better hiding
stephenegriffin Nov 2, 2025
11bd370
first pass hooking rules into classic
stephenegriffin Nov 2, 2025
d069c93
consolidate violations code
stephenegriffin Nov 2, 2025
dc09aed
fix badges
stephenegriffin Nov 2, 2025
416523c
consolidate template creation code
stephenegriffin Nov 2, 2025
da5f697
simplify
stephenegriffin Nov 2, 2025
05118b2
no dupes
stephenegriffin Nov 2, 2025
10fb648
fix missing pattern in new desktop
stephenegriffin Nov 2, 2025
8a223dc
fix color
stephenegriffin Nov 3, 2025
f92ac65
remove a gradient
stephenegriffin Nov 3, 2025
105665b
remove shadows
stephenegriffin Nov 3, 2025
09b0a72
fix more colors
stephenegriffin Nov 3, 2025
c18815a
fix colors
stephenegriffin Nov 3, 2025
8f7cf80
cleanup
stephenegriffin Nov 3, 2025
621ef69
suppress unneeded headers
stephenegriffin Nov 4, 2025
e05ed7f
merge diag report creation code
stephenegriffin Nov 5, 2025
31df24f
simplify
stephenegriffin Nov 5, 2025
2ef6c8a
fix classic layout a bit
stephenegriffin Nov 5, 2025
e66a344
simplify
stephenegriffin Nov 5, 2025
24353c8
align templates better
stephenegriffin Nov 5, 2025
2e4105e
simplify
stephenegriffin Nov 5, 2025
36354c2
cut counts
stephenegriffin Nov 5, 2025
fadaf4b
fix classes
stephenegriffin Nov 5, 2025
f0bfa22
consolidate rule css
stephenegriffin Nov 5, 2025
d0b97fc
consolidate backgrounds
stephenegriffin Nov 5, 2025
579c1e6
stub in rules tests
stephenegriffin Nov 6, 2025
0e10481
remove dead test
stephenegriffin Nov 6, 2025
9cd7b78
fix up getRules tests
stephenegriffin Nov 6, 2025
6c30945
fix test
stephenegriffin Nov 6, 2025
903f475
add more tests
stephenegriffin Nov 6, 2025
1c42a5d
reorg rules
stephenegriffin Nov 6, 2025
4a7d70e
more tests
stephenegriffin Nov 6, 2025
e051d47
more tests
stephenegriffin Nov 6, 2025
0cf796e
mix up missing header handling
stephenegriffin Nov 7, 2025
ef664d9
clean up test output
stephenegriffin Nov 7, 2025
7da83eb
better rules
stephenegriffin Nov 7, 2025
82c35d2
fix spacing
stephenegriffin Nov 7, 2025
5d3e38b
rebuild on rules changes
stephenegriffin Nov 7, 2025
348bcdf
auto break out spam parsing rules
stephenegriffin Nov 7, 2025
a23ca54
Fix SFS
stephenegriffin Nov 7, 2025
9c7964c
fix source/unparsed
stephenegriffin Nov 7, 2025
cd60c71
remove extra data from antispam
stephenegriffin Nov 10, 2025
3f2faeb
minor fixes
stephenegriffin Nov 10, 2025
0145411
Merge branch 'main' into u/sgriffin/rules2
stephenegriffin Nov 14, 2025
17c33a3
Merge branch 'main' into u/sgriffin/rules2
stephenegriffin Nov 15, 2025
cdf48e9
simplify
stephenegriffin Nov 17, 2025
86f5edd
Merge branch 'main' into u/sgriffin/rules2
stephenegriffin Nov 17, 2025
f62370f
Merge branch 'main' into u/sgriffin/rules2
stephenegriffin Dec 31, 2025
333a2df
remove dead code
stephenegriffin Dec 31, 2025
7021097
remove dead comments
stephenegriffin Dec 31, 2025
83b73e4
fix overlapping highlight spans
stephenegriffin Dec 31, 2025
40baa38
address early returns
stephenegriffin Dec 31, 2025
f1216f3
restore office.css
stephenegriffin Dec 31, 2025
1b0b585
fix hover scale
stephenegriffin Dec 31, 2025
e6b5580
fix borders
stephenegriffin Dec 31, 2025
015073f
remove empty ids
stephenegriffin Dec 31, 2025
a72f05b
better validation failed messages
stephenegriffin Dec 31, 2025
d81eecc
merge from main
stephenegriffin Jan 2, 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
110 changes: 110 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
## Project Context

Message Header Analyzer (MHA) - Outlook add-in for analyzing email headers. See README.md for full feature list and usage.

**Development Workflow:**
- User runs `npm run dev-server` for local development - don't ask to build unless there are errors
- Webpack handles compilation and hot reload automatically
- Test in Outlook Desktop with Debug tasks when needed

## Development Principles

- **Zero tolerance for errors AND warnings**: ALL errors and warnings from ANY source (build, TypeScript, ESLint, tests) must be fixed - warnings are errors, don't introduce problems
- **Stop on unexpected errors**: Present options instead of chasing fixes wildly
- **Check in frequently**: Commit often for incremental testing
- **Minimal dependencies**: Discuss before adding new packages
- **No legacy code**: Remove old code completely when updating
- **No process comments**: Don't add "Phase 1", "TODO", or development process comments
- **Keep README current**: When adding features/commands/options, update README.md in the same change
- **Don't create markdown files**: Never create new .md files (README, TODO, etc.) without being asked
- **Let user commit**: Don't auto-commit changes - present what's done and let user commit when ready
- **Complete all planned work**: When outlining a multi-step plan, implement ALL parts - don't stop partway and declare "good enough". Only the user decides when work is complete.
- **Don't duplicate functionality**: Reuse existing code when possible - if unsure about options, ask first
- **Fix everything you find**: When user says "fix X", fix ALL instances of X everywhere. If you find related issues while fixing, fix those too. Don't say "this is for later" - either fix it now or explicitly offer to add it to TODO.md. The user will tell you if something should be deferred.
- **No deferring without permission**: Never skip fixing something because it seems hard or time-consuming. If you think something should be deferred, explicitly ask: "Should I add this to TODO.md or fix it now?"

## Code Standards

### TypeScript
- **Pure TypeScript**: No JavaScript files - everything must be .ts
- **Pure ES Modules**: `"type": "module"` in package.json, no CommonJS
- Strict mode with all safety flags enabled
- No implicit `any`
- **Never use `unknown` type** - use proper types or type assertions
- No unsafe operations
- Explicit return types required
- Use type assertions (`as Type`) when unavoidable

### HTML/CSS
- **No inline code or styles**: Keep JavaScript and CSS in separate files
- Use external TypeScript modules compiled to ES modules
- Use external CSS files linked in HTML

### ESLint
- Max complexity: 15 (only ignore for legitimately complex functions)
- Explicit function return types required
- No `any` types
- K&R brace style
- **No trailing whitespace**: ESLint will fail on any trailing spaces or extra blank lines - never add them
- Fix issues properly - **never disable rules to bypass problems**

### Error Handling
- Let errors propagate naturally with typed errors
- Use try/catch only when required by dependencies
- Provide meaningful error messages

## Common Patterns

### Type Assertions (when unavoidable)
```typescript
const data = JSON.parse(jsonString) as SomeType[];
const element = document.getElementById('id') as HTMLElement;
```

### Complexity Exceptions (use sparingly)
```typescript
// eslint-disable-next-line complexity
async function legitimatelyComplexFunction() { }
```

## Anti-Patterns to Avoid

❌ Disabling ESLint rules to bypass problems
❌ Using `any` or `unknown` without type assertions
❌ Adding TODO/Phase comments in code
❌ Keeping deprecated/legacy code
❌ Guessing at fixes - stop and ask instead

## Testing Requirements

- All tests must pass before committing
- Test failures are NEVER expected - if tests fail, fix the code or fix the tests
- Run `npm test` after any code changes
- Run `npm run lint` to verify no ESLint errors

### TDD Approach for Bug Fixes

When fixing bugs identified in code reviews or reported issues:

1. **Write failing test first**: Create a test that demonstrates the bug - it MUST FAIL with the current buggy code
2. **Apply the fix**: Implement the code changes to address the bug
3. **Verify test passes**: Run the test again - it should now PASS with the fixed code
4. **If test still fails**: Reconsider whether the fix is incorrect OR the test is incorrect
5. **If test was incorrect**: Fix the test, then retest with OLD buggy code to verify it fails there, then retest with NEW fixed code to verify it passes

This approach ensures:
- The bug actually exists and is reproducible
- The fix actually solves the problem
- We have regression protection going forward

## Workflow for Changes

**Development:**
- User runs `npm run dev-server` - don't ask to start it
- Webpack dev server handles compilation and hot reload
- Make code changes and test in browser/Outlook

**Testing:**
- `npm test` - Run tests
- `npm run lint` - ESLint check
- `npm run lint:fix` - Auto-fix ESLint issues
Loading
Loading