I have been using dejavu with a multi-document app and using a seperate undo/redo area for each document.
One problem I came across was what to do with undo/redo actions that trancend a single document (like adding a new document, changing document order, removing documents etc..).
My Solution so far is this:
1) Replace Command.Caption with Command.CommandID (a struct with an Id field and a Caption field)
Whenever a new Command is created the Id is given by an incrementing static index ("static int _currentId")
UndoRedoArea.UndoCommands & RedoCommands now return an enumerable of CommandId's
2) I created a "master" document undo/redo area that recorded changes on a higher level then inside a document (add a new document, change document order, remove document etc..)
3) When I want to do an undo or redo action I compare the id's of the local document UndoRedoArea commands and the master document UndoRedoArea to figure out what to undo (or redo)
4) I added a ClearRedos method to UndoRedoArea so if the master UndoRedoArea is commited to I ClearUndos on all the local UndoRedoAreas or if a local UndoRedoArea is commited to I ClearUndos on the master UndoRedoArea.
It is an interesting solution and I am testing it out :)
I hope this makes sense to someone.