Update tab.js to track unsaved edits in the tab. Needs styling.